From a5526174ba35bd656a1b93a6ffd71a7b4677219c Mon Sep 17 00:00:00 2001 From: Devin Lumley <2636402+devinwl@users.noreply.github.com> Date: Sun, 28 Jan 2024 20:52:09 -0800 Subject: [PATCH] feat: convert templates from njk to html Note: Nunjucks will still process the templates, but this way they can be plain HTML files and will be formatted properly. --- .eleventy.js | 4 + src/_includes/partials/footer.html | 1 + src/_includes/partials/footer.njk | 3 - src/_includes/partials/header.html | 1 + src/_includes/partials/header.njk | 3 - .../partials/{menu.njk => menu.html} | 2 +- src/_layouts/{base.njk => base.html} | 6 +- src/assets/css/global.css | 2 + src/assets/css/global/variables.css | 5 ++ src/assets/css/utils/wrapper.css | 15 ++++ src/data/helpers.js | 75 +++++++++++++++++++ 11 files changed, 107 insertions(+), 10 deletions(-) create mode 100644 src/_includes/partials/footer.html delete mode 100644 src/_includes/partials/footer.njk create mode 100644 src/_includes/partials/header.html delete mode 100644 src/_includes/partials/header.njk rename src/_includes/partials/{menu.njk => menu.html} (85%) rename src/_layouts/{base.njk => base.html} (70%) create mode 100644 src/assets/css/global/variables.css create mode 100644 src/assets/css/utils/wrapper.css create mode 100644 src/data/helpers.js diff --git a/.eleventy.js b/.eleventy.js index 6619667..63c063f 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -10,6 +10,10 @@ module.exports = (eleventyConfig) => { // Optional (default is set): If your site deploys to a subdirectory, change `pathPrefix`, for example with with GitHub pages pathPrefix: "/", + markdownTemplateEngine: "njk", + dataTemplateEngine: "njk", + htmlTemplateEngine: "njk", + dir: { output: "dist", input: "src", diff --git a/src/_includes/partials/footer.html b/src/_includes/partials/footer.html new file mode 100644 index 0000000..b39ed1f --- /dev/null +++ b/src/_includes/partials/footer.html @@ -0,0 +1 @@ + diff --git a/src/_includes/partials/footer.njk b/src/_includes/partials/footer.njk deleted file mode 100644 index c851f2a..0000000 --- a/src/_includes/partials/footer.njk +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/src/_includes/partials/header.html b/src/_includes/partials/header.html new file mode 100644 index 0000000..8116894 --- /dev/null +++ b/src/_includes/partials/header.html @@ -0,0 +1 @@ +
{% include "partials/menu.html" %}
diff --git a/src/_includes/partials/header.njk b/src/_includes/partials/header.njk deleted file mode 100644 index df4f926..0000000 --- a/src/_includes/partials/header.njk +++ /dev/null @@ -1,3 +0,0 @@ -
- {% include "partials/menu.njk" %} -
diff --git a/src/_includes/partials/menu.njk b/src/_includes/partials/menu.html similarity index 85% rename from src/_includes/partials/menu.njk rename to src/_includes/partials/menu.html index 055f78f..6281e1b 100644 --- a/src/_includes/partials/menu.njk +++ b/src/_includes/partials/menu.html @@ -1,4 +1,4 @@ -