This commit is contained in:
Thomas Chartron 2021-11-06 18:26:24 +01:00
parent 23013bca24
commit dff59bbd65
4 changed files with 23 additions and 7 deletions

View file

@ -119,14 +119,14 @@ anchors = "on"
# Whether to include the title of the page/section in the index
include_title = true
# Whether to include the description of the page/section in the index
include_description = false
include_description = true
# Whether to include the path of the page/section in the index
include_path = false
include_path = true
# Whether to include the rendered content of the page/section in the index
include_content = true
# At which character to truncate the content to. Useful if you have a lot of pages and the index would
# become too big to load on the site. Defaults to not being set.
# truncate_content_length = 100
truncate_content_length = 100
# Optional translation object for the default language
# Example:

View file

@ -1,8 +1,11 @@
{% extends "layout.html" %}
{% block content %}
<h1 class="title">
This is my blog made with Zola.
</h1>
<p>Click <a href="/blog/">here</a> to see my posts.</p>
<div class="flex justify-center">
<h1 class="text-xl text-bold">
{{ config.extra.index.title }}
</h1>
<img class="rounded-full h-16 w-16" src="{{ config.extra.index.image }}" alt="">
<p>Click <a href="/blog/">here</a> to see my posts.</p>
</div>
{% endblock content %}

View file

@ -58,6 +58,14 @@
{% endfor %}
</div>
</div>
{% if config.extra.zt.enable_search %}
<div class="ml-auto">
<input id="search" type="text" >
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path>
</svg>
</div>
{% endif %}
</div>
<div class="absolute inset-y-0 right-0 flex items-center pr-2 sm:static sm:inset-auto sm:ml-6 sm:pr-0">
<button id="switch-theme" type="button" class="bg-gray-200 text-gray-800 hover:text-gray-900 dark:bg-gray-800 dark:text-gray-400 dark:hover:text-white p-1 rounded-full focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-800 focus:ring-white">

View file

@ -40,3 +40,8 @@ zt.navbar_items = [
]
zt.navbar_title = "title"
# Index page
[extra.index]
title = "Main title"
image = "https://via.placeholder.com/200"