feat(vite): add build process that compresses shit

This commit is contained in:
taco 2026-04-10 22:17:11 -04:00
parent f1b8097978
commit 0d9ce3e857
No known key found for this signature in database
12 changed files with 1122 additions and 5 deletions

View file

@ -3,6 +3,7 @@
<img
href="/"
src="/img/taco.svg"
fetchpriority=high
alt="vector drawing of a smiling cartoon taco with tortilla legs."
title="hey! :)"
/></a>
@ -10,8 +11,8 @@
<h1>mestizo.monster</h1>
<ul>
<li><a href="/" title="home">🏠</a></li>
<li><a href="/posts" title="posts">✍️</a></li>
<li><a href="/about" title="about">🌮</a></li>
<li><a href="/posts/" title="posts">✍️</a></li>
<li><a href="/about/" title="about">🌮</a></li>
</ul>
</nav>
</header>

View file

@ -5,6 +5,10 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
{% include "_og.njk" %}
<title>{{ title }} - mestizo.monster</title>
<link rel="preload" href="/fonts/MartianGrotesk-StdLt.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="/fonts/MartianGrotesk-StdMd.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="/fonts/MartianMono-StdRg.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="/fonts/VT323.woff2" as="font" type="font/woff2" crossorigin>
<link href="/css/main.css" rel="stylesheet" />
</head>
<body>

View file

@ -7,7 +7,7 @@ layout: base.njk
<section>
<nav>
<a href="/">home</a> > <a href="/posts">posts</a> > <a href="{{ page.url }}">{{ title }}</a>
<a href="/">home</a> > <a href="/posts/">posts</a> > <a href="{{ page.url }}">{{ title }}</a>
</nav>
</section>

View file

@ -1,11 +1,14 @@
import markdownIt from "markdown-it";
import footnote_plugin from "markdown-it-footnote";
import readingTime from "eleventy-plugin-reading-time";
import EleventyVitePlugin from "@11ty/eleventy-plugin-vite";
/** @param {import("@11ty/eleventy").UserConfig} eleventyConfig */
export default async function (eleventyConfig) {
eleventyConfig.addPassthroughCopy({ assets: "/" });
eleventyConfig.addPassthroughCopy(".well-known");
eleventyConfig.addPassthroughCopy({ public: "/" });
eleventyConfig.addPassthroughCopy({ "public/img": "/img" });
eleventyConfig.addPassthroughCopy({ "public/favicon.ico": "/favicon.ico" });
eleventyConfig.addPassthroughCopy("**/*.jpg");
eleventyConfig.addPassthroughCopy("**/*.png");
@ -44,4 +47,28 @@ export default async function (eleventyConfig) {
eleventyConfig.setLibrary("md", markdownIt(markdownItOptions));
eleventyConfig.amendLibrary("md", (mdLib) => mdLib.use(footnote_plugin));
eleventyConfig.addPlugin(readingTime);
eleventyConfig.addPlugin(EleventyVitePlugin, {
tempFolderName: ".11ty-vite", // Default name of the temp folder
// Options passed to the Eleventy Dev Server
// Defaults
serverOptions: {
module: "@11ty/eleventy-dev-server",
domDiff: false,
},
// Defaults
viteOptions: {
clearScreen: false,
appType: "mpa",
server: {
middlewareMode: true,
},
build: {
emptyOutDir: true,
},
},
});
}

View file

@ -20,4 +20,4 @@ the [wedsite](https://homestar.wiki/wiki/Homestar_Runner%27s_Website) of
- ⭐ digital storyteller.
- 💚 mestizo monster.
check out [posts i've written](/posts) or [who the heck i am](/about).
check out [posts i've written](/posts/) or [who the heck i am](/about/).

1084
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -17,6 +17,7 @@
"license": "ISC",
"type": "module",
"devDependencies": {
"@11ty/eleventy-plugin-vite": "^7.1.0-alpha.2",
"prettier": "^3.8.1",
"prettier-plugin-jinja-template": "^2.1.0"
}

View file

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View file

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View file

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 49 KiB