brad
November 20, 2014, 6:56pm
1
I’m trying to create an archive page for my blog at /blog/archive/ but I’m having trouble. I’m pretty sure the issue is the custom link structure:
permalinks:
blog: /blog/:year/:month/:day/:title/
is there a way in /content/blog/archive.html front matter to set a custom URL
brad
November 20, 2014, 7:01pm
2
nevermind figured it out:
in content/blog/archive.html just do:
---
url: "blog/archive"
---
brad
November 20, 2014, 8:09pm
3
Ok i did get that working however it’s treating that file as if it were a post in the blog archetype. i.e. it is in the list of output from:
{{ range (where .Site.Recent "Section" "blog") }}
{{ .Render "li" }}
{{ end }}
How can i prevent this?
bep
November 20, 2014, 8:14pm
4
If you use the latest dev-version (0.13-DEV) you could use:
{{ range (where .Site.Recent "Type" "blog") }}
(To be precise, .Site.Recent is replaced with .Site.Pages in the latest code, but both should work.)
And set “type: archive” (or whatever) on the archive pages.
This is from the top of my head and with no guarantees.
But type will override section (blog).
brad
November 20, 2014, 8:33pm
5
ah yes, adding “type: archive” removes it from the list. However, my new issue is that {{ }} tags are not parsed they are just spit out as plain text. How else would i be able to list out all the blog entries?