Compare commits
19 Commits
056b16b5cf
...
2.2.4
| Author | SHA1 | Date | |
|---|---|---|---|
| fb8f642c52 | |||
| fde397386c | |||
| b7f76c5847 | |||
| b3bb769c47 | |||
| f34f4b2532 | |||
| 94f5082729 | |||
| 5e9765f4d7 | |||
|
ac4bc16913
|
|||
| daaca66f42 | |||
| 6fb7846d23 | |||
|
167491fe8d
|
|||
| 1cda8fac20 | |||
| dbf7ae54a4 | |||
|
a857b64029
|
|||
|
6b867ec092
|
|||
| 3e24f3bb4f | |||
|
0c02c71693
|
|||
| 025a5b38aa | |||
|
cdaa3af76c
|
@@ -13,7 +13,7 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
renovate:
|
renovate:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: ghcr.io/renovatebot/renovate:42
|
container: ghcr.io/renovatebot/renovate:43
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ ENV SITE_URL=https://www.alexlebens.dev
|
|||||||
ENV DIRECTUS_URL=https://directus.alexlebens.dev
|
ENV DIRECTUS_URL=https://directus.alexlebens.dev
|
||||||
ENV PORT=4321
|
ENV PORT=4321
|
||||||
|
|
||||||
LABEL version="2.2.1"
|
LABEL version="2.2.4"
|
||||||
LABEL description="Astro based personal website"
|
LABEL description="Astro based personal website"
|
||||||
|
|
||||||
EXPOSE $PORT
|
EXPOSE $PORT
|
||||||
|
|||||||
22
package.json
22
package.json
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "site-profile",
|
"name": "site-profile",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "2.2.1",
|
"version": "2.2.4",
|
||||||
"homepage": "https://www.alexlebens.dev",
|
"homepage": "https://www.alexlebens.dev",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://gitea.alexlebens.dev/alexlebens/site-profile/issues",
|
"url": "https://gitea.alexlebens.dev/alexlebens/site-profile/issues",
|
||||||
@@ -38,22 +38,24 @@
|
|||||||
"@giscus/react": "^3.1.0",
|
"@giscus/react": "^3.1.0",
|
||||||
"@iconify-json/mdi": "^1.2.3",
|
"@iconify-json/mdi": "^1.2.3",
|
||||||
"@iconify-json/pajamas": "^1.2.15",
|
"@iconify-json/pajamas": "^1.2.15",
|
||||||
"@iconify-json/simple-icons": "^1.2.67",
|
"@iconify-json/simple-icons": "^1.2.68",
|
||||||
"@playform/compress": "^0.2.1",
|
"@playform/compress": "^0.2.1",
|
||||||
"@rehype-pretty/transformers": "^0.13.2",
|
"@rehype-pretty/transformers": "^0.13.2",
|
||||||
"@swup/astro": "1.7.0",
|
"@swup/astro": "1.7.0",
|
||||||
"@tailwindcss/postcss": "^4.1.18",
|
"@tailwindcss/postcss": "^4.1.18",
|
||||||
"@tailwindcss/vite": "^4.1.18",
|
"@tailwindcss/vite": "^4.1.18",
|
||||||
"@types/react": "^19.2.9",
|
"@types/react": "^19.2.10",
|
||||||
"@types/unist": "^3.0.3",
|
"@types/unist": "^3.0.3",
|
||||||
"astro": "^5.16.15",
|
"astro": "^5.17.1",
|
||||||
"astro-compressor": "^1.2.0",
|
"astro-compressor": "^1.2.0",
|
||||||
"astro-icon": "^1.1.5",
|
"astro-icon": "^1.1.5",
|
||||||
|
"marked": "^17.0.1",
|
||||||
|
"marked-shiki": "^1.2.1",
|
||||||
"mdast-util-to-string": "^4.0.0",
|
"mdast-util-to-string": "^4.0.0",
|
||||||
"motion": "^12.29.0",
|
"motion": "^12.29.2",
|
||||||
"preline": "^3.2.3",
|
"preline": "^4.0.0",
|
||||||
"react": "^19.2.3",
|
"react": "^19.2.4",
|
||||||
"react-dom": "^19.2.3",
|
"react-dom": "^19.2.4",
|
||||||
"reading-time": "^1.5.0",
|
"reading-time": "^1.5.0",
|
||||||
"rehype-pretty-code": "^0.14.1",
|
"rehype-pretty-code": "^0.14.1",
|
||||||
"sharp": "^0.34.5",
|
"sharp": "^0.34.5",
|
||||||
@@ -63,7 +65,7 @@
|
|||||||
"ultrahtml": "^1.6.0"
|
"ultrahtml": "^1.6.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@eslint-react/eslint-plugin": "^2.7.2",
|
"@eslint-react/eslint-plugin": "^2.8.1",
|
||||||
"@tailwindcss/forms": "^0.5.11",
|
"@tailwindcss/forms": "^0.5.11",
|
||||||
"@tailwindcss/typography": "^0.5.19",
|
"@tailwindcss/typography": "^0.5.19",
|
||||||
"astro-icon": "^1.1.5",
|
"astro-icon": "^1.1.5",
|
||||||
@@ -79,6 +81,6 @@
|
|||||||
"prettier-plugin-tailwindcss": "^0.7.2",
|
"prettier-plugin-tailwindcss": "^0.7.2",
|
||||||
"timeago.js": "^4.0.2",
|
"timeago.js": "^4.0.2",
|
||||||
"typescript": "5.9.3",
|
"typescript": "5.9.3",
|
||||||
"typescript-eslint": "8.53.1"
|
"typescript-eslint": "8.54.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
990
pnpm-lock.yaml
generated
990
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -4,6 +4,9 @@ import getReadingTime from 'reading-time';
|
|||||||
import { readItems, readSingleton } from '@directus/sdk';
|
import { readItems, readSingleton } from '@directus/sdk';
|
||||||
|
|
||||||
import directus from '@lib/directus';
|
import directus from '@lib/directus';
|
||||||
|
import { marked } from 'marked';
|
||||||
|
import markedShiki from 'marked-shiki';
|
||||||
|
import { createHighlighter } from 'shiki';
|
||||||
import { getDirectusImageURL } from '@lib/directusFunctions';
|
import { getDirectusImageURL } from '@lib/directusFunctions';
|
||||||
import BaseLayout from '@layouts/BaseLayout.astro';
|
import BaseLayout from '@layouts/BaseLayout.astro';
|
||||||
import Image from '@components/ui/images/Image.astro';
|
import Image from '@components/ui/images/Image.astro';
|
||||||
@@ -23,6 +26,24 @@ const category: CollectionEntry<'categories'> = (await getCollection('categories
|
|||||||
.filter((c) => c.slug === post.category)
|
.filter((c) => c.slug === post.category)
|
||||||
.pop() as CollectionEntry<'categories'>;
|
.pop() as CollectionEntry<'categories'>;
|
||||||
const readingTime = getReadingTime(post.content);
|
const readingTime = getReadingTime(post.content);
|
||||||
|
|
||||||
|
const highlighter = await createHighlighter({
|
||||||
|
themes: ['github-light', 'github-dark', 'monokai'],
|
||||||
|
langs: ['typescript', 'python', 'css', 'html', 'yaml', 'bash', 'json'],
|
||||||
|
});
|
||||||
|
marked.use(markedShiki({
|
||||||
|
highlight(code, lang) {
|
||||||
|
return highlighter.codeToHtml(code, {
|
||||||
|
lang: lang || 'plaintext',
|
||||||
|
themes: {
|
||||||
|
light: 'github-light',
|
||||||
|
dark: 'github-dark',
|
||||||
|
},
|
||||||
|
defaultColor: false,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
const content = marked.parse(post.content);
|
||||||
---
|
---
|
||||||
|
|
||||||
<BaseLayout
|
<BaseLayout
|
||||||
@@ -126,7 +147,7 @@ const readingTime = getReadingTime(post.content);
|
|||||||
<article
|
<article
|
||||||
class="prose prose-blog sm:prose-lg dark:prose-invert max-w-none text-justify text-neutral-800 dark:text-neutral-200"
|
class="prose prose-blog sm:prose-lg dark:prose-invert max-w-none text-justify text-neutral-800 dark:text-neutral-200"
|
||||||
>
|
>
|
||||||
<div set:html={post.content} />
|
<div set:html={content} />
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
|
|||||||
@@ -60,6 +60,29 @@
|
|||||||
color var(--theme-transition),
|
color var(--theme-transition),
|
||||||
border-color var(--theme-transition);
|
border-color var(--theme-transition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:root {
|
||||||
|
--shiki-fg: var(--shiki-light);
|
||||||
|
--shiki-bg: var(--color-neutral-200);
|
||||||
|
}
|
||||||
|
|
||||||
|
.dark {
|
||||||
|
--shiki-fg: var(--shiki-dark);
|
||||||
|
--shiki-bg: var(--color-neutral-800);
|
||||||
|
}
|
||||||
|
|
||||||
|
pre.shiki {
|
||||||
|
background-color: var(--shiki-bg) !important;
|
||||||
|
color: var(--shiki-fg) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre.shiki span {
|
||||||
|
color: var(--shiki-light);
|
||||||
|
}
|
||||||
|
|
||||||
|
.dark pre.shiki span {
|
||||||
|
color: var(--shiki-dark) !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Content reveal animations */
|
/* Content reveal animations */
|
||||||
|
|||||||
Reference in New Issue
Block a user