diff --git a/package.json b/package.json index ed9c9b3..0f9f2d6 100644 --- a/package.json +++ b/package.json @@ -12,9 +12,9 @@ }, "dependencies": { "@astrojs/check": "^0.5.10", - "@astrojs/mdx": "^2.3.0", + "@astrojs/mdx": "^2.3.1", "@astrojs/tailwind": "^5.1.0", - "astro": "^4.6.1", + "astro": "^4.6.3", "codejar": "^4.2.0", "tailwindcss": "^3.4.3", "typescript": "^5.4.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c540a39..8dfce84 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,13 +12,13 @@ importers: specifier: ^0.5.10 version: 0.5.10(typescript@5.4.5) '@astrojs/mdx': - specifier: ^2.3.0 + specifier: ^2.3.1 version: 2.3.1(astro@4.6.3(@types/node@20.11.30)(typescript@5.4.5)) '@astrojs/tailwind': specifier: ^5.1.0 version: 5.1.0(astro@4.6.3(@types/node@20.11.30)(typescript@5.4.5))(tailwindcss@3.4.3) astro: - specifier: ^4.6.1 + specifier: ^4.6.3 version: 4.6.3(@types/node@20.11.30)(typescript@5.4.5) codejar: specifier: ^4.2.0 @@ -870,8 +870,8 @@ packages: resolution: {integrity: sha512-xlx1yCK2Oc1APsPXDL2LdlNP6+uu8OCDdhOBSVT279M/S+y75O30C2VuD8T2ogdePBBl7PfPF4504tnLgX3zfw==} engines: {node: '>=14.16'} - caniuse-lite@1.0.30001612: - resolution: {integrity: sha512-lFgnZ07UhaCcsSZgWW0K5j4e69dK1u/ltrL9lTUiFOwNHs12S3UMIEYgBV0Z6C6hRDev7iRnMzzYmKabYdXF9g==} + caniuse-lite@1.0.30001683: + resolution: {integrity: sha512-iqmNnThZ0n70mNwvxpEC2nBJ037ZHZUoBI5Gorh1Mw6IlEAZujEoU1tXA628iZfzm7R9FvFzxbfdgml82a3k8Q==} ccount@2.0.1: resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} @@ -3394,7 +3394,7 @@ snapshots: autoprefixer@10.4.19(postcss@8.4.38): dependencies: browserslist: 4.23.0 - caniuse-lite: 1.0.30001612 + caniuse-lite: 1.0.30001683 fraction.js: 4.3.7 normalize-range: 0.1.2 picocolors: 1.0.0 @@ -3470,7 +3470,7 @@ snapshots: browserslist@4.23.0: dependencies: - caniuse-lite: 1.0.30001612 + caniuse-lite: 1.0.30001683 electron-to-chromium: 1.4.746 node-releases: 2.0.14 update-browserslist-db: 1.0.13(browserslist@4.23.0) @@ -3492,7 +3492,7 @@ snapshots: camelcase@7.0.1: {} - caniuse-lite@1.0.30001612: {} + caniuse-lite@1.0.30001683: {} ccount@2.0.1: {} diff --git a/src/components/Sidebar.astro b/src/components/Sidebar.astro index 830150c..9ea75b0 100644 --- a/src/components/Sidebar.astro +++ b/src/components/Sidebar.astro @@ -3,6 +3,14 @@ import type { PageEntry } from "../layouts/PagesLayout.astro"; const entry: PageEntry = Astro.props.entry; const post_url = entry.url + (entry.url.endsWith("/") ? "" : "/"); + +// this may deal with folders. +// if so, it will turn any `-` into whitespace, +// and remove any leading number +const entry_title = entry.title + .replaceAll("-", " ") + .replaceAll(/\d+_/g, ""); + --- { @@ -21,7 +29,7 @@ const post_url = entry.url + (entry.url.endsWith("/") ? "" : "/"); entry.children && ( <>
- {entry.title.replaceAll("-", " ")} + {entry_title}