Set up minimal index page listing posts
This commit is contained in:
parent
fd5e0004ce
commit
29fca76702
8 changed files with 82 additions and 20 deletions
27
src/_includes/layout.njk
Normal file
27
src/_includes/layout.njk
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{{ title }}</title>
|
||||
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🌌</text></svg>">
|
||||
<link rel="stylesheet" href="assets/style.css" />
|
||||
</head>
|
||||
<body>
|
||||
<main class="home">
|
||||
<header></header>
|
||||
<nav>
|
||||
<h1>arnes.space</h1>
|
||||
<h2>Recent Posts</h2>
|
||||
<ul>
|
||||
{%- for post in collections.post -%}
|
||||
<li{% if page.url == post.url %} aria-current="page"{% endif %}>{{ post.date | toISODate }} -- <a href="{{post.url}}">{{ post.data.title }}</a></li>
|
||||
{%- endfor -%}
|
||||
</ul>
|
||||
</nav>
|
||||
<article>
|
||||
{{ content | safe }}
|
||||
</article>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue