This commit is contained in:
Tommy Parnell
2024-11-12 18:53:42 -05:00
parent 972243a4e2
commit e75ae35398
11 changed files with 1698 additions and 1467 deletions

View File

@@ -1,10 +1,8 @@
module.exports = { export const title = "The Ramblings of TerribleDev";
title: "The Ramblings of TerribleDev", export const url = "https://blog.terrible.dev/";
url: "https://blog.terrible.dev/", export const language = "en";
language: "en", export const description = "My name is Tommy Parnell. I usually go by TerribleDev on the internets. These are just some of my writings and rants about the software space.";
description: "My name is Tommy Parnell. I usually go by TerribleDev on the internets. These are just some of my writings and rants about the software space.", export const author = {
author: { name: "Tommy Parnell",
name: "Tommy Parnell", url: "https://blog.terrible.dev/about/"
url: "https://blog.terrible.dev/about/" };
}
}

View File

@@ -1,6 +1,7 @@
require('dotenv').config() import dotenv from 'dotenv';
module.exports = function() { dotenv.config();
export default function() {
return { return {
env: process.env env: process.env
}; };

View File

@@ -5,7 +5,7 @@ tags:
- csharp - csharp
- logging - logging
- library - library
permalink: wiring-up-client-side-logs-into-c-sharp-logging-frameworks permalink: wiring-up-client-side-logs-into-c-sharp-logging-frameworks/
id: 60 id: 60
updated: '2015-11-01 08:53:04' updated: '2015-11-01 08:53:04'
date: 2015-11-01 08:22:07 date: 2015-11-01 08:22:07

View File

@@ -1,4 +1,4 @@
module.exports = { export default {
tags: [ tags: [
"posts" "posts"
], ],

View File

@@ -1,3 +1 @@
module.exports = { export const eleventyExcludeFromCollections = true;
eleventyExcludeFromCollections: true
}

View File

@@ -1,6 +1,6 @@
--- ---
layout: layouts/base.njk layout: layouts/base.njk
permalink: offline permalink: /offline/
eleventyExcludeFromCollections: true eleventyExcludeFromCollections: true
--- ---
# Ooops! # Ooops!

View File

@@ -24,10 +24,12 @@ function eleventyComputedExcludeFromCollections() {
} }
}; };
module.exports.eleventyComputedPermalink = eleventyComputedPermalink; const _eleventyComputedPermalink = eleventyComputedPermalink;
module.exports.eleventyComputedExcludeFromCollections = eleventyComputedExcludeFromCollections; export { _eleventyComputedPermalink as eleventyComputedPermalink };
const _eleventyComputedExcludeFromCollections = eleventyComputedExcludeFromCollections;
export { _eleventyComputedExcludeFromCollections as eleventyComputedExcludeFromCollections };
module.exports = eleventyConfig => { export default eleventyConfig => {
eleventyConfig.addGlobalData("eleventyComputed.permalink", eleventyComputedPermalink); eleventyConfig.addGlobalData("eleventyComputed.permalink", eleventyComputedPermalink);
eleventyConfig.addGlobalData("eleventyComputed.eleventyExcludeFromCollections", eleventyComputedExcludeFromCollections); eleventyConfig.addGlobalData("eleventyComputed.eleventyExcludeFromCollections", eleventyComputedExcludeFromCollections);

View File

@@ -1,12 +1,12 @@
const path = require("path"); import { resolve, sep, join } from "path";
const eleventyImage = require("@11ty/eleventy-img"); import eleventyImage, { generateHTML } from "@11ty/eleventy-img";
module.exports = eleventyConfig => { export default eleventyConfig => {
function relativeToInputPath(inputPath, relativeFilePath) { function relativeToInputPath(inputPath, relativeFilePath) {
let split = inputPath.split("/"); let split = inputPath.split("/");
split.pop(); split.pop();
return path.resolve(split.join(path.sep), relativeFilePath); return resolve(split.join(sep), relativeFilePath);
} }
// Eleventy Image shortcode // Eleventy Image shortcode
@@ -19,7 +19,7 @@ module.exports = eleventyConfig => {
let metadata = await eleventyImage(file, { let metadata = await eleventyImage(file, {
widths: widths || ["auto"], widths: widths || ["auto"],
formats, formats,
outputDir: path.join(eleventyConfig.dir.output, "img"), // Advanced usage note: `eleventyConfig.dir` works here because were using addPlugin. outputDir: join(eleventyConfig.dir.output, "img"), // Advanced usage note: `eleventyConfig.dir` works here because were using addPlugin.
}); });
// TODO loading=eager and fetchpriority=high // TODO loading=eager and fetchpriority=high
@@ -29,6 +29,6 @@ module.exports = eleventyConfig => {
loading: "lazy", loading: "lazy",
decoding: "async", decoding: "async",
}; };
return eleventyImage.generateHTML(metadata, imageAttributes); return generateHTML(metadata, imageAttributes);
}); });
}; };

View File

@@ -1,17 +1,17 @@
const { DateTime } = require("luxon"); import { DateTime } from "luxon";
const markdownItAnchor = require("markdown-it-anchor"); import markdownItAnchor from "markdown-it-anchor";
const htmlmin = require("html-minifier"); import { minify } from "html-minifier";
const pluginRss = require("@11ty/eleventy-plugin-rss"); import pluginRss from "@11ty/eleventy-plugin-rss";
const pluginSyntaxHighlight = require("@11ty/eleventy-plugin-syntaxhighlight"); import pluginSyntaxHighlight from "@11ty/eleventy-plugin-syntaxhighlight";
const pluginBundle = require("@11ty/eleventy-plugin-bundle"); import pluginBundle from "@11ty/eleventy-plugin-bundle";
const pluginNavigation = require("@11ty/eleventy-navigation"); import pluginNavigation from "@11ty/eleventy-navigation";
const { EleventyHtmlBasePlugin } = require("@11ty/eleventy"); import { EleventyHtmlBasePlugin } from "@11ty/eleventy";
const pluginDrafts = require("./eleventy.config.drafts.js"); import pluginDrafts from "./eleventy.config.drafts.js";
const pluginImages = require("./eleventy.config.images.js"); import pluginImages from "./eleventy.config.images.js";
module.exports = function(eleventyConfig) { export default function(eleventyConfig) {
// Copy the contents of the `public` folder to the output folder // Copy the contents of the `public` folder to the output folder
// For example, `./public/css/` ends up in `_site/css/` // For example, `./public/css/` ends up in `_site/css/`
eleventyConfig.addPassthroughCopy({ eleventyConfig.addPassthroughCopy({
@@ -23,7 +23,6 @@ module.exports = function(eleventyConfig) {
// Watch content images for the image pipeline. // Watch content images for the image pipeline.
eleventyConfig.addWatchTarget("content/**/*.{svg,webp,png,jpeg}"); eleventyConfig.addWatchTarget("content/**/*.{svg,webp,png,jpeg}");
// App plugins // App plugins
eleventyConfig.addPlugin(pluginDrafts); eleventyConfig.addPlugin(pluginDrafts);
eleventyConfig.addPlugin(pluginImages); eleventyConfig.addPlugin(pluginImages);
@@ -104,7 +103,7 @@ module.exports = function(eleventyConfig) {
// Prior to Eleventy 2.0: use this.outputPath instead // Prior to Eleventy 2.0: use this.outputPath instead
if( this.page.outputPath && this.page.outputPath.endsWith(".html") ) { if( this.page.outputPath && this.page.outputPath.endsWith(".html") ) {
let minified = htmlmin.minify(content, { let minified = minify(content, {
useShortDoctype: true, useShortDoctype: true,
removeComments: true, removeComments: true,
collapseWhitespace: true collapseWhitespace: true

3069
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -2,6 +2,7 @@
"name": "terribledev-blog", "name": "terribledev-blog",
"version": "8.0.0", "version": "8.0.0",
"description": "A starter repository for a blog web site using the Eleventy site generator.", "description": "A starter repository for a blog web site using the Eleventy site generator.",
"type": "module",
"scripts": { "scripts": {
"prebuild": "rm -rf _site", "prebuild": "rm -rf _site",
"build": "npx @11ty/eleventy", "build": "npx @11ty/eleventy",
@@ -33,15 +34,18 @@
}, },
"homepage": "https://github.com/11ty/eleventy-base-blog#readme", "homepage": "https://github.com/11ty/eleventy-base-blog#readme",
"devDependencies": { "devDependencies": {
"@11ty/eleventy": "^2.0.1", "@11ty/eleventy": "^3.0.0",
"@11ty/eleventy-img": "^3.1.1", "@11ty/eleventy-img": "^5.0.0",
"@11ty/eleventy-navigation": "^0.3.5", "@11ty/eleventy-navigation": "^0.3.5",
"@11ty/eleventy-plugin-bundle": "^1.0.4", "@11ty/eleventy-plugin-bundle": "^3.0.0",
"@11ty/eleventy-plugin-rss": "^1.2.0", "@11ty/eleventy-plugin-rss": "^2.0.2",
"@11ty/eleventy-plugin-syntaxhighlight": "^5.0.0", "@11ty/eleventy-plugin-syntaxhighlight": "^5.0.0",
"dotenv": "^16.3.1", "dotenv": "^16.4.5",
"html-minifier": "^4.0.0", "html-minifier": "^4.0.0",
"luxon": "^3.3.0", "luxon": "^3.5.0",
"markdown-it-anchor": "^8.6.7" "markdown-it-anchor": "^9.2.0"
},
"dependencies": {
"@11ty/eleventy-upgrade-help": "^3.0.1"
} }
} }