Example starter code from official docs

This commit is contained in:
2025-06-16 02:19:37 -04:00
parent 5077f4c19e
commit 6d3bb19a76
8 changed files with 102 additions and 0 deletions

17
src/_includes/layout.html 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>Document</title>
</head>
<body>
<header>
<h1>{{ title | default: "Bloggy" }}</h1>
</header>
<main>
{{ content }}
</main>
<footer></footer>
</body>
</html>

26
src/_site/index.html Normal file
View File

@ -0,0 +1,26 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<header>
<h1>Hello World!</h1>
</header>
<main>
<h2><a href="/posts/post-1/">Post Title</a></h2>
<p><p>First post!</p>
</p>
<h2><a href="/posts/post-2/">Post Title Two!</a></h2>
<p><p>Second post!</p>
</p>
</main>
<footer></footer>
</body>
</html>

View File

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<header>
<h1>Post Title</h1>
</header>
<main>
<p>First post!</p>
</main>
<footer></footer>
</body>
</html>

View File

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<header>
<h1>Post Title Two!</h1>
</header>
<main>
<p>Second post!</p>
</main>
<footer></footer>
</body>
</html>

9
src/index.html Normal file
View File

@ -0,0 +1,9 @@
---
layout: layout.html
title: Hello World!
---
{% for post in collections.post %}
<h2><a href="{{ post.url }}">{{ post.data.title }}</a></h2>
<p>{{ post.content }}</p>
{% endfor %}

5
src/posts/post-1.md Normal file
View File

@ -0,0 +1,5 @@
---
title: Post Title
---
First post!

5
src/posts/post-2.md Normal file
View File

@ -0,0 +1,5 @@
---
title: Post Title Two!
---
Second post!

4
src/posts/posts.json Normal file
View File

@ -0,0 +1,4 @@
{
"layout": "layout.html",
"tags": "post"
}