basic Zola beginnings
This commit is contained in:
parent
1187191aff
commit
1d39002bb5
7 changed files with 67 additions and 0 deletions
6
content/blog/_index.md
Normal file
6
content/blog/_index.md
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
+++
|
||||||
|
title = "List of blog posts"
|
||||||
|
sort_by = "date"
|
||||||
|
template = "blog.html"
|
||||||
|
page_template = "post.html"
|
||||||
|
+++
|
6
content/blog/test.md
Normal file
6
content/blog/test.md
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
+++
|
||||||
|
title = "My first post"
|
||||||
|
date = 2019-11-27
|
||||||
|
+++
|
||||||
|
|
||||||
|
This is my first blog post.
|
6
content/blog/test2.md
Normal file
6
content/blog/test2.md
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
+++
|
||||||
|
title = "My second post"
|
||||||
|
date = 2019-11-28
|
||||||
|
+++
|
||||||
|
|
||||||
|
This is my second blog post.
|
18
templates/base.html
Normal file
18
templates/base.html
Normal 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>lynxize</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<section class="section">
|
||||||
|
<div class="container">
|
||||||
|
{% block content %} {% endblock %}
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
14
templates/blog.html
Normal file
14
templates/blog.html
Normal file
|
@ -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 %}
|
8
templates/index.html
Normal file
8
templates/index.html
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<h1 class="title">
|
||||||
|
This is my blog made with Zola.
|
||||||
|
</h1>
|
||||||
|
<p><a href="{{ get_url(path='@/blog/_index.md') }}">Posts</a>.</p>
|
||||||
|
{% endblock content %}
|
9
templates/post.html
Normal file
9
templates/post.html
Normal file
|
@ -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 %}
|
Loading…
Add table
Reference in a new issue