-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow subdirectories inside documentation folder #522
Conversation
@filkra Hi! Thank you for this PR. Sorry for the delay here - I am currently on vacation. I want to give this a real thorough review before approving/merging as this would be a very substantial change. I will look through this as I can while out, and then more when I get back. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is cool, I'm gonna try using this fork 😄
@@ -1,5 +1,6 @@ | |||
.DS_Store | |||
.vscode | |||
.idea |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be globally ignored on your machine to avoid polluting .gitignore, but same goes for the other ignored dirs above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree
"site-config" | ||
"api/commands", | ||
"api/doc-markdown", | ||
"api/api-pages", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be just api/pages
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, yes you're right. I will change it later this day. Thanks!
config.baseUrl + | ||
docsDir + | ||
'/' + | ||
language + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, thanks for your feedback! By default website you mean docusaurus.io? If so, /en/
already appears to be a part of the url (https://docusaurus.io/docs/en/installation.html).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@filkra sorry, I meant the website you get after you run docusaurus-init
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be more complicated than I thought... Using only useEnglishUrl
doesn't work since the /en/
part will also be inserted, if a languages.js
file exists. I ran docusaurus-init
and created a languages.js
file containing the following.
const languages = [
{
enabled: true,
name: "English",
tag: "en"
}
];
module.exports = languages;
useEnglishUrl
is set to false and the URL still contains /en/
. Is this the right behaviour?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@filkra Sorry for getting back to this so late. Could you rebase and update the branch? Will review this after that's done.
@@ -1,5 +1,6 @@ | |||
.DS_Store | |||
.vscode | |||
.idea |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree
Closing due to inactivity. Feel free to reopen or submit a new PR if necessary. |
Motivation
This feature was requested in #323.
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
Since the HTML output is now stored within subdirectories as well, I had to adjust a glob pattern. After this change all tests ran successfully.
Both the development server and the build output (served using Python's SimpleHTTPServer) reflect the desired result.
Changes
docs
and the document header'sid
field (or filename if theid
field is missing).Related Issues
Screenshots