diff --git a/astro.config.mjs b/astro.config.mjs index c55c203..e842bf8 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -2,6 +2,7 @@ import { defineConfig } from 'astro/config'; export default defineConfig({ site: 'https://terminal-blog.example.com', + base: '/', trailingSlash: 'ignore', build: { format: 'directory' diff --git a/package.json b/package.json index c6c3f15..d2e0a36 100644 --- a/package.json +++ b/package.json @@ -14,5 +14,6 @@ "astro": "^5.2.5", "@astrojs/rss": "^4.0.1", "fuse.js": "^7.0.0" - } + }, + "packageManager": "pnpm@10.7.1+sha512.2d92c86b7928dc8284f53494fb4201f983da65f0fb4f0d40baafa5cf628fa31dae3e5968f12466f17df7e97310e30f343a648baea1b9b350685dafafffdf5808" } diff --git a/src/config.ts b/src/config.ts new file mode 100644 index 0000000..dcfe039 --- /dev/null +++ b/src/config.ts @@ -0,0 +1,4 @@ +export const siteConfig = { + title: '/var/log/mercury', + description: 'A blog about software development, technology, and life.', +} \ No newline at end of file diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 714219e..942d01f 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -2,13 +2,18 @@ import '../styles/global.css'; import Search from '../components/Search.astro'; import ThemeSwitcher from '../components/ThemeSwitcher.astro'; +import { siteConfig } from "../config"; interface Props { title: string; path?: string; } -const { title, path = "~/grassblock/micr0blog" } = Astro.props; +const defaultTitle = siteConfig.title +const formattedPath = defaultTitle.toLowerCase().replace(/\s+/g, '-'); + +const { title, path = formattedPath } = Astro.props; +// TODO: make the path dynamic --- diff --git a/src/pages/blog.astro b/src/pages/blog.astro index da0a00f..2069217 100644 --- a/src/pages/blog.astro +++ b/src/pages/blog.astro @@ -6,7 +6,7 @@ const posts = await getCollection('blog'); posts.sort((a, b) => new Date(b.data.pubDate).getTime() - new Date(a.data.pubDate).getTime()); --- - +

~/blog

@@ -25,15 +25,15 @@ posts.sort((a, b) => new Date(b.data.pubDate).getTime() - new Date(a.data.pubDat {posts.length === 0 && ( <>

- 2025-06-08 + 2025-06-08 My Terminal Setup

- 2025-06-05 + 2025-06-05 The Art of Minimalism

- 2025-06-01 + 2025-06-01 First Post

diff --git a/src/pages/lab.astro b/src/pages/lab.astro index 92e806f..6f66dea 100644 --- a/src/pages/lab.astro +++ b/src/pages/lab.astro @@ -2,7 +2,7 @@ import Layout from '../layouts/Layout.astro'; --- - +

~/lab

diff --git a/src/styles/global.css b/src/styles/global.css index 6b8f2f3..eaf49e8 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -89,6 +89,11 @@ main { font-size: 1.1rem; } +.nav a::before { + content: "./"; + opacity: 0.7; +} + .cursor { display: inline-block; width: 0.6em;