mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-06 10:20:09 +02:00
Merge branch 'master' into header-links
This commit is contained in:
commit
090aa4c903
4 changed files with 4 additions and 10 deletions
|
@ -1,8 +1,3 @@
|
|||
---
|
||||
id: getting-started
|
||||
title: Up and Running
|
||||
---
|
||||
|
||||
## Getting Started
|
||||
|
||||
### Project Structure
|
||||
|
|
|
@ -92,7 +92,7 @@ files.forEach(file => {
|
|||
// copy sidebar if necessary
|
||||
if (versionFallback.diffLatestSidebar()) {
|
||||
mkdirp(CWD + "/versioned_sidebars");
|
||||
const sidebar = JSON.parse(fs.readFileSync(CWD + "/sidebar.json", "utf8"));
|
||||
const sidebar = JSON.parse(fs.readFileSync(CWD + "/sidebars.json", "utf8"));
|
||||
const versioned = {};
|
||||
|
||||
Object.keys(sidebar).forEach(sb => {
|
||||
|
@ -111,7 +111,7 @@ if (versionFallback.diffLatestSidebar()) {
|
|||
});
|
||||
|
||||
fs.writeFileSync(
|
||||
CWD + "/versioned_sidebars/version-" + version + "-sidebar.json",
|
||||
CWD + "/versioned_sidebars/version-" + version + "-sidebars.json",
|
||||
JSON.stringify(versioned, null, 2),
|
||||
"utf8"
|
||||
);
|
||||
|
|
|
@ -73,7 +73,7 @@ function execute() {
|
|||
|
||||
files = glob.sync(CWD + "/versioned_sidebars/*");
|
||||
files.forEach(file => {
|
||||
if (!file.endsWith("-sidebar.json")) {
|
||||
if (!file.endsWith("-sidebars.json")) {
|
||||
return;
|
||||
}
|
||||
sidebarContent = JSON.parse(fs.readFileSync(file, "utf8"));
|
||||
|
|
|
@ -3,8 +3,7 @@
|
|||
"Getting Started": [
|
||||
"installation",
|
||||
"site-preparation",
|
||||
"site-creation",
|
||||
"getting-started"
|
||||
"site-creation"
|
||||
],
|
||||
"Guides": [
|
||||
"navigation",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue