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

Support folder hierarchies and nested files in URLs without flattening them #670

Open
Tracked by #1106 ...
nthiery opened this issue Oct 13, 2023 · 2 comments
Open
Tracked by #1106 ...
Assignees
Labels
enhancement New feature or request

Comments

@nthiery
Copy link

nthiery commented Oct 13, 2023

When building a web site, nested file names are flattened and replaced
with slugs:

https://mystmd.org/guide/table-of-contents#nesting-of-files-in-urls

While I can see the value for the end-user (simple urls), there are use cases
where this is detrimental, as the nested file name actually carries semantic.

For example, in my course,
the name of a document, says /Solutions/Semaine3/foo.html tells that
this is a solution for notebook foo of week 3. While Devoirs/Semaine3/foo.html
is the original assignment. This also helps the user match the pages on the
web with the notebooks that they have dowloaded separately.

Proposal

Provide a configuration option flatten_filename=true/false, with true as default
value, to enable or disable flattening of file names.

Provide a configuration option 'transform_filename=true/false, with true` as default
value, to enable or disable file name transformation.

When both options are set to false, one recovers JupyterBook's behavior.

@nthiery nthiery added the enhancement New feature or request label Oct 13, 2023
@nthiery
Copy link
Author

nthiery commented Dec 16, 2023

I believe this is my last blocker for migrating my course notes to myst :-)

Next in line: a course starting in January:

https://nicolas.thiery.name/Enseignement/IntroScienceDonnees/

Thanks in advance!

@choldgraf
Copy link
Member

choldgraf commented May 22, 2024

Could I signal-boost this one? Is it a particularly complicated one to implement?

I ask because I think fixing this would be quite valuable: I think it is one of the only remaining "hard blockers" for any pre-existing users of Jupyter Book or Sphinx, given that currently, switching to MyST will break everybody's URLs.

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

No branches or pull requests

3 participants