diff --git a/astro.config.mjs b/astro.config.mjs index 510af0b..fd01b53 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -11,12 +11,18 @@ import sitemap from '@astrojs/sitemap'; // https://astro.build/config export default defineConfig({ - integrations: [tailwind(), mdx(), sitemap()], + integrations: [ + tailwind({ + applyBaseStyles: false, + }), + mdx(), + sitemap(), + ], markdown: { shikiConfig: { theme: 'nord', wrap: true, }, }, - site: 'https://www.einenlum.com', + site: 'https://www.einenlum.com/', }); diff --git a/package.json b/package.json index b29517f..03f05d8 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "scripts": { "dev": "astro dev", "start": "astro dev", - "build": "astro build", + "build": "astro build && pagefind", "preview": "astro preview", "astro": "astro" }, @@ -16,6 +16,7 @@ "@astrojs/sitemap": "^2.0.0", "@astrojs/tailwind": "^4.0.0", "astro": "^2.8.5", + "pagefind": "^0.12.0", "tailwindcss": "^3.3.3" } } diff --git a/pagefind.yml b/pagefind.yml new file mode 100644 index 0000000..1a69580 --- /dev/null +++ b/pagefind.yml @@ -0,0 +1,2 @@ +source: dist +bundle_dir: _pagefind diff --git a/src/components/article-header.astro b/src/components/article-header.astro index 1c40a28..83101a2 100644 --- a/src/components/article-header.astro +++ b/src/components/article-header.astro @@ -8,5 +8,5 @@ const { publishedAt, title } = Astro.props as Props; ---

{title}

-

{publishedAt.toDateString()}

+

{publishedAt.toDateString()}

diff --git a/src/components/header.astro b/src/components/header.astro index d4b74cb..5975637 100644 --- a/src/components/header.astro +++ b/src/components/header.astro @@ -5,13 +5,14 @@ const elements = [ { text: 'Blog', path: '/' }, { text: 'Book', path: '/book' }, { text: 'About', path: '/about' }, + { text: 'Search', path: '/search' }, ] ---
-

Einenlum.

+
Einenlum.