Compare commits
14
Commits
29c4d4b70f
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aebcb3a95a | ||
|
|
74f99feb66 | ||
|
|
ee4eaacec7 | ||
|
|
f45b6308f9 | ||
|
|
13d0b244e5 | ||
|
|
99370f516a | ||
|
|
7e3ce4c444 | ||
|
|
00428689d9 | ||
|
|
5f0c6bf67e | ||
|
|
da9bb278cd | ||
|
|
7c8115b298 | ||
|
|
5b29791fe0 | ||
|
|
74966a23f6 | ||
|
|
009cb52246 |
No files matched your search
@@ -0,0 +1,59 @@
|
||||
name: Build and copy to prod
|
||||
on:
|
||||
push:
|
||||
schedule:
|
||||
- cron: '0 */12 * * *'
|
||||
jobs:
|
||||
build-and-copy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 20.x
|
||||
- name: Install dependencies 📦
|
||||
run: npm ci
|
||||
- name: Cache build
|
||||
id: cache-eleventy-build
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: .cache
|
||||
key: cache-eleventy-build-${{ gitea.run_id }}
|
||||
restore-keys: |
|
||||
cache-eleventy-build
|
||||
- name: Cache _site
|
||||
id: cache-site
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: _site
|
||||
key: cache-site-${{ gitea.run_id }}
|
||||
restore-keys: |
|
||||
cache-site
|
||||
- name: Build eleventy
|
||||
run: npm run build
|
||||
env:
|
||||
NODE_ENV: production
|
||||
UMAMI_API_KEY: ${{ secrets.UMAMI_API_KEY }}
|
||||
- name: Sync to Bunny
|
||||
run: node ./scripts/upload-to-bunny.js
|
||||
env:
|
||||
BUNNY_STORAGE_ENDPOINT: ${{ secrets.BUNNY_STORAGE_ENDPOINT }}
|
||||
BUNNY_STORAGE_PASSWORD: ${{ secrets.BUNNY_STORAGE_PASSWORD }}
|
||||
BUNNY_STORAGE_BUCKET: ${{ secrets.BUNNY_STORAGE_BUCKET }}
|
||||
- name: Purge XML files from cache
|
||||
run: |
|
||||
curl --request POST \
|
||||
--url 'https://api.bunny.net/purge?url=https%3A%2F%2Flewisdale.dev%2F%2A.xml&async=false' \
|
||||
--header 'AccessKey: ${{ secrets.BUNNY_ACCESS_KEY }}'
|
||||
- name: Purge JSON files from cache
|
||||
run: |
|
||||
curl --request POST \
|
||||
--url 'https://api.bunny.net/purge?url=https%3A%2F%2Flewisdale.dev%2F%2A.json&async=false' \
|
||||
--header 'AccessKey: ${{ secrets.BUNNY_ACCESS_KEY }}'
|
||||
- name: Purge CSS files from cache
|
||||
run: |
|
||||
curl --request POST \
|
||||
--url 'https://api.bunny.net/purge?url=https%3A%2F%2Flewisdale.dev%2F%2A.css&async=false' \
|
||||
--header 'AccessKey: ${{ secrets.BUNNY_ACCESS_KEY }}'
|
||||
@@ -1,16 +0,0 @@
|
||||
name: Trigger deploy
|
||||
on:
|
||||
schedule:
|
||||
- cron: '5 * * * *'
|
||||
|
||||
jobs:
|
||||
trigger-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Trigger deploy
|
||||
run: |
|
||||
curl -X GET ${DEPLOY_ENDPOINT} -H "Authorization: Bearer ${COOLIFY_TOKEN}"
|
||||
shell: bash
|
||||
env:
|
||||
DEPLOY_ENDPOINT: ${{ secrets.DEPLOY_ENDPOINT }}
|
||||
COOLIFY_TOKEN: ${{ secrets.COOLIFY_TOKEN }}
|
||||
@@ -3,5 +3,6 @@ export default function (eleventyConfig) {
|
||||
collectionApi.getFilteredByTag("posts")
|
||||
.filter(p => process.env.DEBUG || !p.data.tags.includes("draft"))
|
||||
.filter(p => process.env.DEBUG || p.date < new Date())
|
||||
.filter(p => process.env.DEBUG || !p.data.tags.includes("unlisted"))
|
||||
);
|
||||
}
|
||||
@@ -3,6 +3,9 @@ export default function(eleventyConfig) {
|
||||
eleventyConfig.ignores.add("src/posts/drafts/*");
|
||||
}
|
||||
|
||||
eleventyConfig.ignores.add("src/.obsidian");
|
||||
eleventyConfig.ignores.add("src/_templates");
|
||||
|
||||
eleventyConfig.addPassthroughCopy("src/assets");
|
||||
eleventyConfig.addPassthroughCopy("src/robots.txt");
|
||||
eleventyConfig.setDataDeepMerge(true);
|
||||
|
||||
@@ -9,15 +9,14 @@ const defaultSizes = `
|
||||
(min-width: 2500px) 3840px
|
||||
`;
|
||||
|
||||
const imageShortcode = (src, alt, cls, sizes = defaultSizes, widths = [300, 600, 1000, 1440, 2500, 3840]) => {
|
||||
const imageShortcode = async (src, alt, cls, sizes = defaultSizes, widths = [300, 600, 1000, 1440, 2500, 3840]) => {
|
||||
let options = {
|
||||
widths: widths,
|
||||
formats: ['webp', 'jpeg'],
|
||||
outputDir: "./_site/img",
|
||||
};
|
||||
|
||||
// generate images, while this is async we don’t wait
|
||||
Image(src, options);
|
||||
let metadata = await Image(src, options);
|
||||
|
||||
let imageAttributes = {
|
||||
class: cls,
|
||||
@@ -25,8 +24,6 @@ const imageShortcode = (src, alt, cls, sizes = defaultSizes, widths = [300, 600,
|
||||
sizes,
|
||||
decoding: "async",
|
||||
};
|
||||
// get metadata even the images are not fully generated
|
||||
let metadata = Image.statsSync(src, options);
|
||||
return Image.generateHTML(metadata, imageAttributes);
|
||||
}
|
||||
|
||||
@@ -49,6 +46,6 @@ const remoteImageShortcode = async (src, alt, cls, sizes = defaultSizes, widths
|
||||
return Image.generateHTML(metadata, imageAttributes);
|
||||
}
|
||||
export default function(eleventyConfig) {
|
||||
eleventyConfig.addShortcode("image", imageShortcode);
|
||||
eleventyConfig.addAsyncShortcode("image", imageShortcode);
|
||||
eleventyConfig.addAsyncShortcode("remoteImage", remoteImageShortcode);
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
import path from "node:path";
|
||||
import fs from "node:fs/promises";
|
||||
import Image from "@11ty/eleventy-img";
|
||||
|
||||
// Some files in src/images have a literal query string in their filename (e.g. `foo.jpeg?width=300`)
|
||||
const IMAGE_EXTENSIONS = /\.(jpe?g|png|webp|gif|avif|svg|tiff?)(\?.*)?$/i;
|
||||
|
||||
/**
|
||||
* Renders local markdown images as responsive <picture> elements via Eleventy Image.
|
||||
*
|
||||
* Replaces `markdown-it-eleventy-img`, which is unmaintained and pinned to an old
|
||||
* (vulnerable) Eleventy Image + sharp. Eleventy Image v7 dropped its synchronous
|
||||
* stats API, but markdown-it renders synchronously, so image metadata is read
|
||||
* up-front in `eleventy.before` and looked up while rendering. Images are only
|
||||
* generated once a page actually references them, and `eleventy.after` waits for
|
||||
* those to finish.
|
||||
*
|
||||
* Remote images are passed through to markdown-it's default renderer untouched.
|
||||
*/
|
||||
export function createMarkdownImages({ imageDir, imgOptions = {}, globalAttributes = {} }) {
|
||||
const metadataByPath = new Map();
|
||||
let pendingGenerations = [];
|
||||
|
||||
async function loadMetadata() {
|
||||
const entries = await fs.readdir(imageDir, { recursive: true, withFileTypes: true });
|
||||
const files = entries
|
||||
.filter(entry => entry.isFile() && IMAGE_EXTENSIONS.test(entry.name))
|
||||
.map(entry => path.join(entry.parentPath, entry.name));
|
||||
|
||||
await Promise.all(files.map(async file => {
|
||||
const metadata = await Image(file, { ...imgOptions, statsOnly: true });
|
||||
metadataByPath.set(path.normalize(file), metadata);
|
||||
}));
|
||||
}
|
||||
|
||||
async function waitForGenerations() {
|
||||
const generations = pendingGenerations;
|
||||
pendingGenerations = [];
|
||||
await Promise.all(generations);
|
||||
}
|
||||
|
||||
function markdownItPlugin(md) {
|
||||
md.renderer.rules.image = (tokens, index, rendererOptions, env, renderer) => {
|
||||
const token = tokens[index];
|
||||
const src = token.attrGet("src");
|
||||
|
||||
if (Image.Util.isRemoteUrl(src)) {
|
||||
token.attrSet("alt", token.content);
|
||||
return renderer.renderToken(tokens, index, rendererOptions);
|
||||
}
|
||||
|
||||
const filePath = path.normalize(decodeURIComponent(src));
|
||||
const metadata = metadataByPath.get(filePath);
|
||||
if (!metadata) {
|
||||
throw new Error(`Markdown image "${src}" was not found in ${imageDir}. Local markdown images must live in that directory.`);
|
||||
}
|
||||
|
||||
pendingGenerations.push(Image(filePath, imgOptions));
|
||||
|
||||
const tokenAttributes = Object.fromEntries(
|
||||
token.attrs
|
||||
.filter(([name]) => name !== "src")
|
||||
.map(([name, value]) => [name.toLowerCase().trim(), value])
|
||||
);
|
||||
|
||||
return Image.generateHTML(metadata, {
|
||||
...globalAttributes,
|
||||
...tokenAttributes,
|
||||
alt: token.content,
|
||||
}, {
|
||||
whitespaceMode: "inline"
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
function eleventyPlugin(eleventyConfig) {
|
||||
eleventyConfig.on("eleventy.before", loadMetadata);
|
||||
eleventyConfig.on("eleventy.after", waitForGenerations);
|
||||
}
|
||||
|
||||
return { markdownItPlugin, eleventyPlugin };
|
||||
}
|
||||
+20
-16
@@ -9,12 +9,29 @@ import { full as markdownItEmoji } from 'markdown-it-emoji';
|
||||
import markdownItFootnote from 'markdown-it-footnote';
|
||||
import markdownitMark from 'markdown-it-mark';
|
||||
import markdownitAbbr from 'markdown-it-abbr';
|
||||
import markdownItEleventyImg from 'markdown-it-eleventy-img';
|
||||
import markdownItCallouts from 'markdown-it-obsidian-callouts';
|
||||
import { slugifyString } from '../utils.js';
|
||||
import { createMarkdownImages } from './markdown-it-image.js';
|
||||
|
||||
const icons = JSON.parse(fs.readFileSync('./config/plugins/icons.json'), 'utf-8');
|
||||
|
||||
const markdownImages = createMarkdownImages({
|
||||
imageDir: path.join("src", "images"),
|
||||
imgOptions: {
|
||||
widths: [300, 600, 1000, 1440],
|
||||
urlPath: "/img/",
|
||||
outputDir: path.join("_site", "img"),
|
||||
formats: ["avif", "webp", "jpeg"]
|
||||
},
|
||||
globalAttributes: {
|
||||
sizes: `(max-width: 300px) 300px,
|
||||
(max-width: 600px) 600px,
|
||||
(max-width: 1000px) 1000px,
|
||||
(max-width: 1440px) 1440px,
|
||||
100%`
|
||||
}
|
||||
});
|
||||
|
||||
const markdownLib = markdownIt({
|
||||
html: true,
|
||||
breaks: true,
|
||||
@@ -53,27 +70,14 @@ const markdownLib = markdownIt({
|
||||
.use(markdownitMark)
|
||||
.use(markdownitAbbr)
|
||||
.use(markdownItCallouts)
|
||||
.use(markdownItEleventyImg, {
|
||||
imgOptions: {
|
||||
widths: [300, 600, 1000, 1440],
|
||||
urlPath: "/img/",
|
||||
outputDir: path.join("_site", "img"),
|
||||
formats: ["avif", "webp", "jpeg"]
|
||||
},
|
||||
globalAttributes: {
|
||||
sizes: `(max-width: 300px) 300px,
|
||||
(max-width: 600px) 600px,
|
||||
(max-width: 1000px) 1000px,
|
||||
(max-width: 1440px) 1440px,
|
||||
100%`
|
||||
}
|
||||
});
|
||||
.use(markdownImages.markdownItPlugin);
|
||||
|
||||
markdownLib.renderer.rules.emoji = function(token, idx) {
|
||||
return `<span class="fa-li"><i class="fa-solid fa-${token[idx].markup}" aria-hidden="true"></i></span>`;
|
||||
};
|
||||
|
||||
export default function(eleventyConfig) {
|
||||
eleventyConfig.addPlugin(markdownImages.eleventyPlugin);
|
||||
eleventyConfig.addFilter('md', content => content ? markdownLib.render(content) : "");
|
||||
eleventyConfig.setLibrary('md', markdownLib);
|
||||
}
|
||||
Generated
+1200
-6369
File diff suppressed because it is too large.
Load diff
+22
-10
@@ -20,38 +20,50 @@
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@11ty/eleventy": "^3.0.0",
|
||||
"@11ty/eleventy-fetch": "^3.0.0",
|
||||
"@11ty/eleventy-img": "^5.0.0",
|
||||
"@11ty/eleventy-plugin-syntaxhighlight": "^5.0.0",
|
||||
"@11ty/eleventy": "^3.1.7",
|
||||
"@11ty/eleventy-fetch": "^6.0.1",
|
||||
"@11ty/eleventy-img": "^7.1.1",
|
||||
"@11ty/eleventy-plugin-syntaxhighlight": "^5.0.2",
|
||||
"@lewisdale/blog-post-cli": "^1.0.3",
|
||||
"@toycode/markdown-it-class": "^1.2.4",
|
||||
"autoprefixer": "^10.4.13",
|
||||
"cssnano": "^6.0.1",
|
||||
"glob": "^10.3.10",
|
||||
"glob": "^14.0.3",
|
||||
"lodash": "^4.17.21",
|
||||
"markdown-it": "^14.1.0",
|
||||
"markdown-it-abbr": "^2.0.0",
|
||||
"markdown-it-anchor": "^9.2.0",
|
||||
"markdown-it-eleventy-img": "^0.10.2",
|
||||
"markdown-it-emoji": "^3.0.0",
|
||||
"markdown-it-footnote": "^4.0.0",
|
||||
"markdown-it-link-attributes": "^4.0.1",
|
||||
"markdown-it-mark": "^4.0.0",
|
||||
"markdown-it-obsidian-callouts": "^0.2.6",
|
||||
"markdown-it-prism": "^2.3.0",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"npm-run-all2": "^9.0.4",
|
||||
"p-map": "^7.0.2",
|
||||
"postcss": "^8.4.21",
|
||||
"postcss-cli": "^10.1.0",
|
||||
"postcss-import": "^15.1.0",
|
||||
"postcss-import-ext-glob": "^2.1.1",
|
||||
"postcss-nested": "^6.0.0",
|
||||
"prettier": "^2.8.3",
|
||||
"slugify": "^1.6.9",
|
||||
"tailwindcss": "^3.4.13"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@11ty/eleventy-plugin-rss": "^2.0.2",
|
||||
"@11ty/eleventy-upgrade-help": "^3.0.1",
|
||||
"eleventy-plugin-og-image": "^4.0.0"
|
||||
"@11ty/eleventy-plugin-rss": "^3.1.0",
|
||||
"eleventy-plugin-og-image": "^4.3.0"
|
||||
},
|
||||
"allowScripts": {
|
||||
"sharp@0.35.5": false,
|
||||
"fsevents@2.3.2": false
|
||||
},
|
||||
"overrides": {
|
||||
"eleventy-plugin-og-image": {
|
||||
"satori": {
|
||||
".": "^0.63.2",
|
||||
"fflate": "^0.7.5"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
import pMap from 'p-map';
|
||||
import { readdir, lstat } from 'node:fs/promises';
|
||||
import { createReadStream } from 'node:fs';
|
||||
import * as path from 'node:path';
|
||||
|
||||
const config = {
|
||||
endpoint: process.env.BUNNY_STORAGE_ENDPOINT,
|
||||
password: process.env.BUNNY_STORAGE_PASSWORD,
|
||||
bucket: process.env.BUNNY_STORAGE_BUCKET
|
||||
};
|
||||
|
||||
const files = await readdir('./_site', { recursive: true });
|
||||
|
||||
|
||||
await pMap(files, async (file) => {
|
||||
const filePath = path.join('./_site', file);
|
||||
const stat = await lstat(filePath);
|
||||
if (stat.isDirectory()) return;
|
||||
|
||||
const url = `https://${config.endpoint}/${config.bucket}/${file}`;
|
||||
console.log(`Uploading ${filePath} to ${url}`);
|
||||
|
||||
const readStream = createReadStream(filePath);
|
||||
|
||||
await fetch(url, {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
accessKey: config.password,
|
||||
},
|
||||
body: readStream,
|
||||
duplex: 'half'
|
||||
});
|
||||
}, { concurrency: 50 });
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
{}
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
{}
|
||||
Vendored
+31
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"file-explorer": true,
|
||||
"global-search": true,
|
||||
"switcher": true,
|
||||
"graph": true,
|
||||
"backlink": true,
|
||||
"canvas": true,
|
||||
"outgoing-link": true,
|
||||
"tag-pane": true,
|
||||
"properties": false,
|
||||
"page-preview": true,
|
||||
"daily-notes": true,
|
||||
"templates": true,
|
||||
"note-composer": true,
|
||||
"command-palette": true,
|
||||
"slash-command": false,
|
||||
"editor-status": true,
|
||||
"bookmarks": true,
|
||||
"markdown-importer": false,
|
||||
"zk-prefixer": false,
|
||||
"random-note": false,
|
||||
"outline": true,
|
||||
"word-count": true,
|
||||
"slides": false,
|
||||
"audio-recorder": false,
|
||||
"workspaces": false,
|
||||
"file-recovery": true,
|
||||
"publish": false,
|
||||
"sync": false,
|
||||
"webviewer": false
|
||||
}
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"insert-template": [
|
||||
{
|
||||
"modifiers": [
|
||||
"Mod",
|
||||
"Shift"
|
||||
],
|
||||
"key": "R"
|
||||
}
|
||||
]
|
||||
}
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"folder": "_templates",
|
||||
"dateFormat": "YYYY-MM-DDTHH:mm:ssZ"
|
||||
}
|
||||
Vendored
+180
@@ -0,0 +1,180 @@
|
||||
{
|
||||
"main": {
|
||||
"id": "01da651322e77bc9",
|
||||
"type": "split",
|
||||
"children": [
|
||||
{
|
||||
"id": "6fbde22c49cb0b40",
|
||||
"type": "tabs",
|
||||
"children": [
|
||||
{
|
||||
"id": "fcdd717f684acba9",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "markdown",
|
||||
"state": {
|
||||
"file": "blog/posts/2025/2/Some more good & bad bike part purchases.md",
|
||||
"mode": "source",
|
||||
"source": false
|
||||
},
|
||||
"icon": "lucide-file",
|
||||
"title": "Some more good & bad bike part purchases"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"direction": "vertical"
|
||||
},
|
||||
"left": {
|
||||
"id": "e03e96f7ff367a41",
|
||||
"type": "split",
|
||||
"children": [
|
||||
{
|
||||
"id": "118a6275af4aff50",
|
||||
"type": "tabs",
|
||||
"children": [
|
||||
{
|
||||
"id": "51fac1b08a2afe93",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "file-explorer",
|
||||
"state": {
|
||||
"sortOrder": "alphabetical",
|
||||
"autoReveal": false
|
||||
},
|
||||
"icon": "lucide-folder-closed",
|
||||
"title": "Files"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "04d8928e50518a47",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "search",
|
||||
"state": {
|
||||
"query": "",
|
||||
"matchingCase": false,
|
||||
"explainSearch": false,
|
||||
"collapseAll": false,
|
||||
"extraContext": false,
|
||||
"sortOrder": "alphabetical"
|
||||
},
|
||||
"icon": "lucide-search",
|
||||
"title": "Search"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "c7283ac0ef3a2e71",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "bookmarks",
|
||||
"state": {},
|
||||
"icon": "lucide-bookmark",
|
||||
"title": "Bookmarks"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"direction": "horizontal",
|
||||
"width": 300
|
||||
},
|
||||
"right": {
|
||||
"id": "d1c16c382d0d728e",
|
||||
"type": "split",
|
||||
"children": [
|
||||
{
|
||||
"id": "a20f205e2e3ad9af",
|
||||
"type": "tabs",
|
||||
"children": [
|
||||
{
|
||||
"id": "a6b712bb19d0db98",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "backlink",
|
||||
"state": {
|
||||
"collapseAll": false,
|
||||
"extraContext": false,
|
||||
"sortOrder": "alphabetical",
|
||||
"showSearch": false,
|
||||
"searchQuery": "",
|
||||
"backlinkCollapsed": false,
|
||||
"unlinkedCollapsed": true
|
||||
},
|
||||
"icon": "links-coming-in",
|
||||
"title": "Backlinks"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "11b15a0d19c921cb",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "outgoing-link",
|
||||
"state": {
|
||||
"linksCollapsed": false,
|
||||
"unlinkedCollapsed": true
|
||||
},
|
||||
"icon": "links-going-out",
|
||||
"title": "Outgoing links"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "88283444b842a03f",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "tag",
|
||||
"state": {
|
||||
"sortOrder": "frequency",
|
||||
"useHierarchy": true
|
||||
},
|
||||
"icon": "lucide-tags",
|
||||
"title": "Tags"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "02101e7a8ed9e056",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "outline",
|
||||
"state": {},
|
||||
"icon": "lucide-list",
|
||||
"title": "Outline"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"direction": "horizontal",
|
||||
"width": 300,
|
||||
"collapsed": true
|
||||
},
|
||||
"left-ribbon": {
|
||||
"hiddenItems": {
|
||||
"switcher:Open quick switcher": false,
|
||||
"graph:Open graph view": false,
|
||||
"canvas:Create new canvas": false,
|
||||
"daily-notes:Open today's daily note": false,
|
||||
"templates:Insert template": false,
|
||||
"command-palette:Open command palette": false
|
||||
}
|
||||
},
|
||||
"active": "fcdd717f684acba9",
|
||||
"lastOpenFiles": [
|
||||
"blog/posts/2025/2/Untitled.md",
|
||||
"css/custom-props.css",
|
||||
"images/ribble-against-wall-reservoir.jpeg",
|
||||
"images/IMG_9860.jpeg",
|
||||
"images/IMG_9860.jpeg.sb-69d5fad7-HQnjfj",
|
||||
"blog/posts/2025/2/All things must end.md",
|
||||
"blog/posts/2025/2/Some more good & bad bike part purchases.md",
|
||||
"_templates/Blog post.md",
|
||||
"blog/posts/2025/2",
|
||||
"blog/posts/2025",
|
||||
"blog/posts/2024/12/some-things-i-learned-from-building-my-first-webcomponents.md",
|
||||
"blog/posts/2024/12/2024-year-review.md",
|
||||
"blog/posts/2014/7/clever-image-resizing-in-python.md",
|
||||
"_templates",
|
||||
"links.md"
|
||||
]
|
||||
}
|
||||
+2
-1
@@ -94,5 +94,6 @@ const fetchLatest = async (cache = []) => {
|
||||
}
|
||||
|
||||
export default async function() {
|
||||
return await fetchLatest(cachedContent());
|
||||
return [];
|
||||
// return await fetchLatest(cachedContent());
|
||||
}
|
||||
@@ -10,6 +10,7 @@ export default async function(arg) {
|
||||
url.searchParams.append("startAt", 0);
|
||||
url.searchParams.append("endAt", Date.now());
|
||||
url.searchParams.append("type", "url");
|
||||
try {
|
||||
|
||||
const metrics = await EleventyFetch(url.toString(), {
|
||||
duration: '1h',
|
||||
@@ -18,10 +19,14 @@ export default async function(arg) {
|
||||
headers: {
|
||||
"Authorization": `Bearer ${apiKey}`,
|
||||
"Accept": "application/json"
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
return metrics.filter(metric => postRegex.test(metric.x))
|
||||
.map(({ x, y }) => ({ post: x, count: y }));
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
return [];
|
||||
}
|
||||
}
|
||||
@@ -50,7 +50,6 @@
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<div class="switcher-lg">
|
||||
<nav class="main-nav">
|
||||
<ul role='list'>
|
||||
<li><a href="/" {% if page.url == "/" %}aria-current="page"{% endif %}>Home</a></li>
|
||||
@@ -67,7 +66,6 @@
|
||||
</nav>
|
||||
<fieldset class="color-scheme">
|
||||
<legend>Change your colour scheme</legend>
|
||||
<div class="switcher-sm">
|
||||
<label>
|
||||
<input type="radio" name="color-scheme" value="dark">
|
||||
Dark
|
||||
@@ -80,9 +78,7 @@
|
||||
<input type="radio" name="color-scheme" value="system">
|
||||
System
|
||||
</label>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</header>
|
||||
<div class="content">
|
||||
{{ content | safe }}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<div style="height: 100%; width: 100%; display: flex; align-items: stretch; background-color: #262626;">
|
||||
<div style="display: flex; flex-direction: column; flex-grow: 1; align-items: center; margin: 80px; background-color: #262626;">
|
||||
<div style="display: flex; flex-grow: 1; flex-direction: column; align-items: center; justify-content: center; font-family: 'Space Grotesk'; font-weight: 500; color: #e5e5e5; text-align: center;">
|
||||
<h1 style="font-size: 80px;">{{ title | safe }}</h1>
|
||||
<h2 style="font-size: 44px;">{{ subTitle | safe }}</h2>
|
||||
<h1 style="font-size: 80px; font-weight: 500;">{{ title | safe }}</h1>
|
||||
<h2 style="font-size: 44px; font-weight: 500;">{{ subTitle | safe }}</h2>
|
||||
</div>
|
||||
<div style="display: flex; justify-self: flex-end; flex-grow: 0; font-family: 'Space Grotesk'; font-weight: 500; color: #e5e5e5; text-align: center;">
|
||||
<h3 style="font-size: 20px;">LewisDale.dev</h3>
|
||||
<h3 style="font-size: 20px; font-weight: 500;">LewisDale.dev</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
date: "{{date}}"
|
||||
tags:
|
||||
title: "{{title}}"
|
||||
excerpt:
|
||||
---
|
||||
@@ -0,0 +1,20 @@
|
||||
---json
|
||||
{
|
||||
"title": "2024: Only the good bits",
|
||||
"date": "2024-12-30T11:44:53.620Z",
|
||||
"tags": [],
|
||||
"excerpt": "In an effort to resist the urge to be a miserable bastard, here's a list of all of the things I'm grateful for this year in lieu of a regular \"Year review\""
|
||||
}
|
||||
---
|
||||
|
||||
I wanted to write a year in review, like I have done [at least once before](/post/2022-a-retrospective/). But to be honest, I didn't want to focus on the negative things from the year, at all. Instead, here's a non-exhaustive and un-ordered list of all the things I'm grateful for from this year:
|
||||
|
||||
* My daughter is _thriving_. She's the funniest, warmest child I know[^1], and I'm so glad I get to see her grow up
|
||||
* I got [my first ever promotion](/post/my-first-ever-promotion) at work, and got to form a team around a niche that I'm genuinely passionate about
|
||||
* I [joined a cycling club](/post/trying-out-a-cycling-club/) earlier this year, who all turned out to be a great bunch of people
|
||||
* I [actually launched a personal project](/post/filter-rss-podcast-feeds/)[^2] which has been running happily on my server for a while now
|
||||
* I got a new [Ribble Endurance bike](/post/new-bike-s-day/) which has been serving me _very_ well since
|
||||
* I managed to complete [#WeBlogPoMo2024](/post/weblogpomo2024-retrospective/), and spent some time learning Go, a language I haven't touched since and probably never will
|
||||
|
||||
[^1]: I may be a little biased
|
||||
[^2]: I haven't really touched it since, which is why it doesn't have a usable UI
|
||||
@@ -0,0 +1,59 @@
|
||||
---json
|
||||
{
|
||||
"title": "Some things I learned from building my first WebComponents",
|
||||
"date": "2024-12-13T11:20:04.269Z",
|
||||
"tags": [
|
||||
"webcomponents",
|
||||
"javascript",
|
||||
"html",
|
||||
"draft"
|
||||
],
|
||||
"excerpt": "My team at work have recently released the first versions of some new WebComponents for internal use. As I'd only had fairly limited experience with WebComponents before starting this, I learned a few things that I thought I'd share."
|
||||
}
|
||||
---
|
||||
|
||||
My team at work have recently released the first versions of some new WebComponents for internal use. As I'd only had fairly limited experience with WebComponents before starting this, I learned a few things that I thought I'd share.
|
||||
|
||||
Our first component was an implementation of the ComboBox pattern - basically a custom Select element, with some brand-specific styling and functionality. We were doing this in an effort to remove the many custom versions scattered around our product, especially those that hadn't been built with accessibility in mind. We decided to use [Lit](https://lit.dev) to build the components, as it's fairly lightweight but handles a lot of the boilerplate while still exposing the native APIs.
|
||||
|
||||
## It's not React, so don't try to emulate it
|
||||
|
||||
Pretty much all of the frontend code currently uses React, which means that it's not unusual to see components with these sorts of APIs:
|
||||
|
||||
```javascript
|
||||
<SomeComponent
|
||||
title="Something"
|
||||
icon={<IconComponent />}
|
||||
someFlag={true}
|
||||
complexPropertyThatIsUsedToRender={[
|
||||
{ foo: 'foo', bar: 'bar' },
|
||||
...
|
||||
]}
|
||||
/>
|
||||
```
|
||||
|
||||
So initially, we tried to emulate this behaviour for our ComboBox component, which you _can_ do with Lit by using the `json` type for taking complex property types. I have no idea if it's possible to pass a DOM element as a property, and frankly I don't want to find out. But this is an anti-pattern, because we weren't building a React component, we're defining custom HTML elements - and they should be consumed just as you would an HTML element.
|
||||
|
||||
So instead of doing that, we used [slots](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/slot) for user-defined content. In our case, that included the `option` elements, which we applied to a named slot:
|
||||
|
||||
```html
|
||||
<our-custom-combobox id="some-id">
|
||||
<span slot="label">The label text</span>
|
||||
|
||||
<option slot="option" value="value">Option 1</option>
|
||||
<option slot="option" value="value2">Option 2</option>
|
||||
...
|
||||
</our-custom-combobox>
|
||||
```
|
||||
|
||||
Then, as I mentioned in my [previous post about this pattern](/post/til-using-lit-decorators-for-better-webcomponent-apis/), we use the `queryAssignedElements` Lit decorator to retrieve and "enhance" the options for our use-case. This meant our component started to feel a bit more like a native element, which is what we ultimately wanted to go for.
|
||||
|
||||
## ElementInternals lets the component act like a regular form input
|
||||
|
||||
We found some cases where the label for our component needed to be external to it, for structural or formatting reason. Of course, this doesn't work for WebComponents because IDs are scoped the shadow root, so the browser isn't aware that the id on the label `for` attribute refers to the element in the WebComponent.
|
||||
|
||||
So, after putting out [a question on Mastodon](https://social.lol/@lewis/113599779828387002) about this, thankfully [Aleš Roubíček had the answer we needed](https://indieweb.social/@alesroubicek/113599829106390768). The [ElementInternals api](https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals) lets you call `this.attachInternals()`, and allows you to associate the component with a form, as well as other elements (including labels!). I had to make sure `delegatesFocus` was true when calling `attachShadow`, but once I did that my component was correctly associated with the form and labels.
|
||||
|
||||
I just had to make sure that my component was calling `this.internals.setFormValue()` whenever the value was changed, and then it would also send the value and name as part of the `FormData` when submitting. It can even take part in native form validation via the `ElementInternals.validity` object. The only thing that it can't do is match the `:user-invalid` selector, because that hasn't yet been implemented for any browser.
|
||||
|
||||
## Shadow Parts make stylable WebComponents much easier
|
||||
@@ -0,0 +1,27 @@
|
||||
---
|
||||
date: 2025-02-03T12:41:50+00:00
|
||||
tags:
|
||||
- personal
|
||||
- unlisted
|
||||
title: All things must end
|
||||
excerpt: An incoherent ramble about the last couple of months
|
||||
---
|
||||
>[!warning]
|
||||
>This post is going to be an incoherent ramble about what's been going on with me for the last couple of months. I've written & re-written this post half a dozen times and I don't think there's a way to write this that I'm happy with, but I also need to.
|
||||
|
||||
_____
|
||||
|
||||
|
||||
Over Christmas, my wife and I decided to end our marriage after 13 years together. It wasn't an easy decision to come to, but it needed to happen. Neither of us were happy, and I don't think we had been for quite some time.
|
||||
|
||||
It's a confusing thing to go through. On one hand, I feel like a weight has been lifted. The months leading up to this have been tense, and sad, and upsetting. I hated knowing that she was unhappy, and that I was the reason for that; it wasn't fair, she deserves more.
|
||||
|
||||
On the other hand... fuck. What now? I have no idea how to navigate this. To spend well over a decade _certain_ that you'd found the person you were going to spend the rest of your life with, only to then watch it fall apart and be completely unable to do anything about it is just devastating. I find myself going through a complete rollercoaster of emotion, and it's taking almost everything I've got just to keep the seatbelt on.
|
||||
|
||||
There's also logistical issues with the separation; rents are extortionate, even in the "cheaper" area we live in, so right now there's nowhere for either of us to move out to. We've got a child together, so making sure that everything is stable and safe for her is our priority. I don't really know how we're going to manage it, but we'll have to find a way.
|
||||
|
||||
I know from this post it sounds like I'm attributing most of the blame on myself here, and I probably don't deserve to. There was no major inciting incident, just two people slowly drifting apart who didn't really realise it until it was too late.
|
||||
|
||||
The only silver lining to all this is how my (ex, I guess) wife has handled things. She's been incredibly emotionally mature about everything, has been exceptionally communicative, and is just... trying. We're both on the same page about how we want to move forward with regards to co-parenting, and where we both fit in each others' lives, which is a blessing. There's no tension in the house day-to-day, we aren't arguing, we're just trying to figure it out.
|
||||
|
||||
Anyway, this post is what I'm doing instead of paying for therapy. I'm okay, mostly, and where I'm not okay I know I will be eventually.
|
||||
@@ -0,0 +1,56 @@
|
||||
---
|
||||
date: 2025-02-17T09:50:07+00:00
|
||||
tags:
|
||||
- cycling
|
||||
- BikeTooter
|
||||
- review
|
||||
title: Some more good & bad bike part purchases
|
||||
excerpt: "As always, I'm trying out lots of new bike parts. Some are better than others, so here's some short reviews of the best and worst things I've bought recently: Elitewheels Edge carbon wheels, Goodyear Eagle F1 Supersport R tyres, Sidebike carbon cycling shoes, Exustar PRS-1 pedals, RideNow TPU inner tubes, TOPUMP TB2 PRO electric pump, and YKYWBIKE jerseys & bib tights."
|
||||
---
|
||||
As always, I'm trying to balance buying decent bike components and accessories with the fact that often, those things are _really_ expensive. I've tried out quite a few things recently, some have been great and others... not so great. I thought I'd put together a quick set of reviews for those parts, in case other people were considering them.
|
||||
|
||||
## Elitewheels Edge 50mm carbon road wheels
|
||||
|
||||
**Rating: 5/5 <span role="presentation">⭐️⭐️⭐️⭐️⭐️</span>**
|
||||
|
||||
Carbon wheels are an excellent ride upgrade, but damn they're expensive - some wheelsets cost more than my bike. After hearing some good things about Elitewheels, I ordered a set of their [carbon Edge wheels with 50mm rims](https://www.aliexpress.com/item/1005004767705476.html), for around £500. They took a fair while to arrive, about 2 months, but damn was it worth it. They are _fantastic_; they're really lightweight, at about 1350g for the pair (without tyres & brake rotors), they're stiff, responsive, and roll really nicely. They're far-and-away the best upgrade I've made to my bike.
|
||||
|
||||

|
||||
|
||||
## Goodyear Eagle F1 Supersport R tyres
|
||||
|
||||
**Rating: 2/5 <span role="presentation">⭐️⭐️</span>**
|
||||
|
||||
I picked these up for about £30 a tyre, as [their reported rolling resistance and wet corner grip](https://www.bicyclerollingresistance.com/road-bike-reviews/goodyear-eagle-f1-supersport-r) was too tempting to pass up on for winter use. I sincerely regret this purchase. For a start, they're tubeless tyres, which meant mounting them for the first time was an absolute pain (but did get easier later once the rubber had stretched). The wet grip _is_ pretty good, but they felt slightly unstable when descending in the wet due to the slick strip down the centre. Finally, the puncture resistance is terrible, and British roads in winter are mostly potholes and debris with brief interludes of tarmac. I've since ordered a set of Continental GP 4 Seasons which, while slightly heavier, score better in all of the other metrics I care about (namely: not dying or getting stranded).
|
||||
|
||||
## Sidebike carbon cycling shoes
|
||||
|
||||
**Rating: 4/5 ⭐️⭐️⭐️⭐️**
|
||||
|
||||
Another AliExpress purchase, these are carbon-soled cycling shoes that cost me around £65 for the pair. On the whole, I'm pretty happy with these. They're lightweight, have great power transfer, and double boa fittings make them easy to put on and adjust. The only negatives are that the insole that comes with them is little more than a strip of fabric, so putting new ones in was an absolute must. Also, they're quite narrow and not very suitable for winter use - a pair of dedicated winter boots is on my wishlist for next year. And finally, they're not the best-looking shoes out there, if that's your thing. Otherwise though, absolutely recommend them.
|
||||
|
||||
## Exustar PRS-1 pedals
|
||||
|
||||
**Rating: 5/5 ⭐️⭐️⭐️⭐️⭐️**
|
||||
|
||||
I use the Look Keo cleat system, having had Keo 2 Max pedals for the last couple of years, but they'd started to wear out and the tension springs had seized. I picked these up for £30 from [Spa Cycles](spacycles.co.uk/) and have had no complaints. They feel exactly the same as the Keo 2 Max, weigh around the same, but are less than half the price. And they have full-carbon options if you're lighter than I am and want to spend a bit more.
|
||||
|
||||
## Ridenow TPU inner tubes
|
||||
|
||||
**Rating: 3/5 <span role="presentation">⭐️⭐️⭐️</span>**
|
||||
|
||||
A real mixed bag. On one hand, I like how tiny and lightweight these are, and during summer I rode them almost daily without a single puncture. But since then, I've had a handful of issues. Partly the lower puncture protection has been a problem in winter when, as I mentioned before, the roads are horrible. Partly it's also been some bad quality control on the tubes - a couple I received were leaky right from the off with micropunctures that slowly leaked air. Overall, I'll be keeping TPU tubes as spares, and to use in the summer, but sticking with standard butyl tubes during winter.
|
||||
|
||||

|
||||
|
||||
## Topump TB2 Pro electric cycling pump
|
||||
|
||||
**Rating: 4/5 <span role="presentation">⭐️⭐️⭐️⭐️</span>**
|
||||
|
||||
Yet another AliExpress purchase, there's not much to say about this other than that I'm pretty happy with it. I paid around £25 for it, it fits into my jersey pocket, and will pump my road tyres to 80PSI 2-3 times before needing charging.
|
||||
|
||||
## YKYWBIKE autumn jersey & bib tights
|
||||
|
||||
**Rating: 5/5 <span role="presentation">⭐️⭐️⭐️⭐️⭐️</span>**
|
||||
|
||||
I took a bit of a gamble on a (relatively) highly-recommended clothing brand from AliExpress, and I'm really glad I did. The sizing comes up a bit small, so I'm L-XL whereas I'd be M-L in other brand, but I knew that beforehand anyway. The autumn jersey is fleece-lined and great for early autumn/spring weather when it's chilly but not freezing cold. The bib tights are actually my favourite ones to wear; the red chamois is really comfortable, they fit well, and they feel a lot more expensive than the £17 they actually cost me. I'll be ordering some summer bib shorts, because I don't get on with my Rapha Team Core ones at all.
|
||||
@@ -0,0 +1,21 @@
|
||||
---
|
||||
date: 2025-03-17T09:07:34+00:00
|
||||
tags:
|
||||
- personal
|
||||
title: Good enough is perfect
|
||||
excerpt:
|
||||
---
|
||||
A couple of years ago, I was diagnosed with inattentive-type ADHD. At the time, it felt like it explained so much about me and the things I struggled with. I started medication, and I was hopeful that it would be enough to balance out the issues I was having.
|
||||
|
||||
Obviously, it wasn't. A lot of things did improve: my emotional regulation, and my ability to work on tasks[^1] in particular saw an improvement. But one thing that I still found - and continue to find - hard was with my general organisation and housekeeping skills. To put it bluntly, I'm messy.
|
||||
|
||||
The issue I face is that, the worse it gets, the more important the task feels, which just makes it even harder to begin. I wind up in a guilt and shame spiral. I never invite people over to my house because I'm ashamed of the mess. It was a significant factor in the breakdown of my marriage, because it meant my ex was having to bear more of the housekeeping load, which was unfair. Of course, once that became clear it made it _even_ harder to start. I just wound up _hating_ myself.
|
||||
|
||||
But last week I picked up a book that attempts to reframe the problem in a more positive way: [How To Keep House While Drowning by KC Davis](https://uk.bookshop.org/p/books/how-to-keep-house-while-drowning-a-gentle-approach-to-cleaning-and-organising-kc-davis/7598977?ean=9781529159417). In the book, she makes the case that self-care tasks like tidying are morally neutral, and not being able to keep up with them is not a personal failing. She also provides a bunch of really useful ways to make your space work _for you_, rather than trying to force yourself to adapt to a new routine or system that just won't work.
|
||||
|
||||
Honestly, reading this book and the way that the author describes how she has felt around housework and general organisation was validating in a way that I can't really explain. The tips she provides are incredibly useful, particularly around prioritising tasks, making places at least less cluttered if not perfectly tidy, and simple things like placing a box in places where you usually leave things out. That last one in particular was like a lightbulb going on; my desk is always a mess, so I went out and bought a large basket and just... swept everything into it. Now my desk is clear, and it's certainly no less-organised than it was before.
|
||||
|
||||
I can't recommend this book enough for people with executive function disorders, it really does help to reframe the thinking around organisation in a way that's much kinder to yourself. It's still very much a work-in-progress but any improvement is better than none. The author pens one of my favourite phrases: Good enough is perfect.
|
||||
|
||||
|
||||
[^1]: This is heavily-dependent on other factors like sleep, stress levels, general happiness
|
||||
@@ -3,8 +3,7 @@
|
||||
border: 0;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
gap: var(--space-size-3xs);
|
||||
flex-direction: column;
|
||||
gap: var(--space-size-s);
|
||||
max-width: 25rem;
|
||||
margin-left: auto;
|
||||
text-align: right;
|
||||
@@ -68,12 +67,3 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 1280px) {
|
||||
.color-scheme {
|
||||
margin-right: 0;
|
||||
margin-left: auto;
|
||||
padding: 0 var(--space-size-l);
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
@@ -1,17 +1,21 @@
|
||||
header {
|
||||
flex-basis: 20rem;
|
||||
flex-grow: 1;
|
||||
padding: var(--space-size-m) var(--space-size-2xs);
|
||||
padding: var(--space-size-m) var(--space-size-s);
|
||||
display: flex;
|
||||
gap: var(--space-size-s);
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
|
||||
> * {
|
||||
margin-left: auto;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
/* > * {
|
||||
margin-left: auto;
|
||||
} */
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 1280px) {
|
||||
header {
|
||||
.switcher-lg {
|
||||
flex-direction: column-reverse;
|
||||
}
|
||||
@media only screen and (max-width: 39.15rem) {
|
||||
header > * {
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
.main-nav {
|
||||
text-align: right;
|
||||
|
||||
a {
|
||||
position: relative;
|
||||
@@ -8,12 +7,18 @@
|
||||
a[aria-current="page"]::before {
|
||||
content: "\203A";
|
||||
font-size: larger;
|
||||
position: absolute;
|
||||
left: -1ch;
|
||||
top: -.5ch;
|
||||
display: inline-block;
|
||||
text-decoration: none;
|
||||
line-height: 1;
|
||||
margin-right: .5ch;
|
||||
}
|
||||
|
||||
ul {
|
||||
display: flex;
|
||||
gap: var(--space-size-s);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@media only screen and (max-width: 1280px) {
|
||||
.main-nav {
|
||||
flex-basis: 100%;
|
||||
@@ -35,4 +40,4 @@
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
} */
|
||||
+15
-9
@@ -9,7 +9,6 @@
|
||||
--color-callout-bg: light-dark(var(--color-slate-300), var(--color-slate-800));
|
||||
--color-callout-border: light-dark(var(--color-coolGray-400), var(--color-coolGray-600));
|
||||
color-scheme: light dark;
|
||||
|
||||
}
|
||||
|
||||
.inverse {
|
||||
@@ -38,24 +37,25 @@
|
||||
body {
|
||||
background-color: var(--color-secondary);
|
||||
color: var(--color-primary);
|
||||
font-family: var(--font-family-mono);
|
||||
font-family: var(--font-family-sans);
|
||||
font-size: var(--text-size-s);
|
||||
text-underline-offset: var(--space-size-4xs);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-wrap: wrap;
|
||||
max-width: var(--screen-2xl);
|
||||
margin: 0 auto;
|
||||
|
||||
> .content {
|
||||
flex-basis: 0;
|
||||
flex-grow: 999;
|
||||
min-inline-size: 75%;
|
||||
max-inline-size: var(--screen-lg);
|
||||
/* flex-basis: 0; */
|
||||
/* flex-grow: 999; */
|
||||
/* min-inline-size: 75%; */
|
||||
/* max-inline-size: 100%; */
|
||||
max-width: var(--screen-2xl);
|
||||
padding: var(--space-size-s) var(--space-size-m);
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
@@ -126,7 +126,7 @@ nav {
|
||||
|
||||
|
||||
p {
|
||||
line-height: 1.6;
|
||||
line-height: 1.5;
|
||||
max-width: 70ch;
|
||||
|
||||
&:has(> picture) {
|
||||
@@ -171,3 +171,9 @@ main {
|
||||
padding: 0 var(--space-size-m);
|
||||
max-width: 70ch;
|
||||
}
|
||||
|
||||
@media (max-width: 1280px) {
|
||||
main {
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
---
|
||||
pagination:
|
||||
data: collections.tags
|
||||
size: 1
|
||||
alias: tag
|
||||
eleventyComputed:
|
||||
permalink: "/post/tag/{{ tag | slugify }}/atom.xml"
|
||||
eleventyExcludeFromCollections: true
|
||||
eleventyImport:
|
||||
collections: ["posts", "tags"]
|
||||
---
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml-stylesheet href="/atom.xslt" type="text/xsl"?>
|
||||
<feed xmlns="http://www.w3.org/2005/Atom" xml:base="{{ metadata.site.url }}">
|
||||
<title>{{ metadata.site.name }}</title>
|
||||
<subtitle>Posts tagged #{{ tag }}</subtitle>
|
||||
<link href="{{ permalink | absoluteUrl(metadata.site.url) }}" rel="self"/>
|
||||
<link href="{{ metadata.site.url }}" rel="alternate" />
|
||||
<updated>{{ collections.posts | getNewestCollectionItemDate | dateToRfc3339 }}</updated>
|
||||
<id>{{ metadata.site.url }}</id>
|
||||
<author>
|
||||
<name>{{ metadata.author.name }}</name>
|
||||
<uri>{{ metadata.site.url }}</uri>
|
||||
</author>
|
||||
<category term="{{ tag }}" />
|
||||
{%- for post in collections.tagPosts[tag] %}
|
||||
{%- set absolutePostUrl = post.url | absoluteUrl(metadata.site.url) %}
|
||||
<entry>
|
||||
<title>{{ post.data.title }}</title>
|
||||
<link href="{{ absolutePostUrl }}"/>
|
||||
<updated>{{ post.date | dateToRfc3339 }}</updated>
|
||||
<id>{{ absolutePostUrl }}</id>
|
||||
<content xml:lang="{{ metadata.site.language }}" type="html">{{ post.templateContent | htmlToAbsoluteUrls(absolutePostUrl) }}</content>
|
||||
<summary>{{ post | excerpt }}</summary>
|
||||
</entry>
|
||||
{%- endfor %}
|
||||
</feed>
|
||||
@@ -1,38 +0,0 @@
|
||||
---
|
||||
pagination:
|
||||
data: collections.tags
|
||||
size: 1
|
||||
alias: tag
|
||||
eleventyComputed:
|
||||
permalink: "/post/tag/{{ tag | slugify }}/feed.json"
|
||||
eleventyExcludeFromCollections: true
|
||||
eleventyImport:
|
||||
collections: ["posts", "tags"]
|
||||
---
|
||||
{
|
||||
"version": "https://jsonfeed.org/version/1.1",
|
||||
"title": "{{ metadata.site.name }}",
|
||||
"language": "{{ metadata.site.language }}",
|
||||
"home_page_url": "{{ metadata.site.url }}",
|
||||
"feed_url": "{{ permalink | absoluteUrl(metadata.site.url) }}",
|
||||
"description": "Posts tagged #{{ tag }}",
|
||||
"author": {
|
||||
"name": "{{ metadata.author.name }}",
|
||||
"url": "{{ metadata.site.url }}"
|
||||
},
|
||||
"items": [
|
||||
{%- for post in collections.tagPosts[tag] %}
|
||||
{%- set absolutePostUrl = post.url | absoluteUrl(metadata.site.url) %}
|
||||
{
|
||||
"id": "{{ absolutePostUrl }}",
|
||||
"url": "{{ absolutePostUrl }}",
|
||||
"title": "{{ post.data.title }}",
|
||||
"content_html": {% if post.templateContent %}{{ post.templateContent | htmlToAbsoluteUrls(absolutePostUrl) | dump | safe }}{% else %}""{% endif %},
|
||||
"date_published": "{{ post.date | dateToRfc3339 }}",
|
||||
"tags": {{ post.data.tags | except("posts") | json | safe }},
|
||||
"summary": {{ post | excerpt | json | safe }}
|
||||
}
|
||||
{% if not loop.last %},{% endif %}
|
||||
{%- endfor %}
|
||||
]
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
---
|
||||
pagination:
|
||||
data: collections.tags
|
||||
size: 1
|
||||
alias: tag
|
||||
eleventyComputed:
|
||||
permalink: "/post/tag/{{ tag | slugify }}/rss.xml"
|
||||
eleventyExcludeFromCollections: true
|
||||
eleventyImport:
|
||||
collections: ["posts", "tags"]
|
||||
---
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml-stylesheet href="/rss.xslt" type="text/xsl"?>
|
||||
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xml:base="{{ metadata.site.url }}" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>{{ metadata.site.name }}</title>
|
||||
<link>{{ metadata.site.url }}</link>
|
||||
<atom:link href="{{ permalink | absoluteUrl(metadata.site.url) }}" rel="self" type="application/rss+xml" />
|
||||
<description>Posts tagged #{{ tag }}</description>
|
||||
<language>{{ metadata.site.language }}</language>
|
||||
{%- for post in collections.tagPosts[tag] %}
|
||||
{%- set absolutePostUrl = post.url | absoluteUrl(metadata.site.url) %}
|
||||
<item>
|
||||
<title>{{ post.data.title }}</title>
|
||||
<link>{{ absolutePostUrl }}</link>
|
||||
<description>{{ post.templateContent | htmlToAbsoluteUrls(absolutePostUrl) }}</description>
|
||||
<pubDate>{{ post.date | dateToRfc822 }}</pubDate>
|
||||
<dc:creator>{{ metadata.author.name }}</dc:creator>
|
||||
<atom:summary>{{ post | excerpt }}</atom:summary>
|
||||
<guid>{{ absolutePostUrl }}</guid>
|
||||
</item>
|
||||
{%- endfor %}
|
||||
</channel>
|
||||
</rss>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 4.2 MiB |
+2
-2
@@ -7,12 +7,12 @@ layout: base.njk
|
||||
<section class="stack-md row h-card">
|
||||
<h1><a href="https://{{ metadata.site.domain }}" rel="me" class="u-url">Hi, I'm <span class="p-given-name">Lewis</span></a></h1>
|
||||
<p class="inline-block max-w-[45ch] p-note">
|
||||
I'm a software engineer who loves building things for the web. I consider myself a generalist, but on a given day I'll probably be working with Typescript, HTML and CSS, and on occasion a touch of .NET. I work for <a href="https://triptease.com" target="_blank" rel="noopener noreferrer" class="p-org">Triptease</a> as a Senior Software Engineer, and on the side I'm learning Rust by building a <a href="/post/creating-a-sinclair-basic-interpreter/">Sinclair BASIC Interpreter</a>.
|
||||
I'm a software engineer who loves building things for the web. I consider myself a generalist, but on a given day I'll probably be working with Typescript, HTML and CSS. I work for <a href="https://triptease.com" target="_blank" rel="noopener noreferrer" class="p-org">Triptease</a> as a Senior Software Engineer.
|
||||
</p>
|
||||
{% image metadata.author.avatar, "My face", "box circle u-photo", "300px", [300] %}
|
||||
|
||||
<p class="p-note">
|
||||
When I'm not working I love cycling, reading fiction (mostly sci-fi and ghost stories), and spending time with my family & our border collie.
|
||||
I mostly blog about cycling, software development, and the occasional post about movies & TV.
|
||||
</p>
|
||||
<p class="p-note">
|
||||
You can find also find me on <a href="https://social.lol/@lewis" rel="me noopener noreferrer" target="_blank">the Fediverse</a>, follow my reading on <a href="https://bookrastinating.com/user/lewisdaleuk" target="_blank" rel="me noopener noreferrer">Bookwyrm</a>, or subscribe to my <a href="/feed/">RSS feed</a>.
|
||||
|
||||
Reference in new issue
Block a user