DEVELOPMENT ENVIRONMENT

~liljamo/liljamo-dev-zola

9d18b7cb629a750400f16451f58dd849e9bcd5e3 — Jonni Liljamo 9 months ago aff5e72
feat: feeds, more testing
M config.toml => config.toml +4 -4
@@ 1,10 1,10 @@
base_url = "https://liljamo.dev"

title = "liljamo projects"
description = "showcase and devlog site for personal projects"
#description = "showcase and devlog site for personal projects"

# default author
author = "Jonni Liljamo <jonni@liljamo.com>"
author = "Jonni Liljamo"

default_language = "en"
# theme = "" # none


@@ 17,8 17,8 @@ build_search_index = false

ignored_content = []

generate_feed = true
feed_filename = "atom.xml"
generate_feed = false
# feed_filename = "atom.xml"
# feed_limit = 20 # unlimited when not set

taxonomies = []

M content/_index.md => content/_index.md +1 -1
@@ 1,5 1,5 @@
+++
title = "Index"
sort_by = "date"
sort_by = "weight"
template = "index.html"
+++

M content/one/2023-11-20-001.md => content/one/2023-11-20-001.md +1 -0
@@ 1,6 1,7 @@
+++
slug = "001"
title = "log 1: I did a thing"
description = "this is a test"

# 'page.date' is in filename
updated = "2023-11-20"

M content/one/_index.md => content/one/_index.md +4 -0
@@ 2,7 2,11 @@
weight = 10

title = "Test One"
description = "a test project"

sort_by = "date"
template = "project.html"
page_template = "log.html"

generate_feed = true
+++

M content/two/_index.md => content/two/_index.md +1 -0
@@ 2,6 2,7 @@
weight = 20

title = "Test Two"

sort_by = "date"
template = "project.html"
page_template = "log.html"

M templates/layouts/base.html => templates/layouts/base.html +2 -0
@@ 5,6 5,8 @@
        <meta name="viewport" content="width=device-width, initial-scale=1.0">

        <link rel="stylesheet" href="/css/style.css"/>

        {% block extra_head %} {% endblock %}
    </head>
    <body>
        <main class="flex justify-center h-screen">

M templates/project.html => templates/project.html +12 -6
@@ 1,13 1,19 @@
{% extends "layouts/base.html" %}
{% block extra_head %}
<link rel="alternative" type="application/atom+xml" title="RSS" href="{{ section.path }}atom.xml">
{% endblock extra_head %}

{% block content %}
<p>{{ section.title }}</p>

{% if section.pages %}
<p>has logs</p>
{% for page in section.pages %}
<a href={{ page.permalink }}>{{ page.title }}</a>
{% endfor %}
<div>
    <p>has logs</p>
    {% if section.generate_feed %}
    <a href="{{ section.path }}atom.xml">RSS Feed</a>
    {% endif %}
    {% for page in section.pages %}
    <a href={{ page.permalink }}>{{ page.title }}</a>
    {% endfor %}
</div>
{% endif %}

{% endblock content %}