-
Notifications
You must be signed in to change notification settings - Fork 123
Conversation
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 does seem like it would solve the problem 👍🏻
But tbh I found the code a bit hard to follow (esp. without context of the Docusaurus generated structure). So I created a branch which renames some of the vars and adds a bunch of comments: fix_trailing_slash_issue...comment_fix_trailing_slash_issue. Happy to merge this in if you think it's worth it.
Additionally, what do you think about renaming the files/set up code a bit so that it's clearer what the purpose of this is?
module.exports = function () { | ||
console.log("site plugin"); | ||
return { | ||
plugin: "site-plugin", |
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.
Maybe we could change this to be a bit more specific? I feel like it might trip us up in the future.
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.
Perhaps the file name too.
I tried this out locally and I don't think it's working for me... I did an For instance, on this page: http://localhost:3000/git/cli/lesson But if I go to this page: http://localhost:3000/git/cli/lesson/ I added some logging for the file copies, and it told me: This makes sense it's copying children into their parents, but it's not copying siblings of parents into children - it means that http://localhost:3000/git/cli/homework.html and http://localhost:3000/git/cli/homework/index.html both exist, but it doesn't change the fact that I looked at a few ways to maybe fix this which didn't involve replicating file trees, because having to replicate parents into children doesn't seem scalable... Some things I tried:
|
Fixes CodeYourFuture#121 See commentary in CodeYourFuture#254 (comment)
Closed in favour of #258 |
Fixes #121 See commentary in #254 (comment)
What does this change?
Fixes #121
Description
This fix is based on the recommendation from one of the Devs of Docusaurus. You can find it here
facebook/docusaurus#3372 (comment)
The code itself is based on a PR to the React Native website made by the same developer.
https://github.com/facebook/react-native-website/pull/2297/files#diff-4a18e8e52238979c642c1e995682a31bf24a19034400130511ac57b354c94297R1
I've tested with the two usecases in the Issue raised by @illicitonion and they both seem to be working well.
Who needs to know about this?
@illicitonion