Update JS front matter name, use cross-env where available, adds build-nocolor script

This commit is contained in:
Zach Leatherman 2024-07-16 09:38:01 -05:00
parent c1d0bf9301
commit 499ca5e655
4 changed files with 10 additions and 8 deletions

View File

@ -8,7 +8,7 @@ export default function(eleventyConfig) {
eleventyConfig.addFilter("htmlDateString", (dateObj) => { eleventyConfig.addFilter("htmlDateString", (dateObj) => {
// dateObj input: https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#valid-date-string // dateObj input: https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#valid-date-string
return DateTime.fromJSDate(dateObj, {zone: 'utc'}).toFormat('yyyy-LL-dd'); return DateTime.fromJSDate(dateObj, { zone: "utc" }).toFormat('yyyy-LL-dd');
}); });
// Get the first `n` elements of a collection. // Get the first `n` elements of a collection.

View File

@ -1,4 +1,4 @@
---node ---js
const title = "This is a fifth post (draft)"; const title = "This is a fifth post (draft)";
const date = "2023-01-23"; const date = "2023-01-23";
const draft = true; const draft = true;

View File

@ -1,4 +1,4 @@
---node ---js
// <script> // <script>
const pagination = { const pagination = {
data: "collections", data: "collections",

View File

@ -5,12 +5,13 @@
"type": "module", "type": "module",
"scripts": { "scripts": {
"build": "npx @11ty/eleventy", "build": "npx @11ty/eleventy",
"build-nocolor": "cross-env NODE_DISABLE_COLORS=1 npx @11ty/eleventy",
"build-ghpages": "npx @11ty/eleventy --pathprefix=/eleventy-base-blog/", "build-ghpages": "npx @11ty/eleventy --pathprefix=/eleventy-base-blog/",
"start": "npx @11ty/eleventy --serve --quiet", "start": "npx @11ty/eleventy --serve --quiet",
"start-ghpages": "npx @11ty/eleventy --pathprefix=/eleventy-base-blog/ --serve --quiet", "start-ghpages": "npx @11ty/eleventy --pathprefix=/eleventy-base-blog/ --serve --quiet",
"debug": "DEBUG=Eleventy* npx @11ty/eleventy", "debug": "cross-env DEBUG=Eleventy* npx @11ty/eleventy",
"debugstart": "DEBUG=Eleventy* npx @11ty/eleventy --serve --quiet", "debugstart": "cross-env DEBUG=Eleventy* npx @11ty/eleventy --serve --quiet",
"benchmark": "DEBUG=Eleventy:Benchmark* npx @11ty/eleventy" "benchmark": "cross-env DEBUG=Eleventy:Benchmark* npx @11ty/eleventy"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
@ -34,11 +35,12 @@
}, },
"homepage": "https://github.com/11ty/eleventy-base-blog#readme", "homepage": "https://github.com/11ty/eleventy-base-blog#readme",
"devDependencies": { "devDependencies": {
"@11ty/eleventy": "3.0.0-alpha.13", "@11ty/eleventy": "3.0.0-alpha.16",
"@11ty/eleventy-img": "5.0.0-beta.4", "@11ty/eleventy-img": "5.0.0-beta.5",
"@11ty/eleventy-navigation": "^0.3.5", "@11ty/eleventy-navigation": "^0.3.5",
"@11ty/eleventy-plugin-rss": "2.0.0-beta.8", "@11ty/eleventy-plugin-rss": "2.0.0-beta.8",
"@11ty/eleventy-plugin-syntaxhighlight": "^5.0.0", "@11ty/eleventy-plugin-syntaxhighlight": "^5.0.0",
"cross-env": "^7.0.3",
"luxon": "^3.4.4", "luxon": "^3.4.4",
"markdown-it-anchor": "^8.6.7", "markdown-it-anchor": "^8.6.7",
"zod": "^3.23.8", "zod": "^3.23.8",