diff --git a/package.json b/package.json index 55ccc44..50c83be 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,10 @@ "kill": "kill $(ps -ef | grep '[n]pm exec @11ty/eleventy --serve' | awk '{print $2}')", "test": "echo \"Error: no test specified\" && exit 1", "clean": "npx rimraf dist public", - "dev": "npm run clean && open=true npx @11ty/eleventy --serve", - "build": "npm run clean && npx @11ty/eleventy && cp -r ./dist/ ./public" + "search": "npx pagefind --site dist", + "eleventy": "npm run clean && npx @11ty/eleventy && npm run search", + "dev": "npm run eleventy && open=true npx @11ty/eleventy --serve", + "build": "npm run eleventy && cp -r ./dist/ ./public" }, "devDependencies": { "@bryanfriedman/eleventy-plugin-html-relative-datacascade": "0.1.5", diff --git a/src/_includes/head.njk b/src/_includes/head.njk index 600da53..a9aba0e 100644 --- a/src/_includes/head.njk +++ b/src/_includes/head.njk @@ -45,14 +45,17 @@ -{# Preload only the hero image needed for this page to avoid wasted bandwidth #} {% if page.url and (page.url | lower | slice(0,6)) == "/about" %} {% else %} {% endif %} -{{ (title or metadata.title) | addDevPrefix }} +{% set pageTitle = title or metadata.title %} +{% if layout == "post.njk" and title %} + {% set pageTitle = metadata.title ~ " - " ~ title %} +{% endif %} +{{ pageTitle | addDevPrefix }} {# Minimal critical styles to avoid flash of default blue/unstyled content before async CSS loads #}