Update font, some cleanup

This commit is contained in:
2024-10-28 13:24:41 +00:00
parent 4578d6f9f2
commit bdcc7cea6a
4 changed files with 59 additions and 4 deletions

View File

@@ -2,7 +2,7 @@ root = true
[*]
indent_style = tab
indent_size = 2
indent_size = 4
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

View File

@@ -7,6 +7,10 @@
<meta name="description" content="{{ description or metadata.description }}">
<link rel="alternate" href="feed/feed.xml" type="application/atom+xml" title="{{ metadata.title }}">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap" rel="stylesheet">
{#- Uncomment this if youd like folks to know that you used Eleventy to build your site! #}
{#- <meta name="generator" content="{{ eleventy.generator }}"> #}

View File

@@ -28,7 +28,8 @@ export default async function(eleventyConfig) {
// https://www.11ty.dev/docs/watch-serve/#add-your-own-watch-targets
// Watch content images for the image pipeline.
eleventyConfig.addWatchTarget("content/**/*.{svg,webp,png,jpeg}");
eleventyConfig.addWatchTarget("content/blog/**/*.md");
eleventyConfig.addWatchTarget("content/blog/**/*.{svg,webp,png,jpeg}");
// Per-page bundles, see https://github.com/11ty/eleventy-plugin-bundle
// Adds the {% css %} paired shortcode
@@ -103,6 +104,55 @@ export default async function(eleventyConfig) {
return (new Date()).toISOString();
});
eleventyConfig.amendLibrary("md", (mdLib) => {
var defaultImageRender = mdLib.renderer.rules.image;
mdLib.renderer.rules.image = function (
tokens,
idx,
options,
env,
self
) {
const token = tokens[idx];
const aIndex = token.attrIndex("src");
const link = token.attrs[aIndex][1];
if (/(http(s?)):\/\//i.test(link)) {
// Ignore
} else {
tokens[idx].attrs[aIndex][1] = env.page.url + link;
}
return defaultImageRender(tokens, idx, options, env, self);
};
var defaultLinkOpenRender = mdLib.renderer.rules.link_open || function (tokens, idx, options, env, self) {
return self.renderToken(tokens, idx, options);
};
mdLib.renderer.rules.link_open = function (
tokens,
idx,
options,
env,
self
) {
const token = tokens[idx];
const aIndex = token.attrIndex("href");
const link = token.attrs[aIndex][1];
if (/(http(s?)):\/\//i.test(link)) {
// Ignore
} else {
tokens[idx].attrs[aIndex][1] = env.page.url + link;
}
return defaultLinkOpenRender(tokens, idx, options, env, self);
};
});
// Features to make your build faster (when you need them)
// If your passthrough copy gets heavy and cumbersome, add this line

View File

@@ -1,6 +1,6 @@
/* Defaults */
:root {
--font-family: -apple-system, system-ui, sans-serif;
--font-family: Roboto, -apple-system, system-ui, sans-serif;
--font-family-monospace: Consolas, Menlo, Monaco, Andale Mono WT, Andale Mono, Lucida Console, Lucida Sans Typewriter, DejaVu Sans Mono, Bitstream Vera Sans Mono, Liberation Mono, Nimbus Mono L, Courier New, Courier, monospace;
}
@@ -57,7 +57,7 @@ html {
overflow-y: scroll;
}
body {
max-width: 40em;
max-width: 60em;
}
/* https://www.a11yproject.com/posts/how-to-hide-content/ */
@@ -220,6 +220,7 @@ header {
}
.postlist-date {
word-spacing: -0.5px;
flex-basis: 100%;
}
.postlist-link {
font-size: 1.1875em; /* 19px /16 */