update more stuff and prepare for next blogpost

pyrox.dev 13e3eb97 2c6a9257

verified
Changed files
+92 -25
scripts
bootstrap-icons
src
+19 -9
_config.ts
···
// Additional external plugins
import toc from "https://deno.land/x/lume_markdown_plugins@v0.8.0/toc.ts";
+
import anchor from "npm:markdown-it-anchor";
+
import slugify from "npm:@sindresorhus/slugify";
// CSS
// // Base dependencies
···
// import purgecss from "lume/plugins/purgecss.ts";
// import relations from "lume/plugins/relations.ts";
// import sri from "lume/plugins/sri.ts";
-
// import { default as md_linenums } from "npm:markdown-it-inject-linenumbers@0.3.0";
// To Add:
// https://deno.land/x/lume_markdown_plugins@v0.8.0 (footnotes plugins)
···
const site = lume({
src: "./src",
location: new URL("https://pyrox.dev"),
+
}, {
+
markdown: {
+
plugins: [
+
[BiDirectionalLinks, {
+
dir: Deno.cwd() + "/src/",
+
stillRenderNoMatched: false,
+
}],
+
mdItObsidianCallouts,
+
[anchor, {
+
permalink: anchor.permalink.headerLink(),
+
slugify: (s: string) => slugify(s),
+
}],
+
],
+
},
});
-
-
// site.hooks.addMarkdownItPlugin(md_linenums, {});
-
site.hooks.addMarkdownItPlugin(BiDirectionalLinks({
-
dir: Deno.cwd() + "/src/",
-
stillRenderNoMatched: false,
-
}));
-
site.hooks.addMarkdownItPlugin(mdItObsidianCallouts, {});
// Copy Static Files
site.add(".css");
···
},
}),
);
-
site.use(toc());
+
site.use(toc({
+
anchor: false,
+
}));
site.use(resolveUrls());
// RSS/JSON Feed Generation
+38
deno.lock
···
"jsr:@std/yaml@^1.0.5": "1.0.5",
"npm:@img/sharp-wasm32@0.33.5": "0.33.5",
"npm:@nolebase/markdown-it-bi-directional-links@^2.15.0": "2.15.0_markdown-it@14.1.0",
+
"npm:@sindresorhus/slugify@*": "2.2.1",
"npm:@tailwindcss/oxide@4.0.3": "4.0.3",
"npm:@tailwindcss/oxide@4.0.6": "4.0.6",
"npm:date-fns@4.1.0": "4.1.0",
···
"npm:html-validate@9.4.1": "9.4.1_ajv@8.17.1",
"npm:ico-endec@0.1.6": "0.1.6",
"npm:lightningcss-wasm@1.29.1": "1.29.1",
+
"npm:markdown-it-anchor@*": "9.2.0_@types+markdown-it@14.1.2_markdown-it@14.1.0",
"npm:markdown-it-attrs@4.3.1": "4.3.1_markdown-it@14.1.0",
"npm:markdown-it-deflist@3.0.0": "3.0.0",
"npm:markdown-it@14.1.0": "14.1.0",
···
"kleur@4.1.5"
]
},
+
"@sindresorhus/slugify@2.2.1": {
+
"integrity": "sha512-MkngSCRZ8JdSOCHRaYd+D01XhvU3Hjy6MGl06zhOk614hp9EOAp5gIkBeQg7wtmxpitU6eAL4kdiRMcJa2dlrw==",
+
"dependencies": [
+
"@sindresorhus/transliterate",
+
"escape-string-regexp"
+
]
+
},
+
"@sindresorhus/transliterate@1.6.0": {
+
"integrity": "sha512-doH1gimEu3A46VX6aVxpHTeHrytJAG6HgdxntYnCFiIFHEM/ZGpG8KiZGBChchjQmG0XFIBL552kBTjVcMZXwQ==",
+
"dependencies": [
+
"escape-string-regexp"
+
]
+
},
"@tailwindcss/oxide-android-arm64@4.0.3": {
"integrity": "sha512-S8XOTQuMnpijZRlPm5HBzPJjZ28quB+40LSRHjRnQF6rRYKsvpr1qkY7dfwsetNdd+kMLOMDsvmuT8WnqqETvg=="
},
···
"@types/estree@1.0.6": {
"integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw=="
},
+
"@types/linkify-it@5.0.0": {
+
"integrity": "sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q=="
+
},
+
"@types/markdown-it@14.1.2": {
+
"integrity": "sha512-promo4eFwuiW+TfGxhi+0x3czqTYJkG8qB17ZUJiVF10Xm7NLVRSLUsfRTU/6h1e24VvRnXCx+hG7li58lkzog==",
+
"dependencies": [
+
"@types/linkify-it",
+
"@types/mdurl"
+
]
+
},
+
"@types/mdurl@2.0.0": {
+
"integrity": "sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg=="
+
},
"ajv@8.17.1": {
"integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==",
"dependencies": [
···
"entities@4.5.0": {
"integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw=="
},
+
"escape-string-regexp@5.0.0": {
+
"integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw=="
+
},
"estree-walker@3.0.3": {
"integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==",
"dependencies": [
···
},
"lru-cache@10.4.3": {
"integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ=="
+
},
+
"markdown-it-anchor@9.2.0_@types+markdown-it@14.1.2_markdown-it@14.1.0": {
+
"integrity": "sha512-sa2ErMQ6kKOA4l31gLGYliFQrMKkqSO0ZJgGhDHKijPf0pNFM9vghjAh3gn26pS4JDRs7Iwa9S36gxm3vgZTzg==",
+
"dependencies": [
+
"@types/markdown-it",
+
"markdown-it"
+
]
},
"markdown-it-attrs@4.3.1_markdown-it@14.1.0": {
"integrity": "sha512-/ko6cba+H6gdZ0DOw7BbNMZtfuJTRp9g/IrGIuz8lYc/EfnmWRpaR3CFPnNbVz0LDvF8Gf1hFGPqrQqq7De0rg==",
+2 -2
scripts/bootstrap-icons/src/classes.json
···
"bi-clipboard2-data",
"bi-exclamation-triangle",
"bi-fire",
+
"bi-hash",
"bi-info-circle",
"bi-lightning",
"bi-list-ul",
-
"bi-paragraph",
"bi-pencil",
"bi-question-circle",
"bi-quote",
"bi-x-lg"
-
]
+
]
+2 -1
src/_archetypes/blog.ts
···
title: title,
summary: "",
draft: true,
-
date: new Date(Date.now()).toISOString().split("T")[0],
+
published: new Date(Date.now()).toISOString().split("T")[0],
+
templateEngine: ["vto", "md"],
},
};
}
+5
src/_components/lorem_ipsum.vto
···
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore
+
et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
+
aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
+
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
+
culpa qui officia deserunt mollit anim id est laborum.
+2 -2
src/_components/post_card.vto
···
<p class="text-subtext1 text-lg">{{ post.title }}</p>
<p class="inline italic text-subtext0">{{ post.summary }}</p>
<p class="float-right inline text-blue">
-
<time datetime="{{ post.published |> date('date') }}">
+
<time datetime="{{ post.published |> date('SHORT_DATE') }}">
{{ post.published |> date('DATE') }}
</time>
</p>
···
<h2 class="text-subtext1 font-serif text-2xl mb-2">{{ post.title }}</h2>
<h3 class="text-lg lg:inline italic text-subtext0">{{ post.summary }}</h3>
<p class="text-lg lg:float-right lg:inline text-blue">
-
<time datetime="{{ post.published |> date('date') }}">
+
<time datetime="{{ post.published |> date('SHORT_DATE') }}">
{{ post.published |> date('DATE') }}
</time>
</p>
+1 -1
src/_includes/layouts/home.vto
···
</p>
<h2 class="my-8 text-2xl">Recent blog posts:</h2>
<ul class="lg:w-3/4">
-
{{ for post of search.pages("category=blog", "date", 5) }}
+
{{ for post of search.pages("category=blog", "published=desc", 5) }}
{{ await comp.post_card({"post": post, compact: true}) }}
{{ /for }}
</ul>
+1
src/blog/example-blog-post.md
···
---
## meow meow! {#meow-meow}
+
<!-- deno-fmt-ignore-start -->
> [!info]- Closed default
> You shouldn't see this
+1 -1
src/blog/hello-world.md
···
title: Hello World!
summary: 'The first real blog post'
draft: false
-
published: '2025-02-20'
+
published: 2025-02-20
---
Well, here we are again. This the 8th rewrite of this blog, and hopefully the final one, since Lume
+4 -4
src/static/icons/bsi.min.css
···
@font-face {
font-display: block;
font-family: bootstrap-icons;
-
src: url("/static/icons/bsi.min.woff2?v=1740282679") format("woff2");
+
src: url("/static/icons/bsi.min.woff2?v=1740884805") format("woff2");
}
.bi::before,
[class*=" bi-"]::before,
···
.bi-exclamation-triangle::before {
content: "\f33b";
}
+
.bi-hash::before {
+
content: "\f40a";
+
}
.bi-info-circle::before {
content: "\f431";
}
···
}
.bi-list-ul::before {
content: "\f478";
-
}
-
.bi-paragraph::before {
-
content: "\f4b4";
}
.bi-pencil::before {
content: "\f4cb";
src/static/icons/bsi.min.woff2

This is a binary file and will not be displayed.

+17 -5
src/static/styles.css
···
p {
@apply mb-6;
}
+
+
blockquote {
+
@apply border-l-2 pl-6 relative border-overlay0 italic;
+
left: -0.5rem;
+
}
+
div.callout-content > p {
@apply mb-0;
}
h2:has(a.header-anchor) {
-
@apply text-3xl text-mauve relative mb-8 no-underline;
+
@apply text-3xl text-mauve relative mb-8;
left: -1.75rem;
}
-
h2:has(a.header-anchor)::before {
-
@apply text-2xl relative mr-1;
-
top: 0.25rem;
+
+
h3:has(a.header-anchor) {
+
@apply text-2xl text-mauve relative mb-6;
+
left: -1.75rem;
+
}
+
+
a.header-anchor::before {
+
@apply relative mr-1 inline-block;
font-family: "bootstrap-icons";
-
content: "\F4B4";
+
content: "\F40A";
+
top: 0.225rem;
}
}