My old scheme was organically grown writing raw HTML and m4 macros. This was fun to do at the time, but I got sick of the fragile build system. One difference I’ve noticed between my old homegrown system and Zola is that I made heavy use of pages ending with .html, whereas Zola does not end webpages with .html. My intent was to preserve the directory and filename structure so previous links to my website across the internet don’t break.
I learned about
aliases in front-matter earlier today, but try as I might, I am unable to get aliases to work in at least two capacities:
My blog on my deployed website exists at (link limit)
https :// www . wdj-consulting . com / blog.html. Since I want to use the functionality, I use a Zola section to sort all the blog posts under
content/blog; sections do not have a concept of an alias, so I can’t map
To remedy this, I tried creating a
content/blog/index.mdwith a template that appends
render = falsein
content/blog/_index.md, but apparently the template doesn’t have access to
section.contentfor some reason (I don’t have an example of this to share, it’s possible I messed up setting this up properly).
I created a dummy
content/blog/hello.mdpost, which shows up under
blog/hello, since Zola creates an
index.html. I am unable to get Zola to generate a redirect with the following
I would expect a redirect from
http://127.0.0.1:1111/blog/hello, but Zola does not generate such a redirect and instead emits a 404.
Assuming I want to take advantage of Zola sections to automatically sort blog posts, and make sure that the remaining blog posts original locations are still valid (even via redirect), what options do I have to make Zola preserve my old directory structure?