diff --git a/.eleventy.js b/.eleventy.js index bab3f55..94af309 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -4,11 +4,9 @@ import { DateTime } from 'luxon'; export default async function (config) { config.setInputDirectory('src'); config.setOutputDirectory('dist'); + config.setIncludesDirectory('_includes'); - config.setIncludesDirectory('src/_includes'); - config.setLayoutsDirectory('src/_layouts'); - - config.setTemplateFormats(['md', 'liquid', 'html']); + config.setTemplateFormats(['md', 'njk', 'html']); config.addPassthroughCopy('src/styles.css'); config.addPassthroughCopy('src/styles/**/*.css'); config.addPassthroughCopy('src/assets/**/*'); diff --git a/src/_includes/base.njk b/src/_includes/base.njk new file mode 100644 index 0000000..c16803f --- /dev/null +++ b/src/_includes/base.njk @@ -0,0 +1,13 @@ + + + + + + + {% block title %}{% endblock %} + + + +{%- block body -%}{%- endblock -%} + + diff --git a/src/_includes/header.njk b/src/_includes/header.njk new file mode 100644 index 0000000..ca033e1 --- /dev/null +++ b/src/_includes/header.njk @@ -0,0 +1,5 @@ +
+
+

This Weblog Belongs to
Z. Charles Dziura

+
+
diff --git a/src/index.liquid b/src/index.liquid deleted file mode 100644 index eb46d40..0000000 --- a/src/index.liquid +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - Z. Charles Dziura | Weblog - - - -
-
-

This Weblog Belongs to
Z. Charles Dziura

-
-
- -
- {%- for post in collections.all -%} - {%- if post.data.type == "thought" -%} -
-
- - An errant thought... -
-
- {{ post.content }} -
- -
- {%- endif -%} - {%- endfor -%} -
- - diff --git a/src/index.njk b/src/index.njk new file mode 100644 index 0000000..a9f3938 --- /dev/null +++ b/src/index.njk @@ -0,0 +1,28 @@ +{% extends "base.njk" %} + +{%- block title -%} +Z. Charles Dziura | Weblog +{%- endblock -%} + +{%- block body -%} +{%- include "header.njk" -%} + +
+{%- for post in collections.all -%} +{%- if post.data.type == "thought" -%} +
+
+ + An errant thought... +
+
+ {{ post.content | safe }} +
+ +
+{%- endif -%} +{%- endfor -%} +
+{%- endblock -%} diff --git a/src/styles.css b/src/styles.css index b45a287..8e9ac75 100644 --- a/src/styles.css +++ b/src/styles.css @@ -24,13 +24,13 @@ body > header { width: max-content; } -body > header > .header__title { +body > header > .title { background-color: var(--color-bg); color: var(--color-on-bg); padding: var(--size-md) var(--size-xl); } -body > header > .header__title > h1 { +body > header > .title > h1 { font-size: var(--font-title); font-weight: 300; margin: 0; diff --git a/src/thoughts.njk b/src/thoughts.njk new file mode 100644 index 0000000..e69de29