Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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

Use relative links #78

Closed
xeruf opened this issue Sep 3, 2022 · 5 comments
Closed

Use relative links #78

xeruf opened this issue Sep 3, 2022 · 5 comments

Comments

@xeruf
Copy link
Contributor

xeruf commented Sep 3, 2022

The links to the CSS & co, even on the homepage, start with / which means you can't easily have a look at the HTML locally by opening the files, you need to spin up a webserver.

@novoid
Copy link
Owner

novoid commented Sep 7, 2022

I think I remember some issues with relative links and the validator (or similar) which caused me to switch from relative to absolute links.

I'm sorry, this won't change.

@novoid novoid closed this as completed Sep 7, 2022
@xeruf
Copy link
Contributor Author

xeruf commented Sep 16, 2022

okay, I could partially fix this by removing the BASE_URL in the config :)

@novoid
Copy link
Owner

novoid commented Sep 18, 2022

okay, I could partially fix this by removing the BASE_URL in the config :)

Is there some learning I should add to the README for others in your situation? Maybe you could provide a few lines explaining your approach? Thanks @xeruf

@xeruf
Copy link
Contributor Author

xeruf commented Sep 18, 2022

Sure!

If your site resides on the root of your domain, you can easily compile it in a domain-independent way by removing the BASE_URL prefix for the CSS and LOGO path, for example:

CSS_URL = '/public_voit.css'
BLOG_LOGO = '/images/public-voit_logo.svg'

Then you can use for example caddy to preview the blog locally by issuing sudo caddy file-server from the compilation directory (/tmp/lazyblorg/blog by default).

@novoid
Copy link
Owner

novoid commented Sep 19, 2022

Thanks, I just linked it in the README.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants