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
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
@ -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
- `issues_url`: Link to site bug tracker, if present
- `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
The `nav_links` are set like so:
The `nav_links` are set like the following:
```
[extra]

View File

@ -30,7 +30,10 @@ date_format = "%d %B %Y"
hosting = "Codeberg"
issues_url = "https://git.exozy.me/daudix/duckquill/issues"
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 = "/demo", name = "Demo"},
{url = "/blog", name = "Blog"},

View File

@ -46,16 +46,14 @@ zola init blog
git init
```
3. Fork Duckquill
4. Add Duckquill as Git submodule for easy updating:
3. Add Duckquill as Git submodule for easy updating:
```
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"

View File

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

View File

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