-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Adds a new binary_dirs
key to mkdocs.yml (#2662)
#3569
Conversation
… file copy during serve by using junctions and symbolic links instead (mkdocs#2662)
…ails on GitHub actions
means that a page named 'foo/bar.md' will have its edit link lead to: | ||
means that a page named 'foo/bar.md' will have its edit link lead to: |
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.
Done by your editor? It shouldn't, two trailing spaces mean <br>
.
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.
Yes, it's set to trim trailing whitespaces to make diffs easier. I didn't know about this, thanks! Other Markdown processors I've used take an empty line to be a new paragraph, like so:
* Item one, line one.
Item one, line two.
* Item two.
I'll keep the trailing spaces in mind going forward with MKDocs.
`edit_uri` can actually be just an absolute URL, not necessarily relative to `repo_url`, so this can achieve the same result: | ||
`edit_uri` can actually be just an absolute URL, not necessarily relative to | ||
`repo_url`, so this can achieve the same result: |
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.
Same, probably done by your editor? Please revert and avoid changing irrelevant lines 🙂
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.
Ah the 80-col line wrap was manual, as it was clear the rest of the file was following that standard apart from some stragglers.
As this PR has been closed, I'll keep things to just the relevant changes for future work.
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.
For context: 80-col wrap used to be mandatory but now is discouraged. I just didn't want to drop the wrapping everywhere and thus lose meaningful edit history. But in any case yes, unrelated changes should be avoided.
Hi. This type of solution will not be the one to move forward with, because there are clearly better solutions, such as telling the live server to look at the files' original locations without symlinks. Please let's focus on use cases and ideas, not jumping to an implementation. |
No problem. I needed an immediate solution so I could progress on my own project, and thought I'd share. Thanks for the feedback. |
A potential approach to solving #2662.
Directories listed in the
binary_dirs
key bypass file copy duringserve
by using junctions and symbolic links. Files inbinary_dirs
are still copied duringbuild
.See
binary_dirs
indocs/user-guide/configuration.md
for full capability.I'm not up to speed on writing tests or completely familiar with the MKDocs structure, so consider this a way to continue the discussion around the viability of the feature.