I’ve been using Hugo for a while and it’s great, but I’ve noticed that when my HTML pages are generated, it seems like the tags at the bottom of the page are going to example.com instead of example.com/path (to use an example domain), which is what my
baseURL is configured with.
Here’s some background, my configuration looks like:
baseURL = "https://writequit.org/book/" ... # Enable tags. [taxonomies] tag = "tags"
I can go to
https://writequit.org/book/tags and see the tags no problem. However, on any particular tag at the bottom of a post (let’s use
architecture as an example), clicking on the tag links to
https://writequit.org/tags/architecture instead of
https://writequit.org/book/tags/architecture, so the link goes to a 404.
I’ve tried searching but I’m not sure how to get the tag links to use the
baseURL instead of just the domain name.
Here’s my full
config.toml, in case it’s helpful:
baseURL = "https://writequit.org/book/" languageCode = "en-us" title = "Commonplace Book" theme = "ananke" [params] # Blog subtitle which appears below blog title. Supports markdown. # subtitle = "[ezhil](https://github.com/vividvilla/ezhil) theme" # Number of posts to show in recent posts list (Optional). Defaults to 10. recentPostsCount = 10 # Content types which are excluded from recent posts and archive page (Optional). Defaults to ["page"] excludedTypes = ["page"] # Content types which are excludes Disqus comments (Optional). Defaults to ["page"] disableDisqusTypes = ["posts"] # If social media links are enabled then enable this to fetch icons from CDN instead of hosted on your site. featherIconsCDN = false # Main menu which appears below site header. [[menu.main]] name = "Home" url = "/posts" weight = 1 [[menu.main]] name = "All posts" url = "/posts" weight = 2 [[menu.main]] name = "About" url = "/about" weight = 3 [[menu.main]] name = "Tags" url = "/tags" weight = 4 # Social media links which shows up on site header. # Uses feather icons for icons. You can [search icon names from here](https://feathericons.com/). [[params.social]] name = "Github" icon = "github" url = "https://github.com/dakrone" [[params.social]] name = "Twitter" icon = "twitter" url = "https://twitter.com/thnetos" [[params.social]] name = "RSS" icon = "rss" url = "https://writequit.org/book/index.xml" # Enable tags. [taxonomies] tag = "tags"