diff --git a/.editorconfig b/.editorconfig
index d415404..844771f 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -1,7 +1,7 @@
root = true
[*]
-indent_style = space
+indent_style = tab
indent_size = 2
end_of_line = lf
insert_final_newline = true
diff --git a/_data/metadata.json b/_data/metadata.json
index 94ecf0e..8d018b7 100644
--- a/_data/metadata.json
+++ b/_data/metadata.json
@@ -1,11 +1,11 @@
{
- "title": "Your Blog Name",
- "url": "https://example.com/",
- "language": "en",
- "description": "I am writing about my experiences as a naval navel-gazer.",
- "author": {
- "name": "Your Name Here",
- "email": "youremailaddress@example.com",
- "url": "https://example.com/about-me/"
- }
+ "title": "Your Blog Name",
+ "url": "https://example.com/",
+ "language": "en",
+ "description": "I am writing about my experiences as a naval navel-gazer.",
+ "author": {
+ "name": "Your Name Here",
+ "email": "youremailaddress@example.com",
+ "url": "https://example.com/about-me/"
+ }
}
diff --git a/_includes/layouts/base.njk b/_includes/layouts/base.njk
index 66bb7da..1eb00fa 100644
--- a/_includes/layouts/base.njk
+++ b/_includes/layouts/base.njk
@@ -1,44 +1,44 @@
-
-
-
- {{ title or metadata.title }}
-
+
+
+
+ {{ title or metadata.title }}
+
- {#- Uncomment this if you’d like folks to know that you used Eleventy to build your site! #}
- {#- #}
+ {#- Uncomment this if you’d like folks to know that you used Eleventy to build your site! #}
+ {#- #}
-
-
-
+
+
+
-
-
-
-
- Skip to main content
+
+
+
+
+ Skip to main content
-
- {{ metadata.title }}
+
+ {{ metadata.title }}
- {#- Read more about `eleventy-navigation` at https://www.11ty.dev/docs/plugins/navigation/ #}
-
-
- Top level navigation menu
- {%- for entry in collections.all | eleventyNavigation %}
- {{ entry.title }}
- {%- endfor %}
-
-
-
+ {#- Read more about `eleventy-navigation` at https://www.11ty.dev/docs/plugins/navigation/ #}
+
+
+ Top level navigation menu
+ {%- for entry in collections.all | eleventyNavigation %}
+ {{ entry.title }}
+ {%- endfor %}
+
+
+
-
- {{ content | safe }}
-
+
+ {{ content | safe }}
+
-
+
-
-
+
+
diff --git a/_includes/layouts/home.njk b/_includes/layouts/home.njk
index d71000f..42ef101 100644
--- a/_includes/layouts/home.njk
+++ b/_includes/layouts/home.njk
@@ -3,13 +3,13 @@ layout: layouts/base.njk
---
diff --git a/_includes/layouts/post.njk b/_includes/layouts/post.njk
index 01f6583..68228ea 100644
--- a/_includes/layouts/post.njk
+++ b/_includes/layouts/post.njk
@@ -4,24 +4,22 @@ layout: layouts/base.njk
{{ title }}
- {{ page.date | readableDate }}
- {%- for tag in tags | filterTagList %}
- {%- set tagUrl %}/tags/{{ tag | slugify }}/{% endset %}
- {{ tag }} {%- if not loop.last %}, {% endif %}
- {%- endfor %}
+ {{ page.date | readableDate }}
+ {%- for tag in tags | filterTagList %}
+ {%- set tagUrl %}/tags/{{ tag | slugify }}/{% endset %}
+ {{ tag }} {%- if not loop.last %}, {% endif %}
+ {%- endfor %}
{{ content | safe }}
-
-
{%- if collections.posts %}
{%- set previousPost = collections.posts | getPreviousCollectionItem %}
{%- set nextPost = collections.posts | getNextCollectionItem %}
{%- if nextPost or previousPost %}
-
- {%- if previousPost %}Previous: {{ previousPost.data.title }} {% endif %}
- {%- if nextPost %}Next: {{ nextPost.data.title }} {% endif %}
+
{%- endif %}
{%- endif %}
diff --git a/_includes/postslist.njk b/_includes/postslist.njk
index 4ab5d75..6fdc921 100644
--- a/_includes/postslist.njk
+++ b/_includes/postslist.njk
@@ -1,8 +1,8 @@
{% for post in postslist | reverse %}
-
- {% if post.data.title %}{{ post.data.title }}{% else %}{{ post.url }}
{% endif %}
- {{ post.date | readableDate("LLLL yyyy") }}
-
+
+ {% if post.data.title %}{{ post.data.title }}{% else %}{{ post.url }}
{% endif %}
+ {{ post.date | readableDate("LLLL yyyy") }}
+
{% endfor %}
diff --git a/blog/blog.json b/blog/blog.json
index 1d8b61e..3bc5725 100644
--- a/blog/blog.json
+++ b/blog/blog.json
@@ -1,6 +1,6 @@
{
- "tags": [
- "posts"
- ],
- "layout": "layouts/post.njk"
+ "tags": [
+ "posts"
+ ],
+ "layout": "layouts/post.njk"
}
diff --git a/eleventy.config.js b/eleventy.config.js
index 56f1ea4..0da05ba 100644
--- a/eleventy.config.js
+++ b/eleventy.config.js
@@ -7,113 +7,113 @@ const pluginNavigation = require("@11ty/eleventy-navigation");
const { EleventyHtmlBasePlugin } = require("@11ty/eleventy");
module.exports = function(eleventyConfig) {
- eleventyConfig.ignores.add("README.md");
+ eleventyConfig.ignores.add("README.md");
- // Copy the contents of the `public` folder to the output folder
- // For example, `./public/css/` ends up in `_site/css/`
- eleventyConfig.addPassthroughCopy({
- "./public/": "/",
- "./node_modules/prismjs/themes/prism-okaidia.css": "/css/prism-okaidia.css"
- });
+ // Copy the contents of the `public` folder to the output folder
+ // For example, `./public/css/` ends up in `_site/css/`
+ eleventyConfig.addPassthroughCopy({
+ "./public/": "/",
+ "./node_modules/prismjs/themes/prism-okaidia.css": "/css/prism-okaidia.css"
+ });
- // If your passthrough copy gets heavy and cumbersome, add this line
- // to emulate the file copy on the dev server. Learn more: https://www.11ty.dev/docs/copy/#emulate-passthrough-copy-during-serve
- // eleventyConfig.setServerPassthroughCopyBehavior("passthrough");
+ // If your passthrough copy gets heavy and cumbersome, add this line
+ // to emulate the file copy on the dev server. Learn more: https://www.11ty.dev/docs/copy/#emulate-passthrough-copy-during-serve
+ // eleventyConfig.setServerPassthroughCopyBehavior("passthrough");
- // Add plugins
- eleventyConfig.addPlugin(pluginRss);
- eleventyConfig.addPlugin(pluginSyntaxHighlight);
- eleventyConfig.addPlugin(pluginNavigation);
- eleventyConfig.addPlugin(EleventyHtmlBasePlugin);
+ // Add plugins
+ eleventyConfig.addPlugin(pluginRss);
+ eleventyConfig.addPlugin(pluginSyntaxHighlight);
+ eleventyConfig.addPlugin(pluginNavigation);
+ eleventyConfig.addPlugin(EleventyHtmlBasePlugin);
- eleventyConfig.addFilter("readableDate", (dateObj, format = "dd LLLL yyyy") => {
- return DateTime.fromJSDate(dateObj, {zone: 'utc'}).toFormat(format);
- });
+ eleventyConfig.addFilter("readableDate", (dateObj, format = "dd LLLL yyyy") => {
+ return DateTime.fromJSDate(dateObj, {zone: 'utc'}).toFormat(format);
+ });
- // https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#valid-date-string
- eleventyConfig.addFilter('htmlDateString', (dateObj) => {
- return DateTime.fromJSDate(dateObj, {zone: 'utc'}).toFormat('yyyy-LL-dd');
- });
+ // https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#valid-date-string
+ eleventyConfig.addFilter('htmlDateString', (dateObj) => {
+ return DateTime.fromJSDate(dateObj, {zone: 'utc'}).toFormat('yyyy-LL-dd');
+ });
- // Get the first `n` elements of a collection.
- eleventyConfig.addFilter("head", (array, n) => {
- if(!Array.isArray(array) || array.length === 0) {
- return [];
- }
- if( n < 0 ) {
- return array.slice(n);
- }
+ // Get the first `n` elements of a collection.
+ eleventyConfig.addFilter("head", (array, n) => {
+ if(!Array.isArray(array) || array.length === 0) {
+ return [];
+ }
+ if( n < 0 ) {
+ return array.slice(n);
+ }
- return array.slice(0, n);
- });
+ return array.slice(0, n);
+ });
- // Return the smallest number argument
- eleventyConfig.addFilter("min", (...numbers) => {
- return Math.min.apply(null, numbers);
- });
+ // Return the smallest number argument
+ eleventyConfig.addFilter("min", (...numbers) => {
+ return Math.min.apply(null, numbers);
+ });
- // Return all the tags used in a collection
- eleventyConfig.addFilter("getAllTags", collection => {
- let tagSet = new Set();
- for(let item of collection) {
- (item.data.tags || []).forEach(tag => tagSet.add(tag));
- }
- return Array.from(tagSet);
- });
+ // Return all the tags used in a collection
+ eleventyConfig.addFilter("getAllTags", collection => {
+ let tagSet = new Set();
+ for(let item of collection) {
+ (item.data.tags || []).forEach(tag => tagSet.add(tag));
+ }
+ return Array.from(tagSet);
+ });
- eleventyConfig.addFilter("filterTagList", function filterTagList(tags) {
- return (tags || []).filter(tag => ["all", "nav", "post", "posts"].indexOf(tag) === -1);
- });
+ eleventyConfig.addFilter("filterTagList", function filterTagList(tags) {
+ return (tags || []).filter(tag => ["all", "nav", "post", "posts"].indexOf(tag) === -1);
+ });
- // Customize Markdown library settings:
- eleventyConfig.amendLibrary("md", mdLib => {
- mdLib.use(markdownItAnchor, {
- permalink: markdownItAnchor.permalink.ariaHidden({
- placement: "after",
- class: "direct-link",
- symbol: "#",
- }),
- level: [1,2,3,4],
- slugify: eleventyConfig.getFilter("slugify")
- });
- });
+ // Customize Markdown library settings:
+ eleventyConfig.amendLibrary("md", mdLib => {
+ mdLib.use(markdownItAnchor, {
+ permalink: markdownItAnchor.permalink.ariaHidden({
+ placement: "after",
+ class: "direct-link",
+ symbol: "#",
+ }),
+ level: [1,2,3,4],
+ slugify: eleventyConfig.getFilter("slugify")
+ });
+ });
- return {
- // Control which files Eleventy will process
- // e.g.: *.md, *.njk, *.html, *.liquid
- templateFormats: [
- "md",
- "njk",
- "html",
- "liquid"
- ],
+ return {
+ // Control which files Eleventy will process
+ // e.g.: *.md, *.njk, *.html, *.liquid
+ templateFormats: [
+ "md",
+ "njk",
+ "html",
+ "liquid"
+ ],
- // Pre-process *.md files with: (default: `liquid`)
- markdownTemplateEngine: "njk",
+ // Pre-process *.md files with: (default: `liquid`)
+ markdownTemplateEngine: "njk",
- // Pre-process *.html files with: (default: `liquid`)
- htmlTemplateEngine: "njk",
+ // Pre-process *.html files with: (default: `liquid`)
+ htmlTemplateEngine: "njk",
- // These are all optional (defaults are shown):
- dir: {
- input: ".",
- includes: "_includes",
- data: "_data",
- output: "_site"
- }
+ // These are all optional (defaults are shown):
+ dir: {
+ input: ".",
+ includes: "_includes",
+ data: "_data",
+ output: "_site"
+ }
- // -----------------------------------------------------------------
- // Optional:
+ // -----------------------------------------------------------------
+ // Optional:
- // If your site deploys to a subdirectory, change `pathPrefix`.
- // Read more: https://www.11ty.dev/docs/config/#deploy-to-a-subdirectory-with-a-path-prefix
+ // If your site deploys to a subdirectory, change `pathPrefix`.
+ // Read more: https://www.11ty.dev/docs/config/#deploy-to-a-subdirectory-with-a-path-prefix
- // When paired with the HTML plugin https://www.11ty.dev/docs/plugins/html-base/
- // it will transform any absolute URLs in your HTML to include this
- // folder name and does **not** affect where things go in the output folder.
+ // When paired with the HTML plugin https://www.11ty.dev/docs/plugins/html-base/
+ // it will transform any absolute URLs in your HTML to include this
+ // folder name and does **not** affect where things go in the output folder.
- // Optional (default is shown)
- // pathPrefix: "/",
- // -----------------------------------------------------------------
- };
+ // Optional (default is shown)
+ // pathPrefix: "/",
+ // -----------------------------------------------------------------
+ };
};
diff --git a/feed/feed.11tydata.js b/feed/feed.11tydata.js
index f3e7f32..ed3fec9 100644
--- a/feed/feed.11tydata.js
+++ b/feed/feed.11tydata.js
@@ -1,3 +1,3 @@
module.exports = {
- eleventyExcludeFromCollections: true
+ eleventyExcludeFromCollections: true
}
diff --git a/feed/json.njk b/feed/json.njk
index 0f1b135..35bde56 100644
--- a/feed/json.njk
+++ b/feed/json.njk
@@ -3,27 +3,27 @@
permalink: /feed/feed.json
---
{
- "version": "https://jsonfeed.org/version/1.1",
- "title": "{{ metadata.title }}",
- "language": "{{ metadata.language }}",
- "home_page_url": "{{ metadata.url | addPathPrefixToFullUrl }}",
- "feed_url": "{{ permalink | htmlBaseUrl(metadata.url) }}",
- "description": "{{ metadata.description }}",
- "author": {
- "name": "{{ metadata.author.name }}",
- "url": "{{ metadata.author.url }}"
- },
- "items": [
- {%- for post in collections.posts | reverse %}
- {%- set absolutePostUrl = post.url | htmlBaseUrl(metadata.url) %}
- {
- "id": "{{ absolutePostUrl }}",
- "url": "{{ absolutePostUrl }}",
- "title": "{{ post.data.title }}",
- "content_html": {% if post.templateContent %}{{ post.templateContent | transformWithHtmlBase(absolutePostUrl, post.url) | dump | safe }}{% else %}""{% endif %},
- "date_published": "{{ post.date | dateToRfc3339 }}"
- }
- {% if not loop.last %},{% endif %}
- {%- endfor %}
- ]
+ "version": "https://jsonfeed.org/version/1.1",
+ "title": "{{ metadata.title }}",
+ "language": "{{ metadata.language }}",
+ "home_page_url": "{{ metadata.url | addPathPrefixToFullUrl }}",
+ "feed_url": "{{ permalink | htmlBaseUrl(metadata.url) }}",
+ "description": "{{ metadata.description }}",
+ "author": {
+ "name": "{{ metadata.author.name }}",
+ "url": "{{ metadata.author.url }}"
+ },
+ "items": [
+ {%- for post in collections.posts | reverse %}
+ {%- set absolutePostUrl = post.url | htmlBaseUrl(metadata.url) %}
+ {
+ "id": "{{ absolutePostUrl }}",
+ "url": "{{ absolutePostUrl }}",
+ "title": "{{ post.data.title }}",
+ "content_html": {% if post.templateContent %}{{ post.templateContent | transformWithHtmlBase(absolutePostUrl, post.url) | dump | safe }}{% else %}""{% endif %},
+ "date_published": "{{ post.date | dateToRfc3339 }}"
+ }
+ {% if not loop.last %},{% endif %}
+ {%- endfor %}
+ ]
}
diff --git a/index.njk b/index.njk
index 193f0e6..103f210 100644
--- a/index.njk
+++ b/index.njk
@@ -19,8 +19,8 @@ eleventyNavigation:
{# List every content page in the project #}
{#
#}
diff --git a/package.json b/package.json
index 7af2b47..907b7ab 100644
--- a/package.json
+++ b/package.json
@@ -1,38 +1,38 @@
{
- "name": "eleventy-base-blog",
- "version": "7.0.0",
- "description": "A starter repository for a blog web site using the Eleventy static site generator.",
- "scripts": {
- "build": "npx @11ty/eleventy",
- "build-ghpages": "npx @11ty/eleventy --pathprefix=/eleventy-base-blog/",
- "bench": "DEBUG=Eleventy:Benchmark* npx @11ty/eleventy",
- "watch": "npx @11ty/eleventy --watch",
- "serve": "npx @11ty/eleventy --serve",
- "start": "npx @11ty/eleventy --serve --quiet",
- "start-ghpages": "npx @11ty/eleventy --serve --quiet --pathprefix=/eleventy-base-blog/",
- "debug": "DEBUG=Eleventy* npx @11ty/eleventy"
- },
- "repository": {
- "type": "git",
- "url": "git://github.com/11ty/eleventy-base-blog.git"
- },
- "author": {
- "name": "Zach Leatherman",
- "email": "zachleatherman@gmail.com",
- "url": "https://zachleat.com/"
- },
- "license": "MIT",
- "bugs": {
- "url": "https://github.com/11ty/eleventy-base-blog/issues"
- },
- "homepage": "https://github.com/11ty/eleventy-base-blog#readme",
- "dependencies": {
- "@11ty/eleventy": "2.0.0-beta.1",
- "@11ty/eleventy-navigation": "^0.3.5",
- "@11ty/eleventy-plugin-rss": "^1.2.0",
- "@11ty/eleventy-plugin-syntaxhighlight": "^4.2.0",
- "@11ty/eleventy-plugin-webc": "^0.8.1",
- "luxon": "^3.2.1",
- "markdown-it-anchor": "^8.6.6"
- }
+ "name": "eleventy-base-blog",
+ "version": "7.0.0",
+ "description": "A starter repository for a blog web site using the Eleventy static site generator.",
+ "scripts": {
+ "build": "npx @11ty/eleventy",
+ "build-ghpages": "npx @11ty/eleventy --pathprefix=/eleventy-base-blog/",
+ "bench": "DEBUG=Eleventy:Benchmark* npx @11ty/eleventy",
+ "watch": "npx @11ty/eleventy --watch",
+ "serve": "npx @11ty/eleventy --serve",
+ "start": "npx @11ty/eleventy --serve --quiet",
+ "start-ghpages": "npx @11ty/eleventy --serve --quiet --pathprefix=/eleventy-base-blog/",
+ "debug": "DEBUG=Eleventy* npx @11ty/eleventy"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/11ty/eleventy-base-blog.git"
+ },
+ "author": {
+ "name": "Zach Leatherman",
+ "email": "zachleatherman@gmail.com",
+ "url": "https://zachleat.com/"
+ },
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/11ty/eleventy-base-blog/issues"
+ },
+ "homepage": "https://github.com/11ty/eleventy-base-blog#readme",
+ "dependencies": {
+ "@11ty/eleventy": "2.0.0-beta.1",
+ "@11ty/eleventy-navigation": "^0.3.5",
+ "@11ty/eleventy-plugin-rss": "^1.2.0",
+ "@11ty/eleventy-plugin-syntaxhighlight": "^4.2.0",
+ "@11ty/eleventy-plugin-webc": "^0.8.1",
+ "luxon": "^3.2.1",
+ "markdown-it-anchor": "^8.6.6"
+ }
}
diff --git a/sitemap/sitemap.xml.njk b/sitemap/sitemap.xml.njk
index 5ffdce4..4da684a 100644
--- a/sitemap/sitemap.xml.njk
+++ b/sitemap/sitemap.xml.njk
@@ -5,10 +5,10 @@ eleventyExcludeFromCollections: true
{%- for page in collections.all %}
- {% set absoluteUrl %}{{ page.url | htmlBaseUrl(metadata.url) }}{% endset %}
-
- {{ absoluteUrl }}
- {{ page.date | htmlDateString }}
-
+ {% set absoluteUrl %}{{ page.url | htmlBaseUrl(metadata.url) }}{% endset %}
+
+ {{ absoluteUrl }}
+ {{ page.date | htmlDateString }}
+
{%- endfor %}
diff --git a/tags-list.njk b/tags-list.njk
index 5893fea..3050c9c 100644
--- a/tags-list.njk
+++ b/tags-list.njk
@@ -6,7 +6,7 @@ layout: layouts/home.njk
{% for tag in collections.all | getAllTags | filterTagList %}
- {% set tagUrl %}/tags/{{ tag | slugify }}/{% endset %}
- {{ tag }}
+ {% set tagUrl %}/tags/{{ tag | slugify }}/{% endset %}
+ {{ tag }}
{% endfor %}