From 6f5394010bf3c60038ea1eaf612cd5116d5669d5 Mon Sep 17 00:00:00 2001
From: Nathan Upchurch
{{ synopsis | markdownify | safe}}
diff --git a/_includes/postslist.njk b/_includes/postslist.njk
index ea49fee..b4f70c6 100644
--- a/_includes/postslist.njk
+++ b/_includes/postslist.njk
@@ -8,7 +8,7 @@
{% endif %}
- {% if post.data.title %}{{ post.data.title | markdownify | safe }}{% else %}?{% endif %}
+ {% if post.data.draft %}DRAFT: {% endif %}{% if post.data.title %}{{ post.data.title | markdownify | safe }}{% else %}?{% endif %}
{% if not postListTypeMicroblog %}
diff --git a/eleventy.config.js b/eleventy.config.js
index 7826c3e..3f8b3d7 100644
--- a/eleventy.config.js
+++ b/eleventy.config.js
@@ -100,6 +100,14 @@ export default async function (eleventyConfig) {
return arr.slice(1, arr.length);
});
+ // Preprocessors
+ // Exclude drafts from full build
+ eleventyConfig.addPreprocessor("drafts", "*", (data, content) => {
+ if (data.draft && process.env.ELEVENTY_RUN_MODE === "build") {
+ return false;
+ }
+ });
+
// Transforms
eleventyConfig.addTransform("prettier", function (content, outputPath) {
if (outputPath && outputPath.endsWith(".html")) {
diff --git a/public/css/index.css b/public/css/index.css
index 0f96b80..8baa9db 100644
--- a/public/css/index.css
+++ b/public/css/index.css
@@ -448,6 +448,17 @@ main > p > a > img {
width: 100%;
padding-top: var(--space-l);
}
+
+mark {
+ color: var(--background-color);
+ &.draftMarker {
+ font-family: var(--font-family-metadata);
+ font-style: normal;
+ letter-spacing: var(--letter-spacing-metadata);
+ text-transform: var(--text-transform-metadata);
+ }
+}
+
pre {
grid-column: var(--span-grid);
}