-
Notifications
You must be signed in to change notification settings - Fork 133
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
Create relative links only #133
Comments
@fte378 apologies for the late reply. The distributed web is a good thing and I support your exploration in that area, but I have been thinking about this a little bit in the theme context and I'm still unsure. When building the theme I consciously used the $ grep -rsI absURL layouts/*
layouts/_default/single.html: "url": {{ . | absURL }}
layouts/_default/baseof.html: <h1 class="blog-title" dir="auto"><a href="{{ .Site.BaseURL | absURL }}" rel="home">{{ .Site.Title | safeHTML }}</a></h1>
layouts/partials/sidebar.html: <li><a href="{{ .URL | absURL }}">{{ .Name }}</a></li>
layouts/partials/cookie-consent.html: policyUrl: {{ . | absURL }},
layouts/robots.txt:Sitemap: {{ "sitemap.xml" | absURL }} Curiously the 404 template uses $ grep -rsI relURL layouts/*
layouts/404.html: <p>Page not found. Go back <a href="{{ "/" | relURL }}">home</a>.</p> How does the site-wide |
The places where absUrl is used are not touched again by Hugo. I had to replace them. I even wrote an article about it (German but I think it's understandable even through a translator): I also used absolute URLs a lot to avoid confusion and downgrading in search engines but I got to a state of mind where I don't care anymore about search engines. Good content eventually wins even when it does nothing regarding SEO. For me the possibility to "mount" the blog at any URL (including offline use) is a plus. For the conversion I had to remove the SEO stuff from the headers - there were some things (I think with the images) which I could not get to generate relative URLs. The problem with the theme is that other users may have completely opposite views about the topic. Regards, Frank |
The distributed web slowly becomes a reality and that's good in my opinion when you take the current hysteria and the rise of censorship into account.
I'm currently in the process of converting my blog so that it will be usable on IPFS (https://ipfs.io/).
The main problem is converting all links to be relative to the current page.
In general this can be done with
relativeURLs = true
in config.toml but:What are the advantages of relative URLs?
What's your opinion? Is it worth to go this direction with the theme?
I personally end up overwriting most of the theme but I'm o.k. with this.
The text was updated successfully, but these errors were encountered: