From 00f82812d06534a59d355fbe5f1c4b5389e45c29 Mon Sep 17 00:00:00 2001 From: Zach Leatherman Date: Mon, 23 Jan 2023 08:17:38 -0600 Subject: [PATCH] Status commit --- _includes/components/infobox.webc | 24 +++++++++++++++++++ .../syntax-highlight}/prism-diff.css | 0 .../syntax-highlight/syntax-highlight.webc | 5 ++++ _includes/layouts/base.njk | 18 ++++---------- _includes/layouts/home.njk | 5 ---- _includes/layouts/home.webc | 16 +++++++++++++ eleventy.config.js | 15 ++++++++++-- en/404.md | 8 ++++--- en/about/index.md | 2 +- en/blog.njk | 2 +- en/blog/blog.json | 3 ++- en/blog/firstpost.md | 7 +++--- en/blog/fourthpost.md | 1 - en/blog/secondpost.md | 1 - en/blog/thirdpost.md | 5 ++-- en/index.njk | 2 +- en/tags-list.njk | 2 +- en/tags.njk | 2 +- package.json | 9 +++---- public/css/index.css | 19 --------------- 20 files changed, 85 insertions(+), 61 deletions(-) create mode 100644 _includes/components/infobox.webc rename {public/css => _includes/components/syntax-highlight}/prism-diff.css (100%) create mode 100644 _includes/components/syntax-highlight/syntax-highlight.webc delete mode 100644 _includes/layouts/home.njk create mode 100644 _includes/layouts/home.webc diff --git a/_includes/components/infobox.webc b/_includes/components/infobox.webc new file mode 100644 index 0000000000..9160048eae --- /dev/null +++ b/_includes/components/infobox.webc @@ -0,0 +1,24 @@ +
+ +
+ + diff --git a/public/css/prism-diff.css b/_includes/components/syntax-highlight/prism-diff.css similarity index 100% rename from public/css/prism-diff.css rename to _includes/components/syntax-highlight/prism-diff.css diff --git a/_includes/components/syntax-highlight/syntax-highlight.webc b/_includes/components/syntax-highlight/syntax-highlight.webc new file mode 100644 index 0000000000..6617af6e19 --- /dev/null +++ b/_includes/components/syntax-highlight/syntax-highlight.webc @@ -0,0 +1,5 @@ + + +``` + +``` diff --git a/_includes/layouts/base.njk b/_includes/layouts/base.njk index 9e786bd3f2..f0575b0af0 100644 --- a/_includes/layouts/base.njk +++ b/_includes/layouts/base.njk @@ -9,9 +9,11 @@ {#- Uncomment this if you’d like folks to know that you used Eleventy to build your site! #} {#- #} - - + + @@ -36,18 +38,6 @@ - - -
-
    -
  1. Edit the _data/metadata.json with your blog’s information.
  2. -
  3. (Optional) Edit .eleventy.js with your configuration preferences.
  4. -
  5. Delete this message from _includes/layouts/base.njk.
  6. -
-

This is an Eleventy project created from the eleventy-base-blog repo.

-
- - {{ content | safe }} diff --git a/_includes/layouts/home.njk b/_includes/layouts/home.njk deleted file mode 100644 index ebba6b3faf..0000000000 --- a/_includes/layouts/home.njk +++ /dev/null @@ -1,5 +0,0 @@ ---- -layout: layouts/base.njk -templateClass: tmpl-home ---- -{{ content | safe }} diff --git a/_includes/layouts/home.webc b/_includes/layouts/home.webc new file mode 100644 index 0000000000..50613f568b --- /dev/null +++ b/_includes/layouts/home.webc @@ -0,0 +1,16 @@ +--- +layout: layouts/base.njk +templateClass: tmpl-home +--- + + +
    +
  1. Edit the _data/metadata.json with your blog’s information.
  2. +
  3. (Optional) Edit .eleventy.js with your configuration preferences.
  4. +
  5. Delete this message from _includes/layouts/home.webc.
  6. +
+

This is an Eleventy project created from the eleventy-base-blog repo.

+
+ + + diff --git a/eleventy.config.js b/eleventy.config.js index e0a2612f0c..2e3080f3c9 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -1,10 +1,17 @@ const { DateTime } = require("luxon"); const rosetta = require("rosetta"); const markdownItAnchor = require("markdown-it-anchor"); + const pluginRss = require("@11ty/eleventy-plugin-rss"); const pluginSyntaxHighlight = require("@11ty/eleventy-plugin-syntaxhighlight"); const pluginNavigation = require("@11ty/eleventy-navigation"); -const { EleventyI18nPlugin, EleventyHtmlBasePlugin } = require("@11ty/eleventy"); +const pluginWebc = require("@11ty/eleventy-plugin-webc"); + +const { + EleventyRenderPlugin, + EleventyI18nPlugin, + EleventyHtmlBasePlugin +} = require("@11ty/eleventy"); const languageStrings = require("./i18n.js"); @@ -15,7 +22,6 @@ module.exports = function(eleventyConfig) { // For example, `./public/css/` ends up in `_site/css/` eleventyConfig.addPassthroughCopy({ "./public/": "/", - "./node_modules/prismjs/themes/prism-okaidia.css": "/css/prism-theme.css", }); // Add plugins @@ -23,6 +29,11 @@ module.exports = function(eleventyConfig) { eleventyConfig.addPlugin(pluginSyntaxHighlight); eleventyConfig.addPlugin(pluginNavigation); eleventyConfig.addPlugin(EleventyHtmlBasePlugin); + eleventyConfig.addPlugin(EleventyRenderPlugin); + + eleventyConfig.addPlugin(pluginWebc, { + components: "./_includes/components/**/*.webc" + }); eleventyConfig.addPlugin(EleventyI18nPlugin, { defaultLanguage: "en", diff --git a/en/404.md b/en/404.md index bbedc2ee25..51a5e486f7 100644 --- a/en/404.md +++ b/en/404.md @@ -1,5 +1,5 @@ --- -layout: layouts/home.njk +layout: layouts/home.webc permalink: 404.html eleventyExcludeFromCollections: true --- @@ -7,11 +7,13 @@ eleventyExcludeFromCollections: true Go home. -{# + diff --git a/en/about/index.md b/en/about/index.md index 7863f73722..f9b74cee1c 100644 --- a/en/about/index.md +++ b/en/about/index.md @@ -6,6 +6,6 @@ eleventyNavigation: key: nav.about order: 3 --- -# {{ title }} +# I am a person that writes stuff. diff --git a/en/blog.njk b/en/blog.njk index 7f7353f9d1..0ea7d16a89 100644 --- a/en/blog.njk +++ b/en/blog.njk @@ -1,5 +1,5 @@ --- -layout: layouts/home.njk +layout: layouts/home.webc eleventyNavigation: key: nav.archive order: 2 diff --git a/en/blog/blog.json b/en/blog/blog.json index 17f25d5b19..1d8b61e808 100644 --- a/en/blog/blog.json +++ b/en/blog/blog.json @@ -1,5 +1,6 @@ { "tags": [ "posts" - ] + ], + "layout": "layouts/post.njk" } diff --git a/en/blog/firstpost.md b/en/blog/firstpost.md index 111e21b3f0..ec2a42dd35 100644 --- a/en/blog/firstpost.md +++ b/en/blog/firstpost.md @@ -4,17 +4,18 @@ description: This is a post on My Blog about agile frameworks. date: 2018-05-01 tags: - another tag -layout: layouts/post.njk --- Leverage agile frameworks to provide a robust synopsis for high level overviews. Iterative approaches to corporate strategy foster collaborative thinking to further the overall value proposition. Organically grow the holistic world view of disruptive innovation via workplace diversity and empowerment. Bring to the table win-win survival strategies to ensure proactive domination. At the end of the day, going forward, a new normal that has evolved from generation X is on the runway heading towards a streamlined cloud solution. User generated content in real-time will have multiple touchpoints for offshoring. +{{ "/" | locale_url }} + ## Section Header Capitalize on low hanging fruit to identify a ballpark value added activity to beta test. Override the digital divide with additional clickthroughs from DevOps. Nanotechnology immersion along the information highway will close the loop on focusing solely on the bottom line. -```diff-js + diff --git a/en/blog/fourthpost.md b/en/blog/fourthpost.md index c928a9f3be..c4a094d256 100644 --- a/en/blog/fourthpost.md +++ b/en/blog/fourthpost.md @@ -3,7 +3,6 @@ title: This is my fourth post. description: This is a post on My Blog about touchpoints and circling wagons. date: 2018-09-30 tags: second tag -layout: layouts/post.njk --- Leverage agile frameworks to provide a robust synopsis for high level overviews. Iterative approaches to corporate strategy foster collaborative thinking to further the overall value proposition. Organically grow the holistic world view of disruptive innovation via workplace diversity and empowerment. diff --git a/en/blog/secondpost.md b/en/blog/secondpost.md index 4947946ec2..3c521a644c 100644 --- a/en/blog/secondpost.md +++ b/en/blog/secondpost.md @@ -4,7 +4,6 @@ description: This is a post on My Blog about leveraging agile frameworks. date: 2018-07-04 tags: - number 2 -layout: layouts/post.njk --- Leverage agile frameworks to provide a robust synopsis for high level overviews. Iterative approaches to corporate strategy foster collaborative thinking to further the overall value proposition. Organically grow the holistic world view of disruptive innovation via workplace diversity and empowerment. diff --git a/en/blog/thirdpost.md b/en/blog/thirdpost.md index b45e303a05..7516d384be 100644 --- a/en/blog/thirdpost.md +++ b/en/blog/thirdpost.md @@ -5,11 +5,10 @@ date: 2018-08-24 tags: - second tag - posts with two tags -layout: layouts/post.njk --- Leverage agile frameworks to provide a robust synopsis for high level overviews. Iterative approaches to corporate strategy foster collaborative thinking to further the overall value proposition. Organically grow the holistic world view of disruptive innovation via workplace diversity and empowerment. -```js + Bring to the table win-win survival strategies to ensure proactive domination. At the end of the day, going forward, a new normal that has evolved from generation X is on the runway heading towards a streamlined cloud solution. User generated content in real-time will have multiple touchpoints for offshoring. diff --git a/en/index.njk b/en/index.njk index de365bb312..947702e500 100644 --- a/en/index.njk +++ b/en/index.njk @@ -1,5 +1,5 @@ --- -layout: layouts/home.njk +layout: layouts/home.webc eleventyNavigation: key: i18n.nav.home order: 1 diff --git a/en/tags-list.njk b/en/tags-list.njk index 5893feacc3..69448213c9 100644 --- a/en/tags-list.njk +++ b/en/tags-list.njk @@ -1,6 +1,6 @@ --- permalink: /tags/ -layout: layouts/home.njk +layout: layouts/home.webc ---

Tags

diff --git a/en/tags.njk b/en/tags.njk index 437598abe3..1681c4b722 100644 --- a/en/tags.njk +++ b/en/tags.njk @@ -9,7 +9,7 @@ pagination: - posts - tagList addAllPagesToCollections: true -layout: layouts/home.njk +layout: layouts/home.webc eleventyComputed: title: Tagged “{{ tag }}” permalink: /tags/{{ tag | slugify }}/ diff --git a/package.json b/package.json index f62d02f035..b162f55004 100644 --- a/package.json +++ b/package.json @@ -27,12 +27,13 @@ }, "homepage": "https://github.com/11ty/eleventy-base-blog#readme", "dependencies": { - "@11ty/eleventy": "^2.0.0-canary.15", + "@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.1.0", - "luxon": "^3.0.1", - "markdown-it-anchor": "^8.6.4", + "@11ty/eleventy-plugin-syntaxhighlight": "^4.2.0", + "@11ty/eleventy-plugin-webc": "^0.8.1", + "luxon": "^3.2.1", + "markdown-it-anchor": "^8.6.6", "rosetta": "^1.1.0" } } diff --git a/public/css/index.css b/public/css/index.css index deba926605..b3ee99c152 100644 --- a/public/css/index.css +++ b/public/css/index.css @@ -227,25 +227,6 @@ header { margin-right: 1em; } -/* Infobox */ -:root { - --color-infobox: #ffc; -} -@media (prefers-color-scheme: dark) { - :root { - --color-infobox: #082840; - } -} - -.infobox { - background-color: var(--color-infobox); - color: var(--color-gray-90); - padding: 1em 0.625em; /* 16px 10px /16 */ -} -.infobox ol:only-child { - margin: 0; -} - /* Direct Links / Markdown Headers */ .direct-link { font-family: sans-serif;