-
Notifications
You must be signed in to change notification settings - Fork 21
Add support for extensionless URLs (pretty URLs) #274
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
Conversation
I am not sure this aids in keeping the docs simple for new contributors. Don't really have a full fledged opinion on this (yet) though need to mull it over a bit ⌛ |
Just to give some context: I was actually highly inspired by https://middlemanapp.com/advanced/pretty-urls/ generally, IMHO this is just the representation on the server. I assume developers or authors will not check the files on production and check if there is a 1-to-1 mapping. technically, I need to do this to simplify the the cloudfront lambda function and being able to just append |
This LGTM for the most part! I think we should make We now have quite a few places where we handle - folder: mover
children:
- file: first-page.md
- file: second-page.md Here |
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.
LGTM, we can address my feedback in a follow up PR.
Could you elaborate on this? I tried to understand this statement. but it looks like this works here https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/274/testing/mover/first-page/, if I compare it to the behaviour of https://elastic.github.io/docs-builder/testing/mover/first-page.html |
This should wait for #442 before being merged. |
Details
This will add support for extensionless URLs.
serve
commandE.g http://localhost:5000/migration/syntax.html becomes http://localhost:5000/migration/syntax
However, using
.html
extensions still works for backward compatibility.generate
commandIn the generate command, we change the file and folder structure to always have an index.html file for every page.
e.e
/migration/syntax.html
becomes/migration/syntax/index.html
.This way, we can strip the
/index.html
segment from the URL and still serve the correct file.an example of this is deployed at https://dwnz7p9ulv07a.cloudfront.net/migration/versioning