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

Option for pretty (extension-less) routes #282

Open
nobkd opened this issue Jun 29, 2024 · 5 comments
Open

Option for pretty (extension-less) routes #282

nobkd opened this issue Jun 29, 2024 · 5 comments
Labels
improvement nuekit Related to nuekit package

Comments

@nobkd
Copy link
Collaborator

nobkd commented Jun 29, 2024

We have a file <project-root>/x.md which will currently get transformed to /x.html on the web.

Allow transformation to /x or /x/ by putting the resulting file to /x/index.html

@nobkd nobkd added improvement needs discussion Needs a discussion or decision labels Jun 29, 2024
@nobkd nobkd changed the title Option for extension-less routes Option for pretty (extension-less) routes Jul 17, 2024
@Korab-Doroci
Copy link

Wouldn't it be simpler to just have a tag in the frontmatter instead?

@nobkd
Copy link
Collaborator Author

nobkd commented Aug 10, 2024

Hmm. But what if I want that behavior for all pages, not just select ones?
Then I would have to add the resulting file path in the front matter of each file.
I can understand the pros of that approach, but that would be great to have additionally to the option for pretty links (where I don't have to care about the file extension of pages)

(it'll probably be hard enough to keep the paths to the assets of a page correct)

@nobkd nobkd added the nuekit Related to nuekit package label Aug 19, 2024
@Korab-Doroci
Copy link

I was thinking something like: "pretty_routes: true" in the site.yaml which would then apply to the whole site. You could also do it in each app.yaml.

@nobkd
Copy link
Collaborator Author

nobkd commented Aug 20, 2024

I was actually thinking the same and wanted a config option for site.yaml.
But I probably misunderstood, because of mentioning front-matter (which is yaml config at the start of a md page to my knowledge)

@Korab-Doroci
Copy link

Yes, I was unclear. I think this would be a great addition to Nue.

@nobkd nobkd removed the needs discussion Needs a discussion or decision label Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement nuekit Related to nuekit package
Projects
None yet
Development

No branches or pull requests

2 participants