~jcc/hugo-site

bccdd386b2abf522cdbffd46360d29414a36fbd3 — Jason Cox 2 months ago b32b1f7
Make book rating stuff more general

Use fewer front matter fields.
M config.yaml => config.yaml +6 -0
@@ 21,3 21,9 @@ ignoreErrors:
services:
  rss:
    limit: 25

permalinks:
  taxonomy:
    book-ratings: /reading/by-rating/
  term:
    book-ratings: /reading/by-rating/:slug/

M content/book-ratings/_index.md => content/book-ratings/_index.md +0 -8
@@ 1,11 1,3 @@
---
title: Reading (by rating)
url: /reading/by-rating
show_pre_title: true
nav_section: reading
nav_is_section: true
---

Below is a list of books I've read, grouped by how I rated them. I use a simple rating system, categorizing each book as [great](#great), [good](#good), [okay](#okay), or [bad](#bad).

You can also check out the [main reading page](/reading/) to view them in chronological order. (There's a little chart showing my reading over time, too.)

M content/book-ratings/bad/_index.md => content/book-ratings/bad/_index.md +1 -4
@@ 1,7 1,4 @@
---
title: bad
weight: 4
title: Reading (rated bad)
show_pre_title: true
nav_section: reading
url: /reading/by-rating/bad
---

M content/book-ratings/good/_index.md => content/book-ratings/good/_index.md +1 -4
@@ 1,7 1,4 @@
---
title: good
weight: 2
title: Reading (rated good)
show_pre_title: true
nav_section: reading
url: /reading/by-rating/good
---

M content/book-ratings/great/_index.md => content/book-ratings/great/_index.md +1 -4
@@ 1,7 1,4 @@
---
title: great
weight: 1
title: Reading (rated great)
show_pre_title: true
nav_section: reading
url: /reading/by-rating/great
---

M content/book-ratings/okay/_index.md => content/book-ratings/okay/_index.md +1 -4
@@ 1,7 1,4 @@
---
title: okay
weight: 3
title: Reading (rated okay)
show_pre_title: true
nav_section: reading
url: /reading/by-rating/okay
---

M layouts/_default/baseof.html => layouts/_default/baseof.html +4 -3
@@ 36,7 36,7 @@
    <div id="page">
      <main id="main" tabindex="-1">
        <h1>
          {{ if (or .IsSection .Params.show_pre_title) }}
          {{ if (or .IsSection (eq .Kind "taxonomy" "term"))}}
          <span class="pre-title"><a href="/">Jason</a>'s</span>
          {{ end }}
          {{ .Render "page-title" }}


@@ 61,10 61,11 @@
        <h2>Looking for more?</h2>
        <p>
          {{ $sections := slice "reading" "writing" "creations" }}
          {{ $curSection := default .Section .Params.nav_section }}
          {{ $curSection := .Section }}
          {{ if (hasPrefix .RelPermalink "/reading/") }}{{ $curSection = "reading" }}{{ end }}
          {{ $past := dict "reading" "read" "writing" "written" "creations" "created" }}

          {{ if (or .IsSection .Params.nav_is_section) }}
          {{ if (or .IsSection (eq .Kind "taxonomy")) }}
          Check out my
          {{ else }}
          See what else I've <a href="{{ printf "/%s/" $curSection }}">{{ index $past $curSection }}</a>, or check out my

A layouts/book-ratings/page-title.html => layouts/book-ratings/page-title.html +1 -0
@@ 0,0 1,1 @@
Reading {{ with .Data.Term }}(rated {{ . }}){{ else }}(by rating){{ end }}