Skip to content

Commit 452b648

Browse files
committed
feat(external-links): add external link icon
Signed-off-by: Laura Santamaria <nimbinatus@users.noreply.github.com>
1 parent 0ad019c commit 452b648

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

site/config.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ generate_robots_txt = true
4141
highlight_code = true
4242
highlight_theme = "inspired-github"
4343
render_emoji = true
44+
external_links_class = "external"
4445
external_links_target_blank = true
4546
external_links_no_referrer = true
4647
#insert_anchor_links = "left"
@@ -50,10 +51,10 @@ external_links_no_referrer = true
5051
juice_logo_name = "bootc"
5152
juice_logo_path = "logo.png"
5253
juice_extra_menu = [
53-
{ title = "About", link = "/about" },
54-
{ title = "Docs", link = "https://bootc-dev.github.io/bootc/" },
55-
{ title = "News", link = "/news" },
56-
{ title = "GitHub", link = "https://github.com/bootc-dev/bootc" },
54+
{ title = "About", link = "/about", external = false },
55+
{ title = "Docs", link = "https://bootc-dev.github.io/bootc/", external = true },
56+
{ title = "News", link = "/news", external = false },
57+
{ title = "GitHub", link = "https://github.com/bootc-dev/bootc", external = true },
5758
]
5859
favicon = "favicon.ico"
5960
meta_title = "Your OS, but Containers!"

site/templates/_macros.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@
1616
{% endfor %}
1717
{% if config.extra.juice_extra_menu %}
1818
{% for menu in config.extra.juice_extra_menu %}
19+
{% if menu.external == true %}
20+
<a class="nav-item subtitle-text external" href="{{ menu.link | safe }}">{{ menu.title }}</a>
21+
{% else %}
1922
<a class="nav-item subtitle-text" href="{{ menu.link | safe }}">{{ menu.title }}</a>
23+
{% endif %}
2024
{% endfor %}
2125
{% endif %}
2226
</nav>

0 commit comments

Comments
 (0)