diff --git a/package.json b/package.json index 595bd28..3493c6a 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "astro": "^2.5.5", "astro-icon": "^0.8.0", "astro-imagetools": "^0.8.1", + "astro-seo": "^0.7.4", "autoprefixer": "^10.4.14", "chart.js": "^4.3.0", "chartjs-plugin-autocolors": "^0.2.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0d8b0ee..fab8d19 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -33,6 +33,9 @@ dependencies: astro-imagetools: specifier: ^0.8.1 version: 0.8.1(astro@2.5.5) + astro-seo: + specifier: ^0.7.4 + version: 0.7.4 autoprefixer: specifier: ^10.4.14 version: 10.4.14(postcss@8.4.24) @@ -3576,6 +3579,10 @@ packages: imagetools-core: 3.0.2 dev: false + /astro-seo@0.7.4: + resolution: {integrity: sha512-E+wJmxOnvBRjgzVctdGk/VdwoEqeQ6Q/KgVW2wRBXZWJVDgOweB32Da/UiH0/FpGncPzo2daOrc08DNn5wTanw==} + dev: false + /astro@2.5.5(@types/node@16.9.1)(sharp@0.32.1): resolution: {integrity: sha512-VRwnlfRtPALeOxfE4e7To5Vlu9pGwlTRWN1zkn1QTizwfg0rLirFTm6t2MCG/fUhlu/p3QO9tz8SpAIyDq53/Q==} engines: {node: '>=16.12.0', npm: '>=6.14.0'} diff --git a/src/content/journal/2023/shokunin.mdx b/src/content/journal/2023/shokunin.mdx index 7bb9159..8bb8132 100644 --- a/src/content/journal/2023/shokunin.mdx +++ b/src/content/journal/2023/shokunin.mdx @@ -1,5 +1,6 @@ --- title: Shokunin – The Spirit of an Artisan +slug: shokunin date: 2023-03-08 author: Stefan Imhoff description: The Japanese word “shokunin” describes an artisan or craftsman. In this essay, I investigate the meaning and history of the word and show a variety of examples. diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index f8fbc32..fc440ec 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -1,6 +1,8 @@ --- import '../styles/global.css'; import { Sprite } from 'astro-icon'; +import { SEO } from 'astro-seo'; +import { site } from '../data/site'; import ThemeProvider from '../components/ThemeProvider.astro'; import PageHeader from '../components/PageHeader.astro'; @@ -9,52 +11,142 @@ import Sal from '../components/Sal.astro'; export interface Props { backLink?: string; + cover?: string; description?: string; footer?: boolean; header?: boolean; + nofollow?: boolean; + noindex?: boolean; title: string; } -const { backLink, footer = true, header = true, title, description } = Astro.props; +const { + backLink, + description, + footer = true, + header = true, + nofollow, + noindex, + title, + cover = '/assets/images/branding/og/bonsai.jpg', +} = Astro.props; +const currentPath = new URL(Astro.request.url).pathname; +const fullTitle = `${title} · ${site.description}`; +const fullDescription = description || site.description; +const fullUrl = site.url + currentPath; +const fullImage = site.url + cover; ---
- - - - - -