mirror of
https://github.com/logos-messaging/docs.waku.org.git
synced 2026-01-06 23:03:10 +00:00
Autogenerate sidebar
Also add intro to research section
This commit is contained in:
parent
c72dc2d62b
commit
e2f6fab9f0
10
docs/research/index.md
Normal file
10
docs/research/index.md
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
title: Research
|
||||||
|
hide_table_of_contents: true
|
||||||
|
sidebar_position: 1
|
||||||
|
---
|
||||||
|
|
||||||
|
**Research and Studies**: protocol simulations and theoretical analysis to support the design
|
||||||
|
of Waku protocols. The protocol definitions can be found on the [Vac RFC](https://rfc.vac.dev/) website.
|
||||||
|
|
||||||
|
**Benchmarks**: Results of implementations and engineering related benchmarks for Waku clients.
|
||||||
@ -63,17 +63,25 @@ const repositories = [
|
|||||||
{
|
{
|
||||||
baseUrl: 'https://api.github.com/repos/waku-org/nwaku/contents/docs/benchmarks',
|
baseUrl: 'https://api.github.com/repos/waku-org/nwaku/contents/docs/benchmarks',
|
||||||
baseSavePath: '/docs/research/benchmarks/',
|
baseSavePath: '/docs/research/benchmarks/',
|
||||||
prefixToRemove: 'docs/benchmarks/'
|
prefixToRemove: "docs/benchmarks/",
|
||||||
|
categoryFileContent: "{ \"label\": \"Benchmarks\", \"collapsed\": false }"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
baseUrl: 'https://api.github.com/repos/waku-org/research/contents/docs',
|
baseUrl: 'https://api.github.com/repos/waku-org/research/contents/docs',
|
||||||
baseSavePath: '/docs/research/research-and-studies/',
|
baseSavePath: '/docs/research/research-and-studies/',
|
||||||
prefixToRemove: 'docs/'
|
prefixToRemove: "docs/",
|
||||||
|
categoryFileContent: "{ \"label\": \"Research and Studies\", \"collapsed\": false }"
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
fs.rmSync('docs/research/', { recursive: true, force: true });
|
repositories.forEach(repo => {
|
||||||
|
fs.rmSync(path.join(__dirname, repo.baseSavePath), { recursive: true, force: true });
|
||||||
|
});
|
||||||
|
|
||||||
repositories.forEach(repo => {
|
repositories.forEach(repo => {
|
||||||
fetchDirectoryContents(repo.baseUrl, repo.baseSavePath, repo.prefixToRemove);
|
fetchDirectoryContents(repo.baseUrl, repo.baseSavePath, repo.prefixToRemove, repo.categoryFileContent).then(() => {
|
||||||
|
const dir = path.join(__dirname, repo.baseSavePath);
|
||||||
|
fs.mkdirSync(dir, { recursive: true });
|
||||||
|
fs.writeFileSync(path.join(dir, "_category_.json"), repo.categoryFileContent);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
12
sidebars.js
12
sidebars.js
@ -87,16 +87,8 @@ const sidebars = {
|
|||||||
],
|
],
|
||||||
research: [
|
research: [
|
||||||
{
|
{
|
||||||
type: "category",
|
type: 'autogenerated',
|
||||||
label: "Research and Studies",
|
dirName: 'research', // '.' means the current docs folder
|
||||||
collapsed: false,
|
|
||||||
items: ["research/research-and-studies/incentivisation"],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: "category",
|
|
||||||
label: "Nwaku Benchmarks",
|
|
||||||
collapsed: false,
|
|
||||||
items: ["research/benchmarks/postgres-adoption"],
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user