feat: Add option to disable feed link in nav

This commit is contained in:
daudix-UFO
2023-10-15 17:19:55 +00:00
parent e41cfb1d39
commit 9e9e12f732
5 changed files with 165 additions and 159 deletions

View File

@ -32,7 +32,7 @@ theme = "duckquill"
## Options ## Options
Duckquill offers some configuration options to make it fit you better (but that doesn't make it less opinionated). Duckquill offers some configuration options to make it fit you better.
### Custom CSS ### Custom CSS
@ -97,9 +97,13 @@ Set any color in `$accent-color` and reload, the accent color should be used now
- `hosting`: Where the website source are located, used on 404 page - `hosting`: Where the website source are located, used on 404 page
- `issues_url`: Link to site bug tracker, if present - `issues_url`: Link to site bug tracker, if present
- `source_url`: Link to site source (not built site) - `source_url`: Link to site source (not built site)
### `[extra.nav]` variables:
- `show_feed`: Whether to display "Feed" link
- `nav_links`: Links used in navigation bar - `nav_links`: Links used in navigation bar
The `nav_links` are set like so: The `nav_links` are set like the following:
``` ```
[extra] [extra]

View File

@ -30,7 +30,10 @@ date_format = "%d %B %Y"
hosting = "Codeberg" hosting = "Codeberg"
issues_url = "https://git.exozy.me/daudix/duckquill/issues" issues_url = "https://git.exozy.me/daudix/duckquill/issues"
source_url = "https://git.exozy.me/daudix/duckquill" source_url = "https://git.exozy.me/daudix/duckquill"
nav_links = [
[extra.nav]
show_feed = true
links = [
{url = "https://git.exozy.me/daudix/duckquill", name = "Repo"}, {url = "https://git.exozy.me/daudix/duckquill", name = "Repo"},
{url = "/demo", name = "Demo"}, {url = "/demo", name = "Demo"},
{url = "/blog", name = "Blog"}, {url = "/blog", name = "Blog"},

View File

@ -46,16 +46,14 @@ zola init blog
git init git init
``` ```
3. Fork Duckquill 3. Add Duckquill as Git submodule for easy updating:
4. Add Duckquill as Git submodule for easy updating:
``` ```
git submodule init git submodule init
git submodule add YOUR_FORK.git themes/duckquill git submodule add https://git.exozy.me/daudix/duckquill.git themes/duckquill
``` ```
5. Edit `config.toml` and enable Duckquill theme: 4. Edit `config.toml` and enable Duckquill theme:
``` ```
theme = "duckquill" theme = "duckquill"

View File

@ -4,11 +4,12 @@
{{ config.title }} {{ config.title }}
</a> </a>
<ul> <ul>
{% for link in config.extra.nav_links %} {% for link in config.extra.nav.links %}
<li> <li>
<a href="{{link.url}}">{{link.name}}</a> <a href="{{link.url}}">{{link.name}}</a>
</li> </li>
{% endfor %} {% endfor %}
{% if config.extra.nav.show_feed %}
<li> <li>
<a href="{{ config.base_url }}/atom.xml"> <a href="{{ config.base_url }}/atom.xml">
<svg class="link-icon" viewBox="0 0 16 16" width="16" height="16"> <svg class="link-icon" viewBox="0 0 16 16" width="16" height="16">
@ -20,6 +21,7 @@
Feed Feed
</a> </a>
</li> </li>
{% endif %}
</ul> </ul>
</div> </div>
</nav> </nav>

View File

@ -1,7 +1,7 @@
name = "Duckquill" name = "Duckquill"
description = "Modern, pretty, and clean theme" description = "Modern, pretty, and clean theme"
license = "MIT" license = "MIT"
homepage = "https://codeberg.org/daudix-UFO/duckquill" homepage = "https://git.exozy.me/daudix/duckquill"
min_version = "0.17.2" min_version = "0.17.2"
demo = "https://duckquill.exozy.me" demo = "https://duckquill.exozy.me"
@ -10,4 +10,3 @@ demo = "https://duckquill.exozy.me"
[author] [author]
name = "David Lapshin" name = "David Lapshin"
homepage = "https://daudix.exozy.me" homepage = "https://daudix.exozy.me"