This commit is contained in:
parent
09cbb2ed9c
commit
2ea72a61d6
|
@ -1,4 +1,4 @@
|
||||||
module.exports = {
|
export default {
|
||||||
title: "Musings",
|
title: "Musings",
|
||||||
url: "https://saji.dev/",
|
url: "https://saji.dev/",
|
||||||
language: "en",
|
language: "en",
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
module.exports = {
|
export default {
|
||||||
tags: [
|
tags: [
|
||||||
"posts"
|
"posts"
|
||||||
],
|
],
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
module.exports = {
|
export default {
|
||||||
eleventyExcludeFromCollections: true
|
eleventyExcludeFromCollections: true
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
function eleventyComputedPermalink() {
|
export function eleventyComputedPermalink() {
|
||||||
// When using `addGlobalData` and you *want* to return a function, you must nest functions like this.
|
// When using `addGlobalData` and you *want* to return a function, you must nest functions like this.
|
||||||
// `addGlobalData` acts like a global data file and runs the top level function it receives.
|
// `addGlobalData` acts like a global data file and runs the top level function it receives.
|
||||||
return (data) => {
|
return (data) => {
|
||||||
|
@ -11,7 +11,7 @@ function eleventyComputedPermalink() {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
function eleventyComputedExcludeFromCollections() {
|
export function eleventyComputedExcludeFromCollections() {
|
||||||
// When using `addGlobalData` and you *want* to return a function, you must nest functions like this.
|
// When using `addGlobalData` and you *want* to return a function, you must nest functions like this.
|
||||||
// `addGlobalData` acts like a global data file and runs the top level function it receives.
|
// `addGlobalData` acts like a global data file and runs the top level function it receives.
|
||||||
return (data) => {
|
return (data) => {
|
||||||
|
@ -24,10 +24,7 @@ function eleventyComputedExcludeFromCollections() {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports.eleventyComputedPermalink = eleventyComputedPermalink;
|
export default function (eleventyConfig) {
|
||||||
module.exports.eleventyComputedExcludeFromCollections = eleventyComputedExcludeFromCollections;
|
|
||||||
|
|
||||||
module.exports = eleventyConfig => {
|
|
||||||
eleventyConfig.addGlobalData("eleventyComputed.permalink", eleventyComputedPermalink);
|
eleventyConfig.addGlobalData("eleventyComputed.permalink", eleventyComputedPermalink);
|
||||||
eleventyConfig.addGlobalData("eleventyComputed.eleventyExcludeFromCollections", eleventyComputedExcludeFromCollections);
|
eleventyConfig.addGlobalData("eleventyComputed.eleventyExcludeFromCollections", eleventyComputedExcludeFromCollections);
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
const path = require("path");
|
import path from "path";
|
||||||
const eleventyImage = require("@11ty/eleventy-img");
|
import EleventyImage from "@11ty/eleventy-img";
|
||||||
|
|
||||||
function relativeToInputPath(inputPath, relativeFilePath) {
|
function relativeToInputPath(inputPath, relativeFilePath) {
|
||||||
let split = inputPath.split("/");
|
let split = inputPath.split("/");
|
||||||
|
@ -18,7 +18,7 @@ function isFullUrl(url) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = function(eleventyConfig) {
|
export default function(eleventyConfig) {
|
||||||
// Eleventy Image shortcode
|
// Eleventy Image shortcode
|
||||||
// https://www.11ty.dev/docs/plugins/image/
|
// https://www.11ty.dev/docs/plugins/image/
|
||||||
eleventyConfig.addAsyncShortcode("image", async function imageShortcode(src, alt, widths, sizes) {
|
eleventyConfig.addAsyncShortcode("image", async function imageShortcode(src, alt, widths, sizes) {
|
||||||
|
@ -31,7 +31,7 @@ module.exports = function(eleventyConfig) {
|
||||||
input = relativeToInputPath(this.page.inputPath, src);
|
input = relativeToInputPath(this.page.inputPath, src);
|
||||||
}
|
}
|
||||||
|
|
||||||
let metadata = await eleventyImage(input, {
|
let metadata = await EleventyImage(input, {
|
||||||
widths: widths || ["auto"],
|
widths: widths || ["auto"],
|
||||||
formats,
|
formats,
|
||||||
outputDir: path.join(eleventyConfig.dir.output, "img"), // Advanced usage note: `eleventyConfig.dir` works here because we’re using addPlugin.
|
outputDir: path.join(eleventyConfig.dir.output, "img"), // Advanced usage note: `eleventyConfig.dir` works here because we’re using addPlugin.
|
||||||
|
@ -45,6 +45,6 @@ module.exports = function(eleventyConfig) {
|
||||||
decoding: "async",
|
decoding: "async",
|
||||||
};
|
};
|
||||||
|
|
||||||
return eleventyImage.generateHTML(metadata, imageAttributes);
|
return EleventyImage.generateHTML(metadata, imageAttributes);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,17 +1,19 @@
|
||||||
const { DateTime } = require("luxon");
|
import { DateTime } from "luxon";
|
||||||
const markdownItAnchor = require("markdown-it-anchor");
|
import markdownItAnchor from "markdown-it-anchor";
|
||||||
|
|
||||||
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");
|
|
||||||
|
|
||||||
const pluginDrafts = require("./eleventy.config.drafts.js");
|
import { EleventyHtmlBasePlugin } from "@11ty/eleventy";
|
||||||
const pluginImages = require("./eleventy.config.images.js");
|
|
||||||
|
|
||||||
|
import pluginDrafts from "./eleventy.config.drafts.js";
|
||||||
|
import pluginImages from "./eleventy.config.images.js";
|
||||||
|
|
||||||
/** @param {import('@11ty/eleventy').UserConfig} eleventyConfig */
|
/** @param {import('@11ty/eleventy').UserConfig} eleventyConfig */
|
||||||
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({
|
||||||
|
@ -38,6 +40,7 @@ module.exports = function(eleventyConfig) {
|
||||||
eleventyConfig.addPlugin(EleventyHtmlBasePlugin);
|
eleventyConfig.addPlugin(EleventyHtmlBasePlugin);
|
||||||
eleventyConfig.addPlugin(pluginBundle);
|
eleventyConfig.addPlugin(pluginBundle);
|
||||||
|
|
||||||
|
|
||||||
// Filters
|
// Filters
|
||||||
eleventyConfig.addFilter("readableDate", (dateObj, format, zone) => {
|
eleventyConfig.addFilter("readableDate", (dateObj, format, zone) => {
|
||||||
// Formatting tokens for Luxon: https://moment.github.io/luxon/#/formatting?id=table-of-tokens
|
// Formatting tokens for Luxon: https://moment.github.io/luxon/#/formatting?id=table-of-tokens
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
in {
|
in {
|
||||||
packages = forAllSystems (pkgs: rec {
|
packages = forAllSystems (pkgs: rec {
|
||||||
default = pkgs.buildNpmPackage {
|
default = pkgs.buildNpmPackage {
|
||||||
name = "hi";
|
name = "myblog";
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
nodejs
|
nodejs
|
||||||
vips
|
vips
|
||||||
|
|
1825
package-lock.json
generated
1825
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -10,6 +10,7 @@
|
||||||
"debugstart": "DEBUG=Eleventy* npx @11ty/eleventy --serve --quiet",
|
"debugstart": "DEBUG=Eleventy* npx @11ty/eleventy --serve --quiet",
|
||||||
"benchmark": "DEBUG=Eleventy:Benchmark* npx @11ty/eleventy"
|
"benchmark": "DEBUG=Eleventy:Benchmark* npx @11ty/eleventy"
|
||||||
},
|
},
|
||||||
|
"type": "module",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git://github.com/11ty/eleventy-base-blog.git"
|
"url": "git://github.com/11ty/eleventy-base-blog.git"
|
||||||
|
@ -19,8 +20,9 @@
|
||||||
"node": ">=14"
|
"node": ">=14"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@11ty/eleventy": "^3.0.0",
|
||||||
"@11ty/eleventy-img": "^3.1.1",
|
"@11ty/eleventy-img": "^3.1.1",
|
||||||
"@11ty/eleventy": "^2.0.1"
|
"@11ty/eleventy-upgrade-help": "^3.0.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@11ty/eleventy-navigation": "^0.3.5",
|
"@11ty/eleventy-navigation": "^0.3.5",
|
||||||
|
|
Loading…
Reference in a new issue