mirror of
https://github.com/andwati/andwati.com.git
synced 2026-10-23 19:42:15 +00:00
Getting started with zola
This commit is contained in:
@@ -0,0 +1 @@
|
||||
*.html
|
||||
@@ -0,0 +1,6 @@
|
||||
+++
|
||||
title = "List of blog posts"
|
||||
sort_by = "date"
|
||||
template = "blog.html"
|
||||
page_template = "blog-page.html"
|
||||
+++
|
||||
@@ -0,0 +1,6 @@
|
||||
+++
|
||||
title = "My first post"
|
||||
date = 2023-08-01
|
||||
+++
|
||||
|
||||
This is my first blog post
|
||||
@@ -0,0 +1,6 @@
|
||||
+++
|
||||
title = "My second post"
|
||||
date = 2023-08-07
|
||||
+++
|
||||
|
||||
This is my second blog post.
|
||||
@@ -0,0 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Ian Andwati</title>
|
||||
</head>
|
||||
<body>
|
||||
<section class="section">
|
||||
<div class="container">{% block content %}{% endblock %}</div>
|
||||
</section>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,9 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<h1 class="title">
|
||||
{{ page.title}}
|
||||
</h1>
|
||||
<p class="subtitle"><strong>{{ page.date }}</strong></p>
|
||||
{{ page.content | safe }}
|
||||
{% endblock content %}
|
||||
@@ -0,0 +1,14 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<h1 class="title">
|
||||
{{ section.title}}
|
||||
</h1>
|
||||
|
||||
<ul>
|
||||
<!-- If you are using pagination, section.pages will be empty. You need to use the paginator object -->
|
||||
{% for page in section.pages %}
|
||||
<li><a href="{{ page.permalink | safe }}">{{ page.title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock content %}
|
||||
@@ -0,0 +1,6 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<h1 class="title">This is my blog made with zola</h1>
|
||||
<p>Click <a href="{{ get_url(path='@/blog/_index.md')}}">here</a> to see my posts</p>
|
||||
{% endblock content %}
|
||||
Reference in New Issue
Block a user