Skip to content

Commit d0f83c4

Browse files
authoredDec 26, 2024
Add a button to go to the documentation (#5)
1 parent c0bff43 commit d0f83c4

File tree

4 files changed

+19
-9
lines changed

4 files changed

+19
-9
lines changed
 

Diff for: ‎config.toml

+4-2
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,15 @@ highlight_code = true
2424
name = "Ecosystem"
2525
section = "docs"
2626
url = "/ecosystem/"
27-
weight = 10
2827

2928
[[extra.menu.main]]
3029
name = "Blog"
3130
section = "blog"
3231
url = "/blog/"
33-
weight = 20
32+
33+
[[extra.menu.main]]
34+
name = "Docs"
35+
url = "https://hackage.haskell.org/package/effectful-core/docs/Effectful.html"
3436

3537
[[extra.section.extra]]
3638
repo_url = "https://github.com/haskell-effectful/"

Diff for: ‎content/_index.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ title = "Effectful"
55
# The homepage contents
66
[extra]
77
lead = "Build Fast & Reliable Haskell Applications"
8-
url = "/ecosystem/"
9-
url_button = "Browse the ecosystem"
8+
left_url = "/ecosystem/"
9+
left_url_button = "Browse the ecosystem"
10+
right_url = "https://hackage.haskell.org/package/effectful-core/docs/Effectful.html"
11+
right_url_button = "Read the documentation"
1012
repo_version = ""
1113
repo_license = ""
1214
repo_url = "https://github.com/haskell-effectful/effectful"

Diff for: ‎templates/index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ <h1 class="mt-0">{{ section.title | default(value="Modern Documentation Theme")
3535
<p>
3636
<img src="{{ section.extra.icon}}" height=250> </img>
3737
</p>
38-
<a class="btn btn-primary btn-lg px-4 mb-2" href="{{ get_url(path=section.extra.url | default(value="/")) | safe }}" role="button">{{ section.extra.url_button | default(value="Get started") }}</a>
39-
<p class="meta">{{ section.extra.repo_license | default(value="MIT")}} <a href="{{ section.extra.repo_url | default(value="https://github.com/aaranxu/adidoks") | safe }}">{{ section.extra.repo_version | default(value="0.1.0") }}</a></p>
38+
<a class="btn btn-primary btn-lg px-4 mb-2" href="{{ get_url(path=section.extra.left_url | default(value="/")) | safe }}" role="button">{{ section.extra.left_url_button | default(value="Get started") }}</a>
39+
<a class="btn btn-primary btn-lg px-4 mb-2 ms-4" href="{{ get_url(path=section.extra.right_url | default(value="/")) | safe }}" role="button">{{ section.extra.right_url_button | default(value="Get started") }}</a>
4040
</div>
4141
</div>
4242
</section>

Diff for: ‎templates/macros/header.html

+9-3
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,15 @@
3838
{% endfor %}
3939
{% elif config.extra.menu.main %}
4040
{% for val in config.extra.menu.main %}
41-
<li class="nav-item{% if current_section == val.section %} {{ current_section }} active{% endif %}">
42-
<a class="nav-link" href="{{ get_url(path=val.url, trailing_slash=true) | safe }}">{{ val.name }}</a>
43-
</li>
41+
{% if val.section %}
42+
<li class="nav-item{% if current_section == val.section %} {{ current_section }} active{% endif %}">
43+
<a class="nav-link" href="{{ get_url(path=val.url, trailing_slash=true) | safe }}">{{ val.name }}</a>
44+
</li>
45+
{% else %}
46+
<li class="nav-item">
47+
<a class="nav-link" href="{{ val.url | safe }}">{{ val.name }}</a>
48+
</li>
49+
{% endif %}
4450
{% endfor %}
4551
{% else %}
4652
<li class="nav-item">

0 commit comments

Comments
 (0)