11ty v3
This commit is contained in:
@@ -1,10 +1,8 @@
|
||||
module.exports = {
|
||||
title: "The Ramblings of TerribleDev",
|
||||
url: "https://blog.terrible.dev/",
|
||||
language: "en",
|
||||
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.",
|
||||
author: {
|
||||
name: "Tommy Parnell",
|
||||
url: "https://blog.terrible.dev/about/"
|
||||
}
|
||||
}
|
||||
export const title = "The Ramblings of TerribleDev";
|
||||
export const url = "https://blog.terrible.dev/";
|
||||
export const 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.";
|
||||
export const author = {
|
||||
name: "Tommy Parnell",
|
||||
url: "https://blog.terrible.dev/about/"
|
||||
};
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
require('dotenv').config()
|
||||
module.exports = function() {
|
||||
import dotenv from 'dotenv';
|
||||
dotenv.config();
|
||||
export default function() {
|
||||
return {
|
||||
env: process.env
|
||||
};
|
||||
|
||||
@@ -5,7 +5,7 @@ tags:
|
||||
- csharp
|
||||
- logging
|
||||
- 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
|
||||
updated: '2015-11-01 08:53:04'
|
||||
date: 2015-11-01 08:22:07
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
module.exports = {
|
||||
export default {
|
||||
tags: [
|
||||
"posts"
|
||||
],
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
module.exports = {
|
||||
eleventyExcludeFromCollections: true
|
||||
}
|
||||
export const eleventyExcludeFromCollections = true;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
layout: layouts/base.njk
|
||||
permalink: offline
|
||||
permalink: /offline/
|
||||
eleventyExcludeFromCollections: true
|
||||
---
|
||||
# Ooops!
|
||||
|
||||
@@ -24,10 +24,12 @@ function eleventyComputedExcludeFromCollections() {
|
||||
}
|
||||
};
|
||||
|
||||
module.exports.eleventyComputedPermalink = eleventyComputedPermalink;
|
||||
module.exports.eleventyComputedExcludeFromCollections = eleventyComputedExcludeFromCollections;
|
||||
const _eleventyComputedPermalink = eleventyComputedPermalink;
|
||||
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.eleventyExcludeFromCollections", eleventyComputedExcludeFromCollections);
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
const path = require("path");
|
||||
const eleventyImage = require("@11ty/eleventy-img");
|
||||
import { resolve, sep, join } from "path";
|
||||
import eleventyImage, { generateHTML } from "@11ty/eleventy-img";
|
||||
|
||||
module.exports = eleventyConfig => {
|
||||
export default eleventyConfig => {
|
||||
function relativeToInputPath(inputPath, relativeFilePath) {
|
||||
let split = inputPath.split("/");
|
||||
split.pop();
|
||||
|
||||
return path.resolve(split.join(path.sep), relativeFilePath);
|
||||
return resolve(split.join(sep), relativeFilePath);
|
||||
}
|
||||
|
||||
// Eleventy Image shortcode
|
||||
@@ -19,7 +19,7 @@ module.exports = eleventyConfig => {
|
||||
let metadata = await eleventyImage(file, {
|
||||
widths: widths || ["auto"],
|
||||
formats,
|
||||
outputDir: path.join(eleventyConfig.dir.output, "img"), // Advanced usage note: `eleventyConfig.dir` works here because we’re using addPlugin.
|
||||
outputDir: join(eleventyConfig.dir.output, "img"), // Advanced usage note: `eleventyConfig.dir` works here because we’re using addPlugin.
|
||||
});
|
||||
|
||||
// TODO loading=eager and fetchpriority=high
|
||||
@@ -29,6 +29,6 @@ module.exports = eleventyConfig => {
|
||||
loading: "lazy",
|
||||
decoding: "async",
|
||||
};
|
||||
return eleventyImage.generateHTML(metadata, imageAttributes);
|
||||
return generateHTML(metadata, imageAttributes);
|
||||
});
|
||||
};
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
const { DateTime } = require("luxon");
|
||||
const markdownItAnchor = require("markdown-it-anchor");
|
||||
const htmlmin = require("html-minifier");
|
||||
import { DateTime } from "luxon";
|
||||
import markdownItAnchor from "markdown-it-anchor";
|
||||
import { minify } from "html-minifier";
|
||||
|
||||
const pluginRss = require("@11ty/eleventy-plugin-rss");
|
||||
const pluginSyntaxHighlight = require("@11ty/eleventy-plugin-syntaxhighlight");
|
||||
const pluginBundle = require("@11ty/eleventy-plugin-bundle");
|
||||
const pluginNavigation = require("@11ty/eleventy-navigation");
|
||||
const { EleventyHtmlBasePlugin } = require("@11ty/eleventy");
|
||||
import pluginRss from "@11ty/eleventy-plugin-rss";
|
||||
import pluginSyntaxHighlight from "@11ty/eleventy-plugin-syntaxhighlight";
|
||||
import pluginBundle from "@11ty/eleventy-plugin-bundle";
|
||||
import pluginNavigation from "@11ty/eleventy-navigation";
|
||||
import { EleventyHtmlBasePlugin } from "@11ty/eleventy";
|
||||
|
||||
const pluginDrafts = require("./eleventy.config.drafts.js");
|
||||
const pluginImages = require("./eleventy.config.images.js");
|
||||
import pluginDrafts from "./eleventy.config.drafts.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
|
||||
// For example, `./public/css/` ends up in `_site/css/`
|
||||
eleventyConfig.addPassthroughCopy({
|
||||
@@ -23,7 +23,6 @@ module.exports = function(eleventyConfig) {
|
||||
|
||||
// Watch content images for the image pipeline.
|
||||
eleventyConfig.addWatchTarget("content/**/*.{svg,webp,png,jpeg}");
|
||||
|
||||
// App plugins
|
||||
eleventyConfig.addPlugin(pluginDrafts);
|
||||
eleventyConfig.addPlugin(pluginImages);
|
||||
@@ -104,7 +103,7 @@ module.exports = function(eleventyConfig) {
|
||||
// Prior to Eleventy 2.0: use this.outputPath instead
|
||||
if( this.page.outputPath && this.page.outputPath.endsWith(".html") ) {
|
||||
|
||||
let minified = htmlmin.minify(content, {
|
||||
let minified = minify(content, {
|
||||
useShortDoctype: true,
|
||||
removeComments: true,
|
||||
collapseWhitespace: true
|
||||
|
||||
3069
package-lock.json
generated
3069
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
18
package.json
18
package.json
@@ -2,6 +2,7 @@
|
||||
"name": "terribledev-blog",
|
||||
"version": "8.0.0",
|
||||
"description": "A starter repository for a blog web site using the Eleventy site generator.",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"prebuild": "rm -rf _site",
|
||||
"build": "npx @11ty/eleventy",
|
||||
@@ -33,15 +34,18 @@
|
||||
},
|
||||
"homepage": "https://github.com/11ty/eleventy-base-blog#readme",
|
||||
"devDependencies": {
|
||||
"@11ty/eleventy": "^2.0.1",
|
||||
"@11ty/eleventy-img": "^3.1.1",
|
||||
"@11ty/eleventy": "^3.0.0",
|
||||
"@11ty/eleventy-img": "^5.0.0",
|
||||
"@11ty/eleventy-navigation": "^0.3.5",
|
||||
"@11ty/eleventy-plugin-bundle": "^1.0.4",
|
||||
"@11ty/eleventy-plugin-rss": "^1.2.0",
|
||||
"@11ty/eleventy-plugin-bundle": "^3.0.0",
|
||||
"@11ty/eleventy-plugin-rss": "^2.0.2",
|
||||
"@11ty/eleventy-plugin-syntaxhighlight": "^5.0.0",
|
||||
"dotenv": "^16.3.1",
|
||||
"dotenv": "^16.4.5",
|
||||
"html-minifier": "^4.0.0",
|
||||
"luxon": "^3.3.0",
|
||||
"markdown-it-anchor": "^8.6.7"
|
||||
"luxon": "^3.5.0",
|
||||
"markdown-it-anchor": "^9.2.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@11ty/eleventy-upgrade-help": "^3.0.1"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user