Site Explanation

I have slightly modified the website to customise the menu and post display slightly. It was actually surprisingly easy.

Initially, I wanted to add two post types (blog post and project), and have the sidebar menu display both as separate categories, with a sublist showing the actual items (to limit the number when (if) I write enough of them to merit it).

This was very simple, literally a matter of adding another iteration over the menu types themselves after the initial iteration over the menu entries of the “main” menu.

{{ range $index, $element := .Site.Menus }}
    {{ if not ( eq $index "main" )}}
        {{ $index }}
      <ul class="submenu-nav">
        {{ range $entry := $element }}
          <li><a href="{{.URL}}"> {{ .Name }} </a></li>

Easily done. Next was a simple modification of the main page to only display posts on the index page that are in the “Blog” category (not menu). This’ll allow me to have blog posts that double as projects, even temporarily.

{{ range .Data.Pages }}
	{{ if in .Params.categories "Blog" }}
	<div class="post">
	  <h1 class="post-title">
	    <a href="{{ .Permalink }}">
	      {{ .Title }}

	  <span class="post-date">{{ .Date.Format "Mon, Jan 2, 2006" }}</span>

	  {{ .Content }}
	{{ end }}
{{ end }}