Compare commits

..

7 Commits

Author SHA1 Message Date
4baa2bed51 chore(deps): update dependency shiki to v3.22.0
Some checks failed
renovate/stability-days Updates have met minimum release age requirement
test-build / build (pull_request) Failing after 1m16s
2026-02-01 00:02:59 +00:00
19a9588919 Merge pull request 'chore(deps): update dependency preline to v4.0.1' (#313) from renovate/preline-4.x-lockfile into main
All checks were successful
test-build / build (push) Successful in 4m47s
renovate / renovate (push) Successful in 2m49s
2026-01-31 00:02:07 +00:00
3c8d3992cf chore(deps): update dependency preline to v4.0.1
Some checks are pending
renovate/stability-days Updates have not met minimum release age requirement
test-build / build (pull_request) Successful in 1m51s
2026-01-31 00:01:39 +00:00
fb8f642c52 fix: update lock
All checks were successful
renovate / renovate (push) Successful in 2m14s
test-build / build (push) Successful in 2m16s
release-image-harbor / build (push) Successful in 1m36s
release-image-gitea / build (push) Successful in 3m47s
release-image-harbor / release (push) Successful in 3m25s
release-image-gitea / release (push) Successful in 3m15s
2026-01-30 17:59:51 -06:00
fde397386c revert: release 2.2.4
Some checks failed
test-build / build (push) Failing after 24s
renovate / renovate (push) Has been cancelled
2026-01-30 17:58:08 -06:00
b7f76c5847 feat: add shiki to markdown rendering for code highlighting 2026-01-30 17:56:57 -06:00
b3bb769c47 revert: release 2.2.3
All checks were successful
renovate / renovate (push) Successful in 1m12s
release-image-harbor / build (push) Successful in 1m50s
test-build / build (push) Successful in 2m19s
release-image-gitea / build (push) Successful in 2m15s
release-image-gitea / release (push) Successful in 3m1s
release-image-harbor / release (push) Successful in 7m1s
2026-01-29 19:09:10 -06:00
5 changed files with 124 additions and 54 deletions

View File

@@ -29,7 +29,7 @@ ENV SITE_URL=https://www.alexlebens.dev
ENV DIRECTUS_URL=https://directus.alexlebens.dev
ENV PORT=4321
LABEL version="2.2.2"
LABEL version="2.2.4"
LABEL description="Astro based personal website"
EXPOSE $PORT

View File

@@ -1,7 +1,7 @@
{
"name": "site-profile",
"type": "module",
"version": "2.2.2",
"version": "2.2.4",
"homepage": "https://www.alexlebens.dev",
"bugs": {
"url": "https://gitea.alexlebens.dev/alexlebens/site-profile/issues",
@@ -49,6 +49,8 @@
"astro": "^5.17.1",
"astro-compressor": "^1.2.0",
"astro-icon": "^1.1.5",
"marked": "^17.0.1",
"marked-shiki": "^1.2.1",
"mdast-util-to-string": "^4.0.0",
"motion": "^12.29.2",
"preline": "^4.0.0",

126
pnpm-lock.yaml generated
View File

@@ -74,6 +74,12 @@ importers:
astro-icon:
specifier: ^1.1.5
version: 1.1.5
marked:
specifier: ^17.0.1
version: 17.0.1
marked-shiki:
specifier: ^1.2.1
version: 1.2.1(marked@17.0.1)(shiki@3.22.0)
mdast-util-to-string:
specifier: ^4.0.0
version: 4.0.0
@@ -82,7 +88,7 @@ importers:
version: 12.29.2(react-dom@19.2.4(react@19.2.4))(react@19.2.4)
preline:
specifier: ^4.0.0
version: 4.0.0
version: 4.0.1
react:
specifier: ^19.2.4
version: 19.2.4
@@ -94,7 +100,7 @@ importers:
version: 1.5.0
rehype-pretty-code:
specifier: ^0.14.1
version: 0.14.1(shiki@3.21.0)
version: 0.14.1(shiki@3.22.0)
sharp:
specifier: ^0.34.5
version: 0.34.5
@@ -103,7 +109,7 @@ importers:
version: 0.1.5
shiki:
specifier: ^3.21.0
version: 3.21.0
version: 3.22.0
tailwindcss:
specifier: ^4.1.18
version: 4.1.18
@@ -1550,23 +1556,23 @@ packages:
cpu: [x64]
os: [win32]
'@shikijs/core@3.21.0':
resolution: {integrity: sha512-AXSQu/2n1UIQekY8euBJlvFYZIw0PHY63jUzGbrOma4wPxzznJXTXkri+QcHeBNaFxiiOljKxxJkVSoB3PjbyA==}
'@shikijs/core@3.22.0':
resolution: {integrity: sha512-iAlTtSDDbJiRpvgL5ugKEATDtHdUVkqgHDm/gbD2ZS9c88mx7G1zSYjjOxp5Qa0eaW0MAQosFRmJSk354PRoQA==}
'@shikijs/engine-javascript@3.21.0':
resolution: {integrity: sha512-ATwv86xlbmfD9n9gKRiwuPpWgPENAWCLwYCGz9ugTJlsO2kOzhOkvoyV/UD+tJ0uT7YRyD530x6ugNSffmvIiQ==}
'@shikijs/engine-javascript@3.22.0':
resolution: {integrity: sha512-jdKhfgW9CRtj3Tor0L7+yPwdG3CgP7W+ZEqSsojrMzCjD1e0IxIbwUMDDpYlVBlC08TACg4puwFGkZfLS+56Tw==}
'@shikijs/engine-oniguruma@3.21.0':
resolution: {integrity: sha512-OYknTCct6qiwpQDqDdf3iedRdzj6hFlOPv5hMvI+hkWfCKs5mlJ4TXziBG9nyabLwGulrUjHiCq3xCspSzErYQ==}
'@shikijs/engine-oniguruma@3.22.0':
resolution: {integrity: sha512-DyXsOG0vGtNtl7ygvabHd7Mt5EY8gCNqR9Y7Lpbbd/PbJvgWrqaKzH1JW6H6qFkuUa8aCxoiYVv8/YfFljiQxA==}
'@shikijs/langs@3.21.0':
resolution: {integrity: sha512-g6mn5m+Y6GBJ4wxmBYqalK9Sp0CFkUqfNzUy2pJglUginz6ZpWbaWjDB4fbQ/8SHzFjYbtU6Ddlp1pc+PPNDVA==}
'@shikijs/langs@3.22.0':
resolution: {integrity: sha512-x/42TfhWmp6H00T6uwVrdTJGKgNdFbrEdhaDwSR5fd5zhQ1Q46bHq9EO61SCEWJR0HY7z2HNDMaBZp8JRmKiIA==}
'@shikijs/themes@3.21.0':
resolution: {integrity: sha512-BAE4cr9EDiZyYzwIHEk7JTBJ9CzlPuM4PchfcA5ao1dWXb25nv6hYsoDiBq2aZK9E3dlt3WB78uI96UESD+8Mw==}
'@shikijs/themes@3.22.0':
resolution: {integrity: sha512-o+tlOKqsr6FE4+mYJG08tfCFDS+3CG20HbldXeVoyP+cYSUxDhrFf3GPjE60U55iOkkjbpY2uC3It/eeja35/g==}
'@shikijs/types@3.21.0':
resolution: {integrity: sha512-zGrWOxZ0/+0ovPY7PvBU2gIS9tmhSUUt30jAcNV0Bq0gb2S98gwfjIs1vxlmH5zM7/4YxLamT6ChlqqAJmPPjA==}
'@shikijs/types@3.22.0':
resolution: {integrity: sha512-491iAekgKDBFE67z70Ok5a8KBMsQ2IJwOWw3us/7ffQkIBCyOQfm/aNwVMBUriP02QshIfgHCBSIYAl3u2eWjg==}
'@shikijs/vscode-textmate@10.0.2':
resolution: {integrity: sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==}
@@ -2493,11 +2499,11 @@ packages:
resolution: {integrity: sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==}
engines: {node: '>= 0.4'}
datatables.net-dt@2.3.6:
resolution: {integrity: sha512-8OEUNCEfkeW+TuVUDlT1q6/XXOitgVzCdNqBivw8bK9DnaNk5F6JjT8lE2pQ4uAfoL/dTy2J+HKxTHeTh8HJlg==}
datatables.net-dt@2.3.7:
resolution: {integrity: sha512-OXXIliY5MXnI+284Gt73F+fEdnW2u5y9jiptlvjDDb3YlyqXU4E/YZUB262a068sM/+qakb6RixN1SWn18uF2g==}
datatables.net@2.3.6:
resolution: {integrity: sha512-xQ/dCxrjfxM0XY70wSIzakkTZ6ghERwlLmAPyCnu8Sk5cyt9YvOVyOsFNOa/BZ/lM63Q3i2YSSvp/o7GXZGsbg==}
datatables.net@2.3.7:
resolution: {integrity: sha512-AvsjG/Nkp6OxeyBKYZauemuzQCPogE1kOtKwG4sYjvdqGCSLiGaJagQwXv4YxG+ts5vaJr6qKGG9ec3g6vTo3w==}
debug@4.4.3:
resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==}
@@ -3730,6 +3736,17 @@ packages:
markdown-table@3.0.4:
resolution: {integrity: sha512-wiYz4+JrLyb/DqW2hkFJxP7Vd7JuTDm77fvbM8VfEQdmSMqcImWeeRbHwZjBjIFki/VaMK2BhFi7oUUZeM5bqw==}
marked-shiki@1.2.1:
resolution: {integrity: sha512-yHxYQhPY5oYaIRnROn98foKhuClark7M373/VpLxiy5TrDu9Jd/LsMwo8w+U91Up4oDb9IXFrP0N1MFRz8W/DQ==}
peerDependencies:
marked: '>=7.0.0'
shiki: '>=1.0.0'
marked@17.0.1:
resolution: {integrity: sha512-boeBdiS0ghpWcSwoNm/jJBwdpFaMnZWRzjA6SkUMYb40SVaN1x7mmfGKp0jvexGcx+7y2La5zRZsYFZI6Qpypg==}
engines: {node: '>= 20'}
hasBin: true
math-intrinsics@1.1.0:
resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==}
engines: {node: '>= 0.4'}
@@ -4463,8 +4480,8 @@ packages:
resolution: {integrity: sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==}
engines: {node: ^10 || ^12 || >=14}
preline@4.0.0:
resolution: {integrity: sha512-O8GlqXGfZPBA4z4QHe0yRSrW8NQhIjvbXORpHdwOh+WPBQ/3CTFWCq77ZPdjBOjcwjVsWsq2JLkH/mdVLo8w2g==}
preline@4.0.1:
resolution: {integrity: sha512-/cyb8orusmZSymGDkCCmDvbfccK5n3fnRZ3uG59pKihxpagmJ6p1rwkXpX1uZ7VpEQrug7U8IYBJnFGaD+8Bdw==}
hasBin: true
prelude-ls@1.2.1:
@@ -4914,8 +4931,8 @@ packages:
engines: {node: '>=4'}
hasBin: true
shiki@3.21.0:
resolution: {integrity: sha512-N65B/3bqL/TI2crrXr+4UivctrAGEjmsib5rPMMPpFp1xAx/w03v8WZ9RDDFYteXoEgY7qZ4HGgl5KBIu1153w==}
shiki@3.22.0:
resolution: {integrity: sha512-LBnhsoYEe0Eou4e1VgJACes+O6S6QC0w71fCSp5Oya79inkwkm15gQ1UF6VtQ8j/taMDh79hAB49WUk8ALQW3g==}
side-channel-list@1.0.0:
resolution: {integrity: sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==}
@@ -5741,7 +5758,7 @@ snapshots:
remark-parse: 11.0.0
remark-rehype: 11.1.2
remark-smartypants: 3.0.2
shiki: 3.21.0
shiki: 3.22.0
smol-toml: 1.6.0
unified: 11.0.5
unist-util-remove-position: 5.0.0
@@ -7263,33 +7280,33 @@ snapshots:
'@rollup/rollup-win32-x64-msvc@4.57.0':
optional: true
'@shikijs/core@3.21.0':
'@shikijs/core@3.22.0':
dependencies:
'@shikijs/types': 3.21.0
'@shikijs/types': 3.22.0
'@shikijs/vscode-textmate': 10.0.2
'@types/hast': 3.0.4
hast-util-to-html: 9.0.5
'@shikijs/engine-javascript@3.21.0':
'@shikijs/engine-javascript@3.22.0':
dependencies:
'@shikijs/types': 3.21.0
'@shikijs/types': 3.22.0
'@shikijs/vscode-textmate': 10.0.2
oniguruma-to-es: 4.3.4
'@shikijs/engine-oniguruma@3.21.0':
'@shikijs/engine-oniguruma@3.22.0':
dependencies:
'@shikijs/types': 3.21.0
'@shikijs/types': 3.22.0
'@shikijs/vscode-textmate': 10.0.2
'@shikijs/langs@3.21.0':
'@shikijs/langs@3.22.0':
dependencies:
'@shikijs/types': 3.21.0
'@shikijs/types': 3.22.0
'@shikijs/themes@3.21.0':
'@shikijs/themes@3.22.0':
dependencies:
'@shikijs/types': 3.21.0
'@shikijs/types': 3.22.0
'@shikijs/types@3.21.0':
'@shikijs/types@3.22.0':
dependencies:
'@shikijs/vscode-textmate': 10.0.2
'@types/hast': 3.0.4
@@ -8006,7 +8023,7 @@ snapshots:
prompts: 2.4.2
rehype: 13.0.2
semver: 7.7.3
shiki: 3.21.0
shiki: 3.22.0
smol-toml: 1.6.0
svgo: 4.0.0
tinyexec: 1.0.2
@@ -8108,7 +8125,7 @@ snapshots:
prompts: 2.4.2
rehype: 13.0.2
semver: 7.7.3
shiki: 3.21.0
shiki: 3.22.0
smol-toml: 1.6.0
svgo: 4.0.0
tinyexec: 1.0.2
@@ -8576,12 +8593,12 @@ snapshots:
es-errors: 1.3.0
is-data-view: 1.0.2
datatables.net-dt@2.3.6:
datatables.net-dt@2.3.7:
dependencies:
datatables.net: 2.3.6
datatables.net: 2.3.7
jquery: 4.0.0
datatables.net@2.3.6:
datatables.net@2.3.7:
dependencies:
jquery: 4.0.0
@@ -10070,6 +10087,13 @@ snapshots:
markdown-table@3.0.4: {}
marked-shiki@1.2.1(marked@17.0.1)(shiki@3.22.0):
dependencies:
marked: 17.0.1
shiki: 3.22.0
marked@17.0.1: {}
math-intrinsics@1.1.0: {}
maxmin@2.1.0:
@@ -11106,13 +11130,13 @@ snapshots:
picocolors: 1.1.1
source-map-js: 1.2.1
preline@4.0.0:
preline@4.0.1:
dependencies:
'@floating-ui/dom': 1.7.5
'@types/culori': 4.0.1
apexcharts: 4.7.0
culori: 4.0.2
datatables.net-dt: 2.3.6
datatables.net-dt: 2.3.7
dropzone: 6.0.0-beta.2
nouislider: 15.8.1
vanilla-calendar-pro: 3.1.0
@@ -11288,13 +11312,13 @@ snapshots:
hast-util-from-html: 2.0.3
unified: 11.0.5
rehype-pretty-code@0.14.1(shiki@3.21.0):
rehype-pretty-code@0.14.1(shiki@3.22.0):
dependencies:
'@types/hast': 3.0.4
hast-util-to-string: 3.0.1
parse-numeric-range: 1.3.0
rehype-parse: 9.0.1
shiki: 3.21.0
shiki: 3.22.0
unified: 11.0.5
unist-util-visit: 5.1.0
@@ -11665,14 +11689,14 @@ snapshots:
interpret: 1.4.0
rechoir: 0.6.2
shiki@3.21.0:
shiki@3.22.0:
dependencies:
'@shikijs/core': 3.21.0
'@shikijs/engine-javascript': 3.21.0
'@shikijs/engine-oniguruma': 3.21.0
'@shikijs/langs': 3.21.0
'@shikijs/themes': 3.21.0
'@shikijs/types': 3.21.0
'@shikijs/core': 3.22.0
'@shikijs/engine-javascript': 3.22.0
'@shikijs/engine-oniguruma': 3.22.0
'@shikijs/langs': 3.22.0
'@shikijs/themes': 3.22.0
'@shikijs/types': 3.22.0
'@shikijs/vscode-textmate': 10.0.2
'@types/hast': 3.0.4

View File

@@ -4,6 +4,9 @@ import getReadingTime from 'reading-time';
import { readItems, readSingleton } from '@directus/sdk';
import directus from '@lib/directus';
import { marked } from 'marked';
import markedShiki from 'marked-shiki';
import { createHighlighter } from 'shiki';
import { getDirectusImageURL } from '@lib/directusFunctions';
import BaseLayout from '@layouts/BaseLayout.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)
.pop() as CollectionEntry<'categories'>;
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
@@ -126,7 +147,7 @@ const readingTime = getReadingTime(post.content);
<article
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>
<div

View File

@@ -60,6 +60,29 @@
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 */