mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-11 08:07:26 +02:00
Allow document not in sidebar.json to be displayed
This commit is contained in:
parent
3eb667cd32
commit
09ca732402
2 changed files with 16 additions and 10 deletions
|
@ -123,18 +123,20 @@ function processMetadata(file) {
|
|||
const order = readSidebar();
|
||||
const id = metadata.localized_id;
|
||||
|
||||
metadata.sidebar = order[id].sidebar;
|
||||
metadata.category = order[id].category;
|
||||
if (order[id]) {
|
||||
metadata.sidebar = order[id].sidebar;
|
||||
metadata.category = order[id].category;
|
||||
|
||||
if (order[id].next) {
|
||||
metadata.next_id = order[id].next;
|
||||
metadata.next = language + "-" + order[id].next;
|
||||
if (order[id].next) {
|
||||
metadata.next_id = order[id].next;
|
||||
metadata.next = language + "-" + order[id].next;
|
||||
}
|
||||
if (order[id].previous) {
|
||||
metadata.previous_id = order[id].previous;
|
||||
metadata.previous = language + "-" + order[id].previous;
|
||||
}
|
||||
}
|
||||
if (order[id].previous) {
|
||||
metadata.previous_id = order[id].previous;
|
||||
metadata.previous = language + "-" + order[id].previous;
|
||||
}
|
||||
|
||||
|
||||
return { metadata, rawContent: rawContent };
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue