mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-17 19:16:58 +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
|
@ -65,7 +65,7 @@ const versionFolder = CWD + "/versioned_docs/version-" + version;
|
|||
mkdirp.sync(versionFolder);
|
||||
|
||||
// copy necessary files to new version, changing some of its metadata to reflect the versioning
|
||||
let files = glob.sync(CWD + "/../docs/*");
|
||||
let files = glob.sync(CWD + "/../" + readMetadata.getDocsPath() + "/*");
|
||||
files.forEach(file => {
|
||||
const ext = path.extname(file);
|
||||
if (ext !== ".md" && ext !== ".markdown") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue