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

Feature Request: Completely portable site with no base_url used in any links #2814

Open
JoshOrndorff opened this issue Feb 25, 2025 · 1 comment

Comments

@JoshOrndorff
Copy link

JoshOrndorff commented Feb 25, 2025

I would like to build a site where every internal link is relative, including links to css, js, and other static assets.

This has many concrete usecases:

  • Publishing on IPFS where a user may use any arbitrary URL that happens to have an IPFS node running.
  • Serving the main site on a web server and keeping a mirror on Github Pages
  • Accessing the site via IP address when DNS hasn’t updated or is otherwise slow, broken, or inconvenient.
  • Host my site at my main URL, but also at my legacy URL that some people might still have bookmarked.
  • No longer need to use --base_url http://0.0.0.0:8000 when building for local testing.

I see this is asked for in the forum over the years also:
https://zola.discourse.group/t/using-for-base-url-doesnt-work-properly/2348
https://zola.discourse.group/t/leaving-base-url-empty/1585

@JoshOrndorff
Copy link
Author

IPFS documentation gives examples of publishing sites with several static generators. https://docs.ipfs.tech/how-to/websites-on-ipfs/static-site-generators/

This led me to discover Hugo's relativeURLs reature and Middleman's relative_links. This is exactly what I'm asking for in Zola.

Incidentally, those IPFS docs also mention a tool called all-relative that seems to convert sites created by VeuPress or Jekyll to have relative links. I hoped it might work for my zola site, but it doesn't.

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

1 participant