I’ve moved our blog from WordPress to Hugo and Github pages and I’m still in the process of cleaning things up. I’ve been going through the Googlebot errors and I’m missing http://blog.sensr.net/archives
I can’t seem to figure out how to create this. I see that on http://spf13.com/post/ there is a nice page with all the blog posts. I’ve cloned the git repo but can’t figure out what is generating this page.
layouts/post/summary.html seems to generate the homepage…
content/post/ doesn’t seem to have an index.html so that’s not where this is created.
the data from /post/ comes from list.html file in your theme.
for /archives , create content/archives.md with layout=‘archive’ and create a file layout/archive.html . Copy the content from your theme/_default/list.html to copy the same content and use .Site.Posts to loop through your archives
I feel that there should be a cleaner way to do this as well. I don’t know if aliases work on index.md or index.html files.
A couple different ways, but first, I want to make sure you aren’t asking about how spf breaks up the blog posts by year. This assumes you are trying to group by publish date rather than date, but here is the basic idea:
Now, if you want to create a specific page (ie, www.yoursite.com/archives/), you’re going to have to create a separate layout for that and a separate file.
For example, for all my single pages (eg, /about, /colophon,/contact), I created a content directory called: content/singles. Then create “layouts/singles” and create a new layout at “layouts/singles/archives.html”. Now when you create a document at “content/singles/archives.md”, just put the following in your front matter:
@adamb I tried a pull request but I guess you’re not accepting them Keep in mind there is more than one way to do what I’m about to show you.
The following changes will you get almost to where you want to be, but you’re probably going to want to fiddle with the presentation (ie, css).
Change your config.toml. Note the addition of singles. With this, you can remove the slug from archives.md altogether. Keep in mind that the “singles” directory is just my preference. I think you might more commonly see “pages” or “page”.
post = "/:year/:month/:slug/"
page = "/:slug/"
singles = "/:title/"
New layouts/singles/archives.html. This assumes you want to group by month. If you want to group by something else, look at the docs for grouping content.