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 to generate relative URLs? #19

Closed
daboross opened this issue Nov 21, 2017 · 2 comments
Closed

Option to generate relative URLs? #19

daboross opened this issue Nov 21, 2017 · 2 comments

Comments

@daboross
Copy link

It would be nice to be able to publish a Leven blog as a sub-page on a website - so that using Leven wouldn't require a dedicated domain only for the blog.

I'm guessing this could be done either with a configuration option for Leven's "root path", or an option to never have absolute URLs?

My main reason for wanting this is to experiment with publishing Leven without having to redo existing pages or change top-level configuration. This would also be useful for demonstrating multiple configurations of a theme, or other demonstrations where having a domain-per-instance is not practical.

If this is already an option, could it be added to the documentation?

@quadrupleslap
Copy link
Collaborator

quadrupleslap commented Nov 22, 2017

Thanks for opening this issue! Right now Leven doesn't actually know what a URL is - it just passes slugs to templates. So there are a few options (ordered from my most favorite to least favorite):

  1. Make all URLs relative in templates.
  2. Add a custom config check within each template.
  3. Make Leven actually aware of URLs and add a URL property to each template and a separate config option to set the root of each URL.

Which option do you think is the best?

@daboross
Copy link
Author

Ah cool - that's not something I had thought of (this being theme dependent). I think this could just be solved by theme editing when needed.

Thank you!

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