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

Absolute URLs in the list of posts #115

Closed
gp-dublincentral opened this issue Mar 7, 2019 · 2 comments · Fixed by #156
Closed

Absolute URLs in the list of posts #115

gp-dublincentral opened this issue Mar 7, 2019 · 2 comments · Fixed by #156

Comments

@gp-dublincentral
Copy link

If you have defined a baseurl in config.toml then https://github.com/netlify-templates/one-click-hugo-cms/blob/master/site/layouts/_default/li.html will write absolute URLs in the hrefs.

Not wrong but makes testing across different environments trickier.

Is there a reason why .Permalink is being used instead of .RelPermalink to write the links?

@numbfall
Copy link

numbfall commented Mar 8, 2019

I have noticed this as well. On my other Hugo projects, setting baseURL does not affect .Permalink address. Hugo automatically swaps it to localhost addresses.

My best guess is that this is a Hugo Server feature and one-click-hugo-cms is using gulp server and watch tasks instead of hugo server command.

Anyways, I use .RelPermalink in li.html and do not have any problems with it.

@erquhart
Copy link
Contributor

Will take a PR for this 👍

erquhart pushed a commit to erquhart/one-click-hugo-cms that referenced this issue Jul 16, 2019
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

Successfully merging a pull request may close this issue.

3 participants