Upgrade a few deps, move a few things around. Remove the dual feeds (JSON still supported)

This commit is contained in:
Zach Leatherman 2024-10-01 15:42:41 -05:00
parent 07bd6d8aff
commit c8a2c186bc
6 changed files with 9 additions and 11 deletions

View File

@ -45,13 +45,12 @@ Or you can run [debug mode](https://www.11ty.dev/docs/debugging/) to see all the
## Features ## Features
- Using [Eleventy v2.0](https://www.11ty.dev/blog/eleventy-v2/) with zero-JavaScript output. - Using [Eleventy v3](https://github.com/11ty/eleventy/releases/tag/v3.0.0) with zero-JavaScript output.
- Content is exclusively pre-rendered (this is a static site). - Content is exclusively pre-rendered (this is a static site).
- Can easily [deploy to a subfolder without changing any content](https://www.11ty.dev/docs/plugins/html-base/) - Can easily [deploy to a subfolder without changing any content](https://www.11ty.dev/docs/plugins/html-base/)
- All URLs are decoupled from the contents location on the file system. - All URLs are decoupled from the contents location on the file system.
- Configure templates via the [Eleventy Data Cascade](https://www.11ty.dev/docs/data-cascade/) - Configure templates via the [Eleventy Data Cascade](https://www.11ty.dev/docs/data-cascade/)
- **Performance focused**: four-hundos Lighthouse score out of the box! - **Performance focused**: four-hundos Lighthouse score out of the box!
- [View the Lighthouse report for the latest build](https://eleventy-base-blog.netlify.app/reports/lighthouse/) courtesy of the [Netlify Lighthouse plugin](https://github.com/netlify/netlify-plugin-lighthouse).
- _0 Cumulative Layout Shift_ - _0 Cumulative Layout Shift_
- _0ms Total Blocking Time_ - _0ms Total Blocking Time_
- Local development live reload provided by [Eleventy Dev Server](https://www.11ty.dev/docs/dev-server/). - Local development live reload provided by [Eleventy Dev Server](https://www.11ty.dev/docs/dev-server/).
@ -68,8 +67,8 @@ Or you can run [debug mode](https://www.11ty.dev/docs/debugging/) to see all the
- Images can be co-located with blog post files. - Images can be co-located with blog post files.
- Per page CSS bundles [via `eleventy-plugin-bundle`](https://github.com/11ty/eleventy-plugin-bundle). - Per page CSS bundles [via `eleventy-plugin-bundle`](https://github.com/11ty/eleventy-plugin-bundle).
- Built-in [syntax highlighter](https://www.11ty.dev/docs/plugins/syntaxhighlight/) (zero-JavaScript output). - Built-in [syntax highlighter](https://www.11ty.dev/docs/plugins/syntaxhighlight/) (zero-JavaScript output).
- Draft content: use `draft: true` to mark any template as a draft. Drafts are **only** included during `--serve`/`--watch` and are excluded from full builds. This is driven by the `addPreprocessor` configuration API in `eleventy.config.js`. Schema validator will show an error if non-boolean value is set in data cascade.
- Blog Posts - Blog Posts
- Draft posts: use `draft: true` to mark a blog post as a draft. Drafts are **only** included during `--serve`/`--watch` and are excluded from full builds. This is driven by the `eleventyExcludeFromCollections` and `permalink` computed data in the `content/blog/blog.11tydata.js` directory data file. Schema validator will show an error if non-boolean value is set in data cascade.
- Automated next/previous links - Automated next/previous links
- Accessible deep links to headings - Accessible deep links to headings
- Generated Pages - Generated Pages

View File

@ -5,10 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ title or metadata.title }}</title> <title>{{ title or metadata.title }}</title>
<meta name="description" content="{{ description or metadata.description }}"> <meta name="description" content="{{ description or metadata.description }}">
<link rel="alternate" href="feed/feed.xml" type="application/atom+xml" title="{{ metadata.title }}">
{#- Atom and JSON feeds included by default #}
<link rel="alternate" href="feed/atom.njk" type="application/atom+xml" title="{{ metadata.title }}">
<link rel="alternate" href="feed/json.njk" type="application/json" title="{{ metadata.title }}">
{#- Uncomment this if youd like folks to know that you used Eleventy to build your site! #} {#- Uncomment this if youd like folks to know that you used Eleventy to build your site! #}
{#- <meta name="generator" content="{{ eleventy.generator }}"> #} {#- <meta name="generator" content="{{ eleventy.generator }}"> #}

View File

@ -5,9 +5,11 @@ const pagination = {
size: 1, size: 1,
alias: "tag", alias: "tag",
filter: ["all", "posts"], filter: ["all", "posts"],
addAllPagesToCollections: true, // addAllPagesToCollections: true,
}; };
const eleventyExcludeFromCollections = true;
const eleventyComputed = { const eleventyComputed = {
title: "Tagged '{{ tag }}'", title: "Tagged '{{ tag }}'",
permalink: function(data) { permalink: function(data) {

View File

@ -47,8 +47,8 @@ export default async function(eleventyConfig) {
eleventyConfig.addPlugin(HtmlBasePlugin); eleventyConfig.addPlugin(HtmlBasePlugin);
eleventyConfig.addPlugin(InputPathToUrlTransformPlugin); eleventyConfig.addPlugin(InputPathToUrlTransformPlugin);
// Atom Feed
eleventyConfig.addPlugin(feedPlugin, { eleventyConfig.addPlugin(feedPlugin, {
type: "atom", // or "rss", "json"
outputPath: "/feed/feed.xml", outputPath: "/feed/feed.xml",
stylesheet: "pretty-atom-feed.xsl", stylesheet: "pretty-atom-feed.xsl",
templateData: { templateData: {

View File

@ -35,8 +35,8 @@
}, },
"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.20", "@11ty/eleventy": "^3.0.0",
"@11ty/eleventy-img": "5.0.0-beta.9", "@11ty/eleventy-img": "^5.0.0",
"@11ty/eleventy-navigation": "^0.3.5", "@11ty/eleventy-navigation": "^0.3.5",
"@11ty/eleventy-plugin-rss": "^2.0.2", "@11ty/eleventy-plugin-rss": "^2.0.2",
"@11ty/eleventy-plugin-syntaxhighlight": "^5.0.0", "@11ty/eleventy-plugin-syntaxhighlight": "^5.0.0",