A few Hugo tweaks

I wanted to be more selective about which posts are displayed at least until there is a way to control access on a post-by-post basis if that ever becomes possible (that seems unlikely as this would be an HTML function rather than a Hugo function). I added the below lines to the frontmatter of each post while I look for a way to determine which posts need a password and which ones are truly public.

type: code
layout: code
status: public

I also observed that the the default behaviour of the theme for archives and recent posts only included posts from the content/post directory while I have also added other directories for organisation purposes. The fix was to locate html files in layouts and layouts/partials with

(where .Site.RegularPages "Section" "posts")

in them which selects only the posts in a single section (directory) and adjust it to

(.Site.RegularPages)

which uses all pages under the content directory unless they are drafts. I'm going to try to use the ability to select posts per directory to make some private.

Previous Post Next Post