Compare commits
3 commits
534abd91e3
...
35ef2c7a9a
Author | SHA1 | Date | |
---|---|---|---|
|
35ef2c7a9a | ||
|
fac160dc35 | ||
|
4abfef69d3 |
7 changed files with 23 additions and 7 deletions
|
@ -2,6 +2,7 @@ import { defineConfig } from 'astro/config';
|
|||
|
||||
export default defineConfig({
|
||||
site: 'https://terminal-blog.example.com',
|
||||
base: '/',
|
||||
trailingSlash: 'ignore',
|
||||
build: {
|
||||
format: 'directory'
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
|
|
4
src/config.ts
Normal file
4
src/config.ts
Normal file
|
@ -0,0 +1,4 @@
|
|||
export const siteConfig = {
|
||||
title: '/var/log/mercury',
|
||||
description: 'A blog about software development, technology, and life.',
|
||||
}
|
|
@ -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
|
||||
---
|
||||
|
||||
<!doctype html>
|
||||
|
|
|
@ -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());
|
||||
---
|
||||
|
||||
<Layout title="Blog | Terminal Blog" path="~/grassblock/micr0blog/blog">
|
||||
<Layout title="Blog | Terminal Blog">
|
||||
<h1 class="post-title">~/blog</h1>
|
||||
|
||||
<div class="post-content">
|
||||
|
@ -25,15 +25,15 @@ posts.sort((a, b) => new Date(b.data.pubDate).getTime() - new Date(a.data.pubDat
|
|||
{posts.length === 0 && (
|
||||
<>
|
||||
<p>
|
||||
<span style="color: var(--terminal-yellow);">2025-06-08</span>
|
||||
<span style="color: var(--terminal-yellow);">2025-06-08</span>
|
||||
<a href="/blog/terminal-setup">My Terminal Setup</a>
|
||||
</p>
|
||||
<p>
|
||||
<span style="color: var(--terminal-yellow);">2025-06-05</span>
|
||||
<span style="color: var(--terminal-yellow);">2025-06-05</span>
|
||||
<a href="/blog/minimalism">The Art of Minimalism</a>
|
||||
</p>
|
||||
<p>
|
||||
<span style="color: var(--terminal-yellow);">2025-06-01</span>
|
||||
<span style="color: var(--terminal-yellow);">2025-06-01</span>
|
||||
<a href="/blog/first-post">First Post</a>
|
||||
</p>
|
||||
</>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
import Layout from '../layouts/Layout.astro';
|
||||
---
|
||||
|
||||
<Layout title="Lab | Terminal Blog" path="~/grassblock/micr0blog/lab">
|
||||
<Layout title="Lab | Terminal Blog" >
|
||||
<h1 class="post-title">~/lab</h1>
|
||||
|
||||
<div class="post-content">
|
||||
|
|
|
@ -89,6 +89,11 @@ main {
|
|||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
.nav a::before {
|
||||
content: "./";
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.cursor {
|
||||
display: inline-block;
|
||||
width: 0.6em;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue