mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-10 07:37:19 +02:00
[WIP] Allow custom subpath for docs within the "docs" folder
e.g., The default is `docs/*.md` This allows `docs/somedir/*.md` or `docs/somedir/anotherdir/*.md` Notes: - All URLs are still /docs/*.html (i.e. the subpath does not get preserved in the link). - Files in `translated_docs`, if any, will still only be one level - This should not affect translations or versioning
This commit is contained in:
parent
9f32a28d32
commit
dc0c1390c4
5 changed files with 24 additions and 12 deletions
|
@ -177,7 +177,7 @@ function execute(port) {
|
|||
}
|
||||
} else {
|
||||
if (metadata.language === "en") {
|
||||
file = CWD + "/../docs/" + metadata.source;
|
||||
file = CWD + "/../" + readMetadata.getDocsPath() + "/" + metadata.source;
|
||||
} else {
|
||||
file =
|
||||
CWD + "/translated_docs/" + metadata.language + "/" + metadata.source;
|
||||
|
@ -485,7 +485,7 @@ function execute(port) {
|
|||
// serve static assets from these locations
|
||||
app.use(
|
||||
siteConfig.baseUrl + "docs/assets/",
|
||||
express.static(CWD + "/../docs/assets")
|
||||
express.static(CWD + "/../" + readMetadata.getDocsPath() + "/assets")
|
||||
);
|
||||
app.use(
|
||||
siteConfig.baseUrl + "blog/assets/",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue