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

Why is baseurl required not to be empty? #2109

Closed
victorbnl opened this issue Feb 19, 2023 · 3 comments
Closed

Why is baseurl required not to be empty? #2109

victorbnl opened this issue Feb 19, 2023 · 3 comments

Comments

@victorbnl
Copy link

(sorry for deleting the issue template it just doesn't fit here)

I have a zola project that builds an HTML that is never going to be a website. Basically I'll just open the html file locally. In that case, why can't I just have this in my config?

baseurl = ""

Of course I can put something random in the baseurl variable and it works, but it doesn't make much sense.

@victorbnl victorbnl changed the title Why is baseurl required to be non-empty? Why is baseurl required not to be empty? Feb 19, 2023
@Keats
Copy link
Collaborator

Keats commented Feb 19, 2023

Well this is a static site generation tool and most sites have a URL. Some do not but they are the tiny minority and feeds will not work without a valid url.

Semi-duplicate of #2089 so closing.

@Keats Keats closed this as completed Feb 19, 2023
@c-git
Copy link
Contributor

c-git commented Mar 22, 2023

@victorbnl

I also use a site that I generate locally and for that I use the path on my machine so that links are still correct for example file:///home/user/mysite/docs/. Some themes (like EasyDocs and abridge) also support links with the index.html on the end, which they call ugly urls, that will work instead of bringing you to the folder. Inter page links I still use the normal zola format because the verification that they are not broken is worth more to me than a relative link that would still work if I change to use a webserver.

PS. I use Firefox on linux not sure if it's different on other browsers or OS.

@victorbnl
Copy link
Author

Clever indeed, 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

3 participants