"blog" vs "post" in url #81
johngoldin
started this conversation in
General
Replies: 1 comment 1 reply
-
Is this is your first venture into a new Hugo theme? I ask because I'm wondering if you tried permalinks? In your
In a Hugo theme, the folder structure is by design part of the theme, so your pain isn't specific to this theme (based on what you posted above). You can read more about permalinks here: https://gohugo.io/content-management/urls/ |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am converting from an existing blog done with Beautiful Hugo theme. The blog posts are in content/post rather than in content/blog. In the apéro converted version, I have it so that it finds blog posts in post rather than blog. I did that so that the URLs for those posts would be the same after the conversion.
I put the following in config:
[[menu.header]]
name = "Blog"
title = "Blog"
url = "/post/"
I also changed content/blog/_index.md so that it reads:
sidebar:
text_link_label: View recent posts
text_link_url: /post/
So selecting the heading "Blog" takes me to the post url's, but I am learning that there are other side effects. For example, in content/about/main/index.md, the lines
number_featured: 1 # pulling from mainSections in config.toml
number_categories: 3 # set to zero to exclude
pull in an item from the blog and use blog in the url. Of course it doesn't find the items in the "post" folder.
Conclusion: I should stop fighting the apéro folder structure. Resistance is futile. Instead I will move my old posts to the "blog" folder and learn to use Netlify redirects to have my Beautiful Hugo url's go to the new "blog" url's. I probably want to combine one or two of my old posts into a series so I would have to do redirects for those posts anyway.
While I'm at it, I'd like to add that I'm finding the process of working through what I need to do to convert to be very interesting. It's going fairly well. I've had to add a bunch of images, which is a good thing. I learned how to make a favicon, I made an audio file to say my name, and the process is turning out to be a fun adventure.
Beta Was this translation helpful? Give feedback.
All reactions