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

Force permalinks to be lowercase and replace space and '_' with '-' #35

Closed
choldgraf opened this issue Oct 26, 2018 · 3 comments
Closed

Comments

@choldgraf
Copy link
Collaborator

A common pattern in websites is to set all permalinks to be lowercase-with-hyphens. However since we're building permalinks from file paths, perhaps we don't want to force the files themselves to have this structure.

We could get around this by:

  1. Automatically re-directing from the lowercase-permalink structure to whatever the file path capitalization etc
  2. Automatically re-directing from whatever the file path capitalization is to lowercase-permalink (effectively forcing all pages to have a lowercase-permalink style URL.
  3. Not addressing this at all

Anyone have thoughts on that? (cc @SamLau95...one of the main reasons for this is because the Data 8 textbook has mixed these two patterns over the years)

@choldgraf
Copy link
Collaborator Author

(my preference is probably for number 1)

@SamLau95
Copy link
Collaborator

SamLau95 commented Oct 26, 2018

I think 1) is good.

It might be confusing for authors to create a file HelloWorld.ipynb and have it automatically translated to hello-world. I think the actual filename should become the canonical URL (HelloWorld, even if it looks odd) and any redirects should go to the canonical URL (hello-world -> HelloWorld).

@choldgraf
Copy link
Collaborator Author

we're now automatically redirecting links to pages from the sanitized URL, so that these will always work

choldgraf added a commit to choldgraf/jupyter-book that referenced this issue Apr 28, 2020
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

No branches or pull requests

2 participants