Hugo Redirect From Post in One Section to Another

Problem I have a post in one section of my site, say notes and miscellanea That is my canonical post. But I also need it to show up in the work section of my site, possibly with a another name. A Hugo alias in the yaml front matter does not work, since both sections exist and Hugo gets confused. Solution Make sure layouts/redirect/single.html exists within your Hugo folder structure and it contains just this line … {{- template "alias.html" (dict "Permalink" .Params.target) -}} Create your orginal post as usual Then go create a post in your other1 section with the following metadata: --- title: <Your title here> #date autogenerated by my archetype. if missing, add date date: 2025-11-06T08:30:54+05:30 type: redirect target: <url-to-redirect-to> summary: <Optional text, that will appear in the sectiones listing page> --- The date field is critical. The post might not appear where you expect it, if it’s absent. If not date, then you might need to use weight. One of the two is needed. In my case, the metadata looked like this: --- title: "The Plan for My New Hetzner VM" date: 2025-11-06T08:30:54+05:30 type: redirect target: /nm/2025-11-06/ summary: Alone and helpless, like you've lost your fight --- Done! You can see an entry for “The Plan for My New Hetzner VM” in my work section as you see in the pic below. Clicking that will redirect to the actual post in my Notes and Miscellanea section! Tada 🎉 Feedback on this post? Mail me at feedback at this domain or continue the discourse here. P.S. Subscribe to my mailing list! Forward these posts and letters to your friends and get them to subscribe! ...

November 6, 2025 · Mario Jason Braganza

Forgejo Workflow Action to Publish Hugo Blog

Trying to publish on a schedule

June 9, 2025 · Mario Jason Braganza

Hack Hugo Post Metadata With Python

Adding alias urls to my blog posts

February 3, 2025 · Mario Jason Braganza

Tmux Start Session Maximized With Three Panes

New short ritual to get my writing sessions going

February 1, 2025 · Mario Jason Braganza

Notes Now Has No RSS Feed

Finally figured out how to disable RSS feeds on a post by post basis. I needed to do this for my stream of consciousness / wip / progress notes in the Notes and Miscellanea section I did not want to disable the whole section, because some posts, I do want to leak out. What it boiled down to was getting the RSS template to ignore sites with some parameter set in the front matter. Most posts on the web do a rss_disabled: true or something to that effect. ...

January 4, 2025 · Mario Jason Braganza

Some Site Housekeeping (New Sections and RSS Feeds)

The blog is dead! Love live the new sections!

September 14, 2024 · Mario Jason Braganza