Skip to content

Commit 77746d7

Browse files
authored
fix: better zensical setup (#756)
* fix: better zensical setup Signed-off-by: Henry Schreiner <henryfs@princeton.edu> * Update {% if cookiecutter.docs == 'zensical' %}zensical.toml{% endif %} --------- Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
1 parent e05c33a commit 77746d7

1 file changed

Lines changed: 21 additions & 4 deletions

File tree

{{cookiecutter.project_name}}/{% if cookiecutter.docs == 'zensical' %}zensical.toml{% endif %}

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,16 @@
44
site_name = "{{ cookiecutter.project_name }}"
55
site_description = "{{ cookiecutter.project_short_description }}"
66
site_author = "{{ cookiecutter.full_name }}"
7-
copyright = """
8-
Copyright &copy; {{ cookiecutter.__year }} The authors
9-
"""
7+
copyright = "&copy; {{ cookiecutter.__year }} {{ cookiecutter.full_name }}"
8+
repo_url = "{{ cookiecutter.url }}"
9+
docs_dir = "docs"
1010

1111
[project.theme]
1212
language = "en"
1313
features = [
1414
"announce.dismiss",
15+
"content.action.edit",
16+
"content.action.view",
1517
"content.code.annotate",
1618
"content.code.copy",
1719
"content.code.select",
@@ -28,17 +30,32 @@ features = [
2830
"navigation.tracking",
2931
"search.highlight",
3032
]
33+
{%- if cookiecutter.__ci == "github" %}
34+
icon.repo = "fontawesome/brands/github"
35+
{%- endif %}
3136

37+
# Palette toggle for automatic mode
3238
[[project.theme.palette]]
39+
media = "(prefers-color-scheme)"
40+
toggle.icon = "lucide/sun-moon"
41+
toggle.name = "Switch to light mode"
42+
43+
# Palette toggle for light mode
44+
[[project.theme.palette]]
45+
media = "(prefers-color-scheme: light)"
3346
scheme = "default"
3447
toggle.icon = "lucide/sun"
3548
toggle.name = "Switch to dark mode"
3649

50+
# Palette toggle for dark mode
3751
[[project.theme.palette]]
52+
media = "(prefers-color-scheme: dark)"
3853
scheme = "slate"
3954
toggle.icon = "lucide/moon"
40-
toggle.name = "Switch to light mode"
55+
toggle.name = "Switch to system preference"
4156

57+
{%- if cookiecutter.__ci == "github" %}
4258
[[project.extra.social]]
4359
icon = "fontawesome/brands/github"
4460
link = "{{ cookiecutter.url }}"
61+
{%- endif %}

0 commit comments

Comments
 (0)