feat(reading): clean and refactor routing for books -> reading to separate paths
This commit is contained in:
parent
8d9455940e
commit
d39c381f86
21 changed files with 51 additions and 89 deletions
|
@ -1,9 +1,9 @@
|
|||
---
|
||||
permalink: /books/index.php
|
||||
permalink: /reading/books/index.php
|
||||
type: dynamic
|
||||
schema: book
|
||||
---
|
||||
<a class="back-link" href="/books" title="Go back to the books index page">{% tablericon "arrow-left" %} Back to books</a>
|
||||
<a class="back-link" href="/reading" title="Go back to the reading index page">{% tablericon "arrow-left" %} Back to reading</a>
|
||||
<article class="book-focus">
|
||||
<div class="book-display">
|
||||
<img
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
title: Books
|
||||
description: Here's what I'm reading at the moment.
|
||||
permalink: "/books/index.html"
|
||||
permalink: "/reading/index.html"
|
||||
schema: books
|
||||
updated: "now"
|
||||
---
|
||||
|
|
|
@ -3,8 +3,8 @@ pagination:
|
|||
data: books.years
|
||||
size: 1
|
||||
alias: year
|
||||
permalink: "/books/years/{{ year.value }}/index.html"
|
||||
schema: books-year
|
||||
permalink: "/reading/years/{{ year.value }}/index.html"
|
||||
schema: reading-year
|
||||
---
|
||||
{%- assign bookData = year.data | filterBooksByStatus: 'finished' -%}
|
||||
{%- assign bookDataFavorites = bookData | findFavoriteBooks -%}
|
||||
|
@ -12,7 +12,7 @@ schema: books-year
|
|||
{%- assign currentYear = 'now' | date: "%Y" -%}
|
||||
{%- assign yearString = year.value | append: '' -%}
|
||||
{%- assign currentYearString = currentYear | append: '' -%}
|
||||
<a href="/books" class="back-link">{% tablericon "arrow-left" %} Back to books</a>
|
||||
<a href="/reading" class="back-link">{% tablericon "arrow-left" %} Back to reading</a>
|
||||
<h2 class="page-title">{{ year.value }} • Books</h2>
|
||||
{% if yearString == currentYearString %}
|
||||
<p>I've finished <mark>{{ bookData.size }} book{% unless bookData.size == 1 %}s{% endunless %}</mark> this year.{%- if favoriteBooks %} Among my favorites are {{ favoriteBooks }}.{%- endif -%}</p>
|
||||
|
|
|
@ -5,7 +5,7 @@ description: Search through posts and other content on my site.
|
|||
---
|
||||
|
||||
<h2 class="page-title">Search</h2>
|
||||
<p>You can find <a href="/posts">posts</a>, <a href="/links">links</a>, <a href="/music/#artists">artists</a>, genres, <a href="/watching#movies">movies</a>, <a href="/watching#tv">shows</a> and <a href="/books">books</a> via the field below (though it only surfaces movies and shows I've watched and books I've written something about). <a href="/tags">You can also browse my tags list</a>.</p>
|
||||
<p>You can find <a href="/posts">posts</a>, <a href="/links">links</a>, <a href="/music/#artists">artists</a>, genres, <a href="/watching#movies">movies</a>, <a href="/watching#tv">shows</a> and <a href="/reading">books</a> via the field below (though it only surfaces movies and shows I've watched and books I've written something about). <a href="/tags">You can also browse my tags list</a>.</p>
|
||||
{% render "blocks/top-tags.liquid"
|
||||
label:"Top tags"
|
||||
tags:topTags.tags
|
||||
|
|
|
@ -5,7 +5,7 @@ description: Some basic stats about my activity on this site.
|
|||
updated: "now"
|
||||
---
|
||||
<h2 class="page-title">Stats</h2>
|
||||
<p>I share the <a href="/music" class="music">music I listen to</a>, <a href="/music/concerts" class="concerts">concerts I attend</a>, <a href="/watching" class="tv">shows and movies I watch</a>, <a href="/books" class="books">books I read</a>, <a href="/posts" class="article">posts I write</a>, and <a href="/links" class="link">links I enjoy</a> on this site. I have some basic counts of each below.</p>
|
||||
<p>I share the <a href="/music" class="music">music I listen to</a>, <a href="/music/concerts" class="concerts">concerts I attend</a>, <a href="/watching" class="tv">shows and movies I watch</a>, <a href="/reading" class="books">books I read</a>, <a href="/posts" class="article">posts I write</a>, and <a href="/links" class="link">links I enjoy</a> on this site. I have some basic counts of each below.</p>
|
||||
<hr />
|
||||
<p class="music">I've listened to <mark>{{ stats.listen_count }} {{ stats.listen_count | pluralize: "track" }}</mark> by <mark>{{ stats.artist_count }} {{ stats.artist_count | pluralize: "artist" }}</mark> across <mark>{{ stats.genre_count }} {{ stats.genre_count | pluralize: "genre" }}</mark>.</p>
|
||||
<p class="concerts">I've been to <mark>{{ stats.concert_count }} {{ stats.concert_count | pluralize: "concert" }}</mark> at <mark>{{ stats.venue_count }} {{ stats.venue_count | pluralize: "venue" }}</mark>.</p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue