Add smooth scrolling and move simple markdown out of directories

This commit is contained in:
thiloho
2025-04-27 06:43:35 +02:00
parent 6534a8d330
commit b1b19ac676
7 changed files with 11 additions and 34 deletions

View File

@@ -1,10 +1,6 @@
import { defineCollection, z } from "astro:content"; import { defineCollection, z } from "astro:content";
import { glob } from "astro/loaders"; import { glob } from "astro/loaders";
const index = defineCollection({
loader: glob({ pattern: "**/*.md", base: "./src/content/index" }),
});
const blog = defineCollection({ const blog = defineCollection({
loader: glob({ pattern: "**/*.md", base: "./src/content/blog" }), loader: glob({ pattern: "**/*.md", base: "./src/content/blog" }),
schema: z.object({ schema: z.object({
@@ -15,8 +11,4 @@ const blog = defineCollection({
}), }),
}); });
const legal = defineCollection({ export const collections = { blog };
loader: glob({ pattern: "**/*.md", base: "./src/content/legal" }),
});
export const collections = { index, blog, legal };

View File

@@ -2,6 +2,7 @@
title: "Steps to install NixOS on a system with ext4 and LUKS" title: "Steps to install NixOS on a system with ext4 and LUKS"
description: "A guide to installing NixOS with full disk encryption using LUKS and LVM, showing the complete process from disk partitioning to system configuration." description: "A guide to installing NixOS with full disk encryption using LUKS and LVM, showing the complete process from disk partitioning to system configuration."
pubDate: "2025-01-04" pubDate: "2025-01-04"
modDate: "2025-04-27"
--- ---
## Disk layout ## Disk layout
@@ -18,7 +19,7 @@ sda 8:0 0 233.8G 0 disk
## Partitioning ## Partitioning
``` ```sh
parted /dev/sda -- mklabel gpt parted /dev/sda -- mklabel gpt
parted /dev/sda -- mkpart ESP fat32 1MB 512MB parted /dev/sda -- mkpart ESP fat32 1MB 512MB
@@ -30,7 +31,7 @@ parted /dev/sda -- set 1 esp on
## Setting up Encryption ## Setting up Encryption
``` ```sh
cryptsetup luksFormat /dev/sda2 cryptsetup luksFormat /dev/sda2
cryptsetup luksOpen /dev/sda2 cryptroot cryptsetup luksOpen /dev/sda2 cryptroot
@@ -38,7 +39,7 @@ cryptsetup luksOpen /dev/sda2 cryptroot
## Setting up LVM ## Setting up LVM
``` ```sh
pvcreate /dev/mapper/cryptroot pvcreate /dev/mapper/cryptroot
vgcreate vg /dev/mapper/cryptroot vgcreate vg /dev/mapper/cryptroot
@@ -50,7 +51,7 @@ lvcreate -l 100%FREE vg -n root
## Creating Filesystems ## Creating Filesystems
``` ```sh
mkfs.fat -F 32 -n boot /dev/sda1 mkfs.fat -F 32 -n boot /dev/sda1
mkfs.ext4 -L root /dev/vg/root mkfs.ext4 -L root /dev/vg/root
@@ -60,7 +61,7 @@ mkswap -L swap /dev/vg/swap
## Mounting Filesystems ## Mounting Filesystems
``` ```sh
mount /dev/vg/root /mnt mount /dev/vg/root /mnt
mkdir -p /mnt/boot mkdir -p /mnt/boot
@@ -105,7 +106,7 @@ Edit `/mnt/etc/nixos/configuration.nix`:
## Installation ## Installation
``` ```sh
nixos-install nixos-install
reboot reboot

View File

@@ -15,7 +15,7 @@ interface Props {
const { title, description, pubDate, modDate, slug } = Astro.props; const { title, description, pubDate, modDate, slug } = Astro.props;
--- ---
<html lang="en" class="light"> <html lang="en" class="scroll-smooth">
<Head {title} {description} /> <Head {title} {description} />
<body class="flex min-h-screen flex-col"> <body class="flex min-h-screen flex-col">
<Nav /> <Nav />

View File

@@ -1,14 +1,6 @@
--- ---
import PageLayout from "../layouts/PageLayout.astro"; import PageLayout from "../layouts/PageLayout.astro";
import { getEntry, render } from "astro:content"; import { Content } from "../content/index.md";
const indexContent = await getEntry("index", "index");
if (!indexContent) {
throw new Error();
}
const { Content } = await render(indexContent);
--- ---
<PageLayout <PageLayout

View File

@@ -1,14 +1,6 @@
--- ---
import PageLayout from "../layouts/PageLayout.astro"; import PageLayout from "../layouts/PageLayout.astro";
import { getEntry, render } from "astro:content"; import { Content } from "../content/legal-disclosure.md";
const legalContent = await getEntry("legal", "legal");
if (!legalContent) {
throw new Error();
}
const { Content } = await render(legalContent);
--- ---
<PageLayout <PageLayout