1
0
Fork 0

Index loop over all posts

This commit is contained in:
Ava Gaiety Wroten 2022-01-08 20:39:17 -06:00
parent 1055080993
commit 7613559c1f
4 changed files with 28 additions and 6 deletions

View file

@ -2,10 +2,13 @@ module.exports = function(eleventyConfig) {
eleventyConfig.addPassthroughCopy("./content/images"); eleventyConfig.addPassthroughCopy("./content/images");
return { return {
htmlTemplateEngine: "njk",
markdownTemplateEngine: "md", markdownTemplateEngine: "md",
dir: { dir: {
input: "./content", includes: "../_includes",
output: "./_site" layouts: "../_includes",
input: "content",
output: "_site"
} }
} }
}; };

17
_includes/indexlayout.njk Normal file
View file

@ -0,0 +1,17 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ title }}</title>
</head>
<body>
{{ content | safe }}
{%- for post in collections.all -%}
<a href="{{ post.url }}">
{{ post.data.title }}
</a>
{%- endfor -%}
</body>
</html>

View file

@ -9,7 +9,7 @@
"state": { "state": {
"type": "markdown", "type": "markdown",
"state": { "state": {
"file": "posts/deving_on_linux_is_fun.md", "file": "index.md",
"mode": "source", "mode": "source",
"source": false "source": false
} }
@ -69,7 +69,7 @@
"state": { "state": {
"type": "backlink", "type": "backlink",
"state": { "state": {
"file": "posts/deving_on_linux_is_fun.md", "file": "index.md",
"collapseAll": false, "collapseAll": false,
"extraContext": false, "extraContext": false,
"sortOrder": "alphabetical", "sortOrder": "alphabetical",
@ -89,6 +89,7 @@
}, },
"active": "a8e90712c1fef449", "active": "a8e90712c1fef449",
"lastOpenFiles": [ "lastOpenFiles": [
"index.md",
"posts/deving_on_linux_is_fun.md", "posts/deving_on_linux_is_fun.md",
"posts/coming-out-again-nb.md", "posts/coming-out-again-nb.md",
"posts/code2college-volunteering.md", "posts/code2college-volunteering.md",
@ -97,7 +98,6 @@
"posts/best-improv-performance-yet.md", "posts/best-improv-performance-yet.md",
"posts/a_modern_terminal_workflow_2.md", "posts/a_modern_terminal_workflow_2.md",
"posts/ember-modifiers.md", "posts/ember-modifiers.md",
"posts/code2college-volunteering-resume-prep.md", "posts/code2college-volunteering-resume-prep.md"
"posts/austin-givecamp-2019.md"
] ]
} }

View file

@ -1,5 +1,7 @@
--- ---
eleventyExcludeFromCollections: true eleventyExcludeFromCollections: true
layout: indexlayout
title: Gaiety's Life
--- ---
# Gaiety's Life # Gaiety's Life