mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-02 16:29:47 +02:00
Add optional sidebar_title docs front matter field for sidebar titles distinct from document article titles
This commit is contained in:
parent
523d824651
commit
eccbc178e5
3 changed files with 20 additions and 7 deletions
|
@ -47,6 +47,11 @@ function execute() {
|
|||
|
||||
translations["localized-strings"][metadata.id] = metadata.title;
|
||||
translations["localized-strings"][metadata.category] = metadata.category;
|
||||
|
||||
if (metadata.sidebar_title) {
|
||||
translations["localized-strings"][metadata.sidebar_title] =
|
||||
metadata.sidebar_title;
|
||||
}
|
||||
}
|
||||
});
|
||||
/* look through header links for text to translate */
|
||||
|
@ -89,7 +94,6 @@ function execute() {
|
|||
});
|
||||
}
|
||||
});
|
||||
|
||||
writeFileAndCreateFolder(CWD + "/i18n/en.json", JSON.stringify(translations));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue