Skip to content
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

Closed
wants to merge 5 commits into from

Conversation

unexpectedpanda
Copy link

A potential approach to solving #2662.

Directories listed in the binary_dirs key bypass file copy during serve by using junctions and symbolic links. Files in binary_dirs are still copied during build.

See binary_dirs in docs/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.

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:
Copy link
Sponsor Contributor

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>.

Copy link
Author

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.

Comment on lines -106 to +107
`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:
Copy link
Sponsor Contributor

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 🙂

Copy link
Author

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.

Copy link
Contributor

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.

@oprypin
Copy link
Contributor

oprypin commented Feb 12, 2024

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.

@oprypin oprypin closed this Feb 12, 2024
@unexpectedpanda
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants