From 65feb1c686bde7b0d552fa3720aa6ae9db6c1dfd Mon Sep 17 00:00:00 2001 From: Zach Leatherman Date: Mon, 23 Jan 2023 10:02:06 -0600 Subject: [PATCH] Cleaned up v2.0 status --- en/404.md => 404.md | 2 +- README.md | 16 ++-- _includes/components/infobox.webc | 24 ------ .../syntax-highlight/syntax-highlight.webc | 5 -- _includes/layouts/base.njk | 31 +++----- _includes/layouts/{home.webc => home.njk} | 12 +-- _includes/layouts/post.njk | 19 +---- about/index.md | 9 +++ en/blog.njk => blog.njk | 5 +- {en/blog => blog}/blog.json | 0 {en/blog => blog}/firstpost.md | 6 +- {en/blog => blog}/fourthpost.md | 0 {en/blog => blog}/secondpost.md | 0 {en/blog => blog}/thirdpost.md | 4 +- eleventy.config.js | 76 ++++++------------- en/about/index.md | 11 --- en/en.11tydata.js | 11 --- en/index.njk | 22 ------ es/blog/fourthpost.md | 14 ---- es/blog/thirdpost.md | 24 ------ es/es.11tydata.js | 11 --- i18n.js | 22 ------ index.njk | 26 +++++++ package.json | 5 +- public/css/index.css | 10 +-- public/css/message-box.css | 18 +++++ .../css}/prism-diff.css | 0 sitemap/sitemap.xml.njk | 7 -- en/tags-list.njk => tags-list.njk | 2 +- en/tags.njk => tags.njk | 2 +- 30 files changed, 116 insertions(+), 278 deletions(-) rename en/404.md => 404.md (93%) delete mode 100644 _includes/components/infobox.webc delete mode 100644 _includes/components/syntax-highlight/syntax-highlight.webc rename _includes/layouts/{home.webc => home.njk} (53%) create mode 100644 about/index.md rename en/blog.njk => blog.njk (73%) rename {en/blog => blog}/blog.json (100%) rename {en/blog => blog}/firstpost.md (93%) rename {en/blog => blog}/fourthpost.md (100%) rename {en/blog => blog}/secondpost.md (100%) rename {en/blog => blog}/thirdpost.md (95%) delete mode 100644 en/about/index.md delete mode 100644 en/en.11tydata.js delete mode 100644 en/index.njk delete mode 100644 es/blog/fourthpost.md delete mode 100644 es/blog/thirdpost.md delete mode 100644 es/es.11tydata.js delete mode 100644 i18n.js create mode 100644 index.njk create mode 100644 public/css/message-box.css rename {_includes/components/syntax-highlight => public/css}/prism-diff.css (100%) rename en/tags-list.njk => tags-list.njk (90%) rename en/tags.njk => tags.njk (93%) diff --git a/en/404.md b/404.md similarity index 93% rename from en/404.md rename to 404.md index 51a5e48..bd51f61 100644 --- a/en/404.md +++ b/404.md @@ -1,5 +1,5 @@ --- -layout: layouts/home.webc +layout: layouts/home.njk permalink: 404.html eleventyExcludeFromCollections: true --- diff --git a/README.md b/README.md index 6441ff0..7dfd105 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # eleventy-base-blog -A starter repository showing how to build a (multi-language friendly) blog with the [Eleventy](https://github.com/11ty/eleventy) static site generator. +A starter repository showing how to build a blog with the [Eleventy](https://github.com/11ty/eleventy) site generator. [![Build Status](https://travis-ci.org/11ty/eleventy-base-blog.svg?branch=master)](https://travis-ci.org/11ty/eleventy-base-blog) @@ -33,7 +33,7 @@ git clone https://github.com/11ty/eleventy-base-blog.git my-blog-name cd my-blog-name ``` -Specifically have a look at `.eleventy.js` to see if you want to configure any Eleventy options differently. +Specifically have a look at `eleventy.config.js` to see if you want to configure any Eleventy options differently. ### 3. Install dependencies @@ -63,14 +63,12 @@ DEBUG=Eleventy* npx @11ty/eleventy ### Implementation Notes -- `en` is the folder for content (written using the primary language for project, here we’re using English) -- `en/about/index.md` is an example of an English content page. -- `en/blog/` has the English blog posts but really they can live in any directory. They need only the `post` tag to be included in the blog posts [collection](https://www.11ty.dev/docs/collections/). - - To localize a blog post you will need to add a top level folder for that language (`es` for Spanish, `ja` for Japanese, `en-us` for American English) and match the rest of the file path to the primary language folder. For example `en/blog/my-post.md` could have `ja/blog/my-post.md` or `es/blog/my-post.md`. Read more about [best practices for organizing files for internationalization (i18n) in Eleventy projects](https://www.11ty.dev/docs/i18n/). -- Use the `eleventyNavigation` key in your front matter to add a template to the top level site navigation. For example, this is in use on `index.njk` and `about/index.md`. +- `about/index.md` is an example of a content page. +- `blog/` has the blog posts but really they can live in any directory. They need only the `post` tag to be included in the blog posts [collection](https://www.11ty.dev/docs/collections/). +- Use the `eleventyNavigation` key in your front matter to add a template to the top level site navigation. This is in use on `index.njk` and `about/index.md`. - This makes use of the [Eleventy Navigation plugin](https://www.11ty.dev/docs/plugins/navigation/) -- Content can be any template format (blog posts needn’t be markdown, for example). Configure your supported templates in `.eleventy.js` -> `templateFormats`. -- The `public` folder in your input directory will be copied to the output folder (via `addPassthroughCopy()` in the `.eleventy.js` file). This means `./public/css/*` will live at `./_site/css/*` after your build completes. [When using `--serve` this behavior is emulated](/docs/copy/#passthrough-during-serve) (the files will not show up in `_site`). +- Content can be any template format (blog posts needn’t be markdown, for example). Configure your supported templates in `eleventy.config.js` -> `templateFormats`. +- The `public` folder in your input directory will be copied to the output folder (via `addPassthroughCopy` in the `eleventy.config.js` file). This means `./public/css/*` will live at `./_site/css/*` after your build completes. - The blog post feed template is in `feed/feed.njk`. This is also a good example of using a global data files in that it uses `_data/metadata.json`. - This project uses three layouts: - `_includes/layouts/base.njk`: the top level HTML structure diff --git a/_includes/components/infobox.webc b/_includes/components/infobox.webc deleted file mode 100644 index 9160048..0000000 --- a/_includes/components/infobox.webc +++ /dev/null @@ -1,24 +0,0 @@ -
- -
- - diff --git a/_includes/components/syntax-highlight/syntax-highlight.webc b/_includes/components/syntax-highlight/syntax-highlight.webc deleted file mode 100644 index 6617af6..0000000 --- a/_includes/components/syntax-highlight/syntax-highlight.webc +++ /dev/null @@ -1,5 +0,0 @@ - - -``` - -``` diff --git a/_includes/layouts/base.njk b/_includes/layouts/base.njk index f0575b0..86c3f01 100644 --- a/_includes/layouts/base.njk +++ b/_includes/layouts/base.njk @@ -1,5 +1,5 @@ - + @@ -10,34 +10,27 @@ {#- #} - + + - - {%- set alternateUrls = page.url | locale_links %} - {% if alternateUrls.length %} - - {%- for link in alternateUrls %} - - {%- endfor %} - {%- endif %}

{{ metadata.title }}

{#- Read more about `eleventy-navigation` at https://www.11ty.dev/docs/plugins/navigation/ #} - -
+ + - +
{{ content | safe }}
diff --git a/_includes/layouts/home.webc b/_includes/layouts/home.njk similarity index 53% rename from _includes/layouts/home.webc rename to _includes/layouts/home.njk index 50613f5..d71000f 100644 --- a/_includes/layouts/home.webc +++ b/_includes/layouts/home.njk @@ -1,16 +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. +
  7. (Optional) Edit eleventy.config.js with your configuration preferences.
  8. +
  9. Delete this message from _includes/layouts/home.njk.

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

- +
- +{{ content | safe }} diff --git a/_includes/layouts/post.njk b/_includes/layouts/post.njk index 83e5c56..01f6583 100644 --- a/_includes/layouts/post.njk +++ b/_includes/layouts/post.njk @@ -1,6 +1,5 @@ --- layout: layouts/base.njk -templateClass: tmpl-post ---

{{ title }}

@@ -16,27 +15,13 @@ templateClass: tmpl-post
-{% set i18nLinks = page.url | locale_links %} -{% if i18nLinks.length %} -
    -
  • - {{ "i18n.also" | i18n }} - {%- for link in i18nLinks %} - {{ link.label }} - {%- if not loop.last %},{% endif %} - {%- endfor -%} -
  • -
-{% endif %} - {%- if collections.posts %} -{# these filters are locale-aware in 2.0.0-canary.14 #} {%- set previousPost = collections.posts | getPreviousCollectionItem %} {%- set nextPost = collections.posts | getNextCollectionItem %} {%- if nextPost or previousPost %} {%- endif %} {%- endif %} diff --git a/about/index.md b/about/index.md new file mode 100644 index 0000000..18367d8 --- /dev/null +++ b/about/index.md @@ -0,0 +1,9 @@ +--- +layout: layouts/base.njk +eleventyNavigation: + key: About Me + order: 3 +--- +# About Me + +I am a person that writes stuff. diff --git a/en/blog.njk b/blog.njk similarity index 73% rename from en/blog.njk rename to blog.njk index 0ea7d16..c7e04d6 100644 --- a/en/blog.njk +++ b/blog.njk @@ -1,10 +1,9 @@ --- -layout: layouts/home.webc +layout: layouts/home.njk eleventyNavigation: - key: nav.archive + key: Archive order: 2 --- -

Archive

{% set postslist = collections.posts %} diff --git a/en/blog/blog.json b/blog/blog.json similarity index 100% rename from en/blog/blog.json rename to blog/blog.json diff --git a/en/blog/firstpost.md b/blog/firstpost.md similarity index 93% rename from en/blog/firstpost.md rename to blog/firstpost.md index ec2a42d..0557716 100644 --- a/en/blog/firstpost.md +++ b/blog/firstpost.md @@ -9,13 +9,11 @@ Leverage agile frameworks to provide a robust synopsis for high level overviews. 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 --git a/en/blog/fourthpost.md b/blog/fourthpost.md similarity index 100% rename from en/blog/fourthpost.md rename to blog/fourthpost.md diff --git a/en/blog/secondpost.md b/blog/secondpost.md similarity index 100% rename from en/blog/secondpost.md rename to blog/secondpost.md diff --git a/en/blog/thirdpost.md b/blog/thirdpost.md similarity index 95% rename from en/blog/thirdpost.md rename to blog/thirdpost.md index 7516d38..c57ab3b 100644 --- a/en/blog/thirdpost.md +++ b/blog/thirdpost.md @@ -8,7 +8,7 @@ tags: --- 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. diff --git a/eleventy.config.js b/eleventy.config.js index 2e3080f..56f1ea4 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -1,19 +1,10 @@ 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 pluginWebc = require("@11ty/eleventy-plugin-webc"); - -const { - EleventyRenderPlugin, - EleventyI18nPlugin, - EleventyHtmlBasePlugin -} = require("@11ty/eleventy"); - -const languageStrings = require("./i18n.js"); +const { EleventyHtmlBasePlugin } = require("@11ty/eleventy"); module.exports = function(eleventyConfig) { eleventyConfig.ignores.add("README.md"); @@ -22,23 +13,18 @@ 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-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"); + // Add plugins eleventyConfig.addPlugin(pluginRss); eleventyConfig.addPlugin(pluginSyntaxHighlight); eleventyConfig.addPlugin(pluginNavigation); eleventyConfig.addPlugin(EleventyHtmlBasePlugin); - eleventyConfig.addPlugin(EleventyRenderPlugin); - - eleventyConfig.addPlugin(pluginWebc, { - components: "./_includes/components/**/*.webc" - }); - - eleventyConfig.addPlugin(EleventyI18nPlugin, { - defaultLanguage: "en", - errorMode: "allow-fallback", - }); eleventyConfig.addFilter("readableDate", (dateObj, format = "dd LLLL yyyy") => { return DateTime.fromJSDate(dateObj, {zone: 'utc'}).toFormat(format); @@ -79,7 +65,7 @@ module.exports = function(eleventyConfig) { return (tags || []).filter(tag => ["all", "nav", "post", "posts"].indexOf(tag) === -1); }); - // Customize Markdown library and settings: + // Customize Markdown library settings: eleventyConfig.amendLibrary("md", mdLib => { mdLib.use(markdownItAnchor, { permalink: markdownItAnchor.permalink.ariaHidden({ @@ -88,28 +74,10 @@ module.exports = function(eleventyConfig) { symbol: "#", }), level: [1,2,3,4], - slugify: eleventyConfig.getFilter("slug") + slugify: eleventyConfig.getFilter("slugify") }); }); - // Override @11ty/eleventy-dev-server defaults (used only with --serve) - eleventyConfig.setServerOptions({ - showVersion: true, - }); - - // i18n filter using Rosetta - const rosettaLib = rosetta(languageStrings); - - eleventyConfig.addFilter("i18n", function (key, lang) { - const I18N_PREFIX = "i18n."; - if(key.startsWith(I18N_PREFIX)) { - key = key.slice(I18N_PREFIX.length); - } - // depends on page.lang in 2.0.0-canary.14+ - let page = this.page || this.ctx?.page || this.context?.environments?.page || {}; - return rosettaLib.t(key, {}, lang || page.lang); - }); - return { // Control which files Eleventy will process // e.g.: *.md, *.njk, *.html, *.liquid @@ -126,20 +94,6 @@ module.exports = function(eleventyConfig) { // Pre-process *.html files with: (default: `liquid`) htmlTemplateEngine: "njk", - // ----------------------------------------------------------------- - // If your site deploys to a subdirectory, change `pathPrefix`. - // Don’t worry about leading and trailing slashes, we normalize these. - - // If you don’t have a subdirectory, use "" or "/" (they do the same thing) - // This is only used for link URLs (it does not affect your file structure) - // Best paired with the `url` filter: https://www.11ty.dev/docs/filters/url/ - - // You can also pass this in on the command line using `--pathprefix` - - // Optional (default is shown) - pathPrefix: "/", - // ----------------------------------------------------------------- - // These are all optional (defaults are shown): dir: { input: ".", @@ -147,5 +101,19 @@ module.exports = function(eleventyConfig) { data: "_data", output: "_site" } + + // ----------------------------------------------------------------- + // 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 + + // 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: "/", + // ----------------------------------------------------------------- }; }; diff --git a/en/about/index.md b/en/about/index.md deleted file mode 100644 index f9b74ce..0000000 --- a/en/about/index.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -layout: layouts/base.njk -title: About Me -templateClass: tmpl-post -eleventyNavigation: - key: nav.about - order: 3 ---- -# - -I am a person that writes stuff. diff --git a/en/en.11tydata.js b/en/en.11tydata.js deleted file mode 100644 index 77633c0..0000000 --- a/en/en.11tydata.js +++ /dev/null @@ -1,11 +0,0 @@ -module.exports = { - lang: "en", - permalink: function(data) { - // Change (English) /en/blog/my-post URLs to have an implied language code /blog/my-post URLs instead. - let [slashPrefixEmpty, langCode, ...stem] = data.page.filePathStem.split("/"); - let path = stem.join("/"); - - // Account for `permalink: 404.html` style - return stem[stem.length - 1] === "index" ? `${path}.html` : `${path}/index.html`; - } -} diff --git a/en/index.njk b/en/index.njk deleted file mode 100644 index 947702e..0000000 --- a/en/index.njk +++ /dev/null @@ -1,22 +0,0 @@ ---- -layout: layouts/home.webc -eleventyNavigation: - key: i18n.nav.home - order: 1 ---- -{% set maxPosts = collections.posts.length | min(3) %} -

Latest {% if maxPosts == 1 %}Post{% else %}{{ maxPosts }} Posts{% endif %}

- -{% set postslist = collections.posts | head(-3) %} -{% set postslistCounter = collections.posts | length %} -{% include "postslist.njk" %} - -

More posts can be found in the archive.

- -{# List all of the pages in the project - -#} diff --git a/es/blog/fourthpost.md b/es/blog/fourthpost.md deleted file mode 100644 index 6c3c565..0000000 --- a/es/blog/fourthpost.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: Esta es mi cuarta publicación. -slugOverride: cuarta publicación -date: 2018-09-30 -layout: layouts/post.njk ---- -Aproveche los marcos ágiles para proporcionar una sinopsis sólida para descripciones generales de alto nivel. Los enfoques iterativos de la estrategia corporativa fomentan el pensamiento colaborativo para promover la propuesta de valor general. Hacer crecer orgánicamente la visión holística del mundo de la innovación disruptiva a través de la diversidad y el empoderamiento en el lugar de trabajo. - -Traiga a la mesa estrategias de supervivencia de ganar-ganar para asegurar una dominación proactiva. Al final del día, en el futuro, una nueva normalidad que ha evolucionado desde la generación X está en camino hacia una solución de nube optimizada. El contenido generado por el usuario en tiempo real tendrá múltiples puntos de contacto para la deslocalización. - -## Encabezado de sección - -Saque provecho de la fruta al alcance de la mano para identificar una actividad de valor agregado de estadio de béisbol para la prueba beta. Supere la brecha digital con clics adicionales de DevOps. La inmersión en nanotecnología a lo largo de la autopista de la información cerrará el círculo centrándose únicamente en el resultado final. - diff --git a/es/blog/thirdpost.md b/es/blog/thirdpost.md deleted file mode 100644 index 23690e2..0000000 --- a/es/blog/thirdpost.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: Esta es mi tercer publicación. -date: 2018-09-30 -layout: layouts/post.njk ---- -Aproveche los marcos ágiles para proporcionar una sinopsis sólida para descripciones generales de alto nivel. Los enfoques iterativos de la estrategia corporativa fomentan el pensamiento colaborativo para promover la propuesta de valor general. Hacer crecer orgánicamente la visión holística del mundo de la innovación disruptiva a través de la diversidad y el empoderamiento en el lugar de trabajo. - -```js -// this is a command -function myCommand() { - let counter = 0; - counter++; -} - -// Test with a line break above this line. -console.log('Test'); -``` - -Traiga a la mesa estrategias de supervivencia de ganar-ganar para asegurar una dominación proactiva. Al final del día, en el futuro, una nueva normalidad que ha evolucionado desde la generación X está en camino hacia una solución de nube optimizada. El contenido generado por el usuario en tiempo real tendrá múltiples puntos de contacto para la deslocalización. - -## Encabezado de sección - -Saque provecho de la fruta al alcance de la mano para identificar una actividad de valor agregado de estadio de béisbol para la prueba beta. Supere la brecha digital con clics adicionales de DevOps. La inmersión en nanotecnología a lo largo de la autopista de la información cerrará el círculo centrándose únicamente en el resultado final. - diff --git a/es/es.11tydata.js b/es/es.11tydata.js deleted file mode 100644 index 4267c79..0000000 --- a/es/es.11tydata.js +++ /dev/null @@ -1,11 +0,0 @@ -module.exports = { - "lang": "es", - "permalink": function(data) { - // Slug override is set in the post for localized URL slugs - // e.g. /es/blog/fourthpost.md will optionally write to - // /es/blog/cuarta-publicacion/ instead of /es/blog/fourth-post/ - if(data.slugOverride) { - return `/${data.lang}/blog/${this.slugify(data.slugOverride)}/`; - } - } -} diff --git a/i18n.js b/i18n.js deleted file mode 100644 index 3feb584..0000000 --- a/i18n.js +++ /dev/null @@ -1,22 +0,0 @@ -module.exports = { - en: { - also: "This page is also available in:", - previous: "Previous", - next: "Next", - nav: { - home: "Home", - archive: "Archive", - about: "About Me", - } - }, - es: { - also: "Esta página también está disponible en:", - previous: "Anterior", - next: "Siguiente", - nav: { - home: "Página de inicio", - archive: "Archivo", - about: "Acerca de mí", - } - } -}; diff --git a/index.njk b/index.njk new file mode 100644 index 0000000..193f0e6 --- /dev/null +++ b/index.njk @@ -0,0 +1,26 @@ +--- +layout: layouts/home.njk +eleventyNavigation: + key: Home + order: 1 +--- +{% set postsCount = collections.posts | length %} +{% set latestPostsCount = postsCount | min(3) %} +

Latest {{ latestPostsCount }} Post{% if latestPostsCount != 1 %}s{% endif %}

+ +{% set postslist = collections.posts | head(-3) %} +{% set postslistCounter = postsCount %} +{% include "postslist.njk" %} + +{% if postsCount > 3 %} +

More posts can be found in the archive.

+{% endif %} + +{# List every content page in the project #} +{# + +#} diff --git a/package.json b/package.json index b162f55..7af2b47 100644 --- a/package.json +++ b/package.json @@ -27,13 +27,12 @@ }, "homepage": "https://github.com/11ty/eleventy-base-blog#readme", "dependencies": { - "@11ty/eleventy": "^2.0.0-beta.1", + "@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", - "rosetta": "^1.1.0" + "markdown-it-anchor": "^8.6.6" } } diff --git a/public/css/index.css b/public/css/index.css index b3ee99c..2e10a7f 100644 --- a/public/css/index.css +++ b/public/css/index.css @@ -152,8 +152,7 @@ header { .nav-item a[href]:not(:hover) { text-decoration: none; } -.nav-item-active { - font-weight: 700; +.nav a[href][aria-current="page"] { text-decoration: underline; } @@ -187,6 +186,8 @@ header { word-spacing: -0.5px; } .postlist-link { + font-size: 1.1875em; /* 19px /16 */ + font-weight: 700; flex-basis: calc(100% - 1.5rem); padding-left: .25em; padding-right: .5em; @@ -197,11 +198,6 @@ header { .postlist-item-active .postlist-link { font-weight: bold; } -.tmpl-home .postlist-link { - font-size: 1.1875em; /* 19px /16 */ - font-weight: 700; -} - /* Tags */ .post-tag { diff --git a/public/css/message-box.css b/public/css/message-box.css new file mode 100644 index 0000000..dd3ddac --- /dev/null +++ b/public/css/message-box.css @@ -0,0 +1,18 @@ +/* Message Box */ +.message-box { + --color-message-box: #ffc; + + display: block; + background-color: var(--color-message-box); + color: var(--color-gray-90); + padding: 1em 0.625em; /* 16px 10px /16 */ +} +.message-box ol:only-child { + margin: 0; +} + +@media (prefers-color-scheme: dark) { + .message-box { + --color-message-box: #082840; + } +} diff --git a/_includes/components/syntax-highlight/prism-diff.css b/public/css/prism-diff.css similarity index 100% rename from _includes/components/syntax-highlight/prism-diff.css rename to public/css/prism-diff.css diff --git a/sitemap/sitemap.xml.njk b/sitemap/sitemap.xml.njk index a0f7488..5ffdce4 100644 --- a/sitemap/sitemap.xml.njk +++ b/sitemap/sitemap.xml.njk @@ -9,13 +9,6 @@ eleventyExcludeFromCollections: true {{ absoluteUrl }} {{ page.date | htmlDateString }} - {%- set alternateUrls = page.url | locale_links %} - {%- if alternateUrls.length %} - - {%- for link in alternateUrls %} - - {%- endfor %} - {%- endif %} {%- endfor %} diff --git a/en/tags-list.njk b/tags-list.njk similarity index 90% rename from en/tags-list.njk rename to tags-list.njk index 6944821..5893fea 100644 --- a/en/tags-list.njk +++ b/tags-list.njk @@ -1,6 +1,6 @@ --- permalink: /tags/ -layout: layouts/home.webc +layout: layouts/home.njk ---

Tags

diff --git a/en/tags.njk b/tags.njk similarity index 93% rename from en/tags.njk rename to tags.njk index 1681c4b..437598a 100644 --- a/en/tags.njk +++ b/tags.njk @@ -9,7 +9,7 @@ pagination: - posts - tagList addAllPagesToCollections: true -layout: layouts/home.webc +layout: layouts/home.njk eleventyComputed: title: Tagged “{{ tag }}” permalink: /tags/{{ tag | slugify }}/