tag pages, meta keywords

This commit is contained in:
Joshua Seigler 2025-06-21 18:50:15 -04:00
parent 04e4b0e51e
commit c008cedf7c
17 changed files with 61 additions and 15 deletions

View file

@ -26,7 +26,7 @@
<a class="{{ 'nav-active' if '/search' in page.url }}" href="{{ "/search/" | url }}">/search</a>
</div>
</nav>
<h1>{{ tag | capitalize if tag else title }}</h1>
<h1>{{ title }}</h1>
<div class="header-meta">
{%- if author -%}
<author>{{ author }}</author>

View file

@ -2,7 +2,7 @@
title: Joshua's Homepage
---
{%- set computedTitle = tag | capitalize if tag else title -%}
{%- set computedTitle = tag | capitalize if tag and not useTitle else title -%}
<!DOCTYPE html>
<html lang="en">
<head>
@ -19,6 +19,9 @@ title: Joshua's Homepage
<link rel="webmention" href="https://webmention.io/joshua.seigler.net/webmention"/>
<title>{{ computedTitle }} - {{ site.title }}</title>
<meta name="description" content="{{ description }}"/>
{%- if keywords -%}
<meta name="keywords" content="{{ keywords }}">
{%- endif %}
<meta property="og:title" content="{{ computedTitle }}"/>
<meta property="og:type" content="{{ article }}"/>
<meta property="og:url" content="{{ page.url | absoluteURL }}"/>

View file

@ -1,10 +1,10 @@
{% macro tagList(tags) %}
<span class="tags">
<span class="tags" style="--totalTags:{{ collections.categories | dictsort | length }}">
{%- for tag in tags -%}
<a
class="tag"
style="--tagIndex:{{ collections.categories[tag].id }}"
href="/posts/tag/{{ tag | slugify }}"
href="/tags/{{ tag | slugify }}"
>{{ tag }}</a>
{% endfor -%}
</span>

View file

@ -1,6 +1,6 @@
:root {
font-size: 16px;
font-size: clamp(14px, 8px + 0.65vw, 24px);
font-size: clamp(14px, 8px + 0.65vw, 30px);
box-sizing: border-box;
display: flex;
flex-direction: column;
@ -139,6 +139,7 @@ a[href] {
nav label:has(input:focus-visible),
nav label:has(input:checked) {
outline: none;
color: var(--c-text-dark);
background-color: var(--c-accent);
box-shadow:
0 0 0.5rem var(--c-accent),
@ -161,7 +162,7 @@ nav label:has(input:focus-visible) {
&::before {
content: "#";
}
color: oklch(var(--tag-luminance) 0.25 calc(222.5 * var(--tagIndex, 0)) / 0.8);
color: oklch(var(--tag-luminance) 0.25 calc(25 + 360 * var(--tagIndex, 0) / var(--totalTags, 1)) / 0.8);
}
main p img {