From eb6d8bd51fb3a5ad9868829e19c838939346f8cb Mon Sep 17 00:00:00 2001 From: Starfall Date: Wed, 24 May 2023 10:32:11 -0500 Subject: demonstrate draft post, set some defaults on blog --- src/blog/blog.json | 5 +++++ src/blog/foobar.md | 2 -- src/blog/hello-world.md | 2 -- src/blog/hidden.md | 7 +++++++ src/feed.njk | 2 +- 5 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 src/blog/blog.json create mode 100644 src/blog/hidden.md diff --git a/src/blog/blog.json b/src/blog/blog.json new file mode 100644 index 0000000..53d184b --- /dev/null +++ b/src/blog/blog.json @@ -0,0 +1,5 @@ +{ + "layout": "base.njk", + "title": "Untitled Blog Post", + "tags": ["post"] +} diff --git a/src/blog/foobar.md b/src/blog/foobar.md index 499414e..01edcf8 100644 --- a/src/blog/foobar.md +++ b/src/blog/foobar.md @@ -1,6 +1,4 @@ --- -layout = "base.njk" -tags = [ "post" ] title = "Second post" --- Second post, hooray! diff --git a/src/blog/hello-world.md b/src/blog/hello-world.md index d75c546..97b636e 100644 --- a/src/blog/hello-world.md +++ b/src/blog/hello-world.md @@ -1,6 +1,4 @@ --- -layout = "base.njk" title = "Hello, World!" -tags = [ "post" ] --- Hello, World! diff --git a/src/blog/hidden.md b/src/blog/hidden.md new file mode 100644 index 0000000..330b617 --- /dev/null +++ b/src/blog/hidden.md @@ -0,0 +1,7 @@ +--- +eleventyExcludeFromCollections = true +permalink = false +--- +Both of the above booleans need to be set for a post to be a proper draft. Without `permalink=false`, the page will +still be generated and be available as a direct link. Without `eleventExcludeFromCollections=true`, a link will be +generated on starfall.systems/blog and the Atom feed (though if permalink is off, it won't go anywhere). diff --git a/src/feed.njk b/src/feed.njk index d1a9c0a..8d21cef 100644 --- a/src/feed.njk +++ b/src/feed.njk @@ -1,5 +1,5 @@ --- -permalink = "feed.xml" +permalink = "blog/feed.xml" [metadata] name = "devin & Alex Starfall" -- cgit