Heya. I’m having fun with home assistant my washing machine and LLM.
it has a mastodon account for some time now. Setaggi (@setaggi@geekdom.social) - Geekdom
and now i had the idea to have a blog.
I stumbled upon hugo and i really like it.
1st post was a mokup 2nd a real wash.
Last night i made the automated upload from homeassistant to hugo. Need to wait for a new wash to test the system integration.
Has anyone recommendations?
1 Like
Question.
How can i make the mastodon menu link open in a new tab
irkode
July 26, 2024, 5:25am
3
Add attribute target="_blank"
to your href
tag HTML Links Hyperlinks
But the tag is generated for all menu items defined in the hugo config.
irkode
July 26, 2024, 2:58pm
5
Check this one. You will have to switch to manual menu creation
There are a couple of ways to do this.
1) Open all external URLs in new tab
{{ with site.Menus.main }}
<nav class="menu">
{{ range . }}
{{ if (urls.Parse .URL).IsAbs }}
<a href="{{ .URL }}" rel="external" target="_blank">{{ .Name }}</a>
{{ else }}
<a href="{{ .URL }}">{{ .Name }}</a>
{{ end }}
{{ end }}
</nav>
{{ end }}
2) Configure each menu entry as needed
menus:
main:
- name: Home
pageRef: /
weight: 10
- name: Posts
p…
thanks
is this right in toml?
[[menu.main]]
name = "Mastodon"
url = "https://geekdom.social/@setaggi"
weight = 3
[menu.main.params]
external = true
I dont get it to work
irkode
July 26, 2024, 3:39pm
7
you need to define the whole menu and you need the matching rendering code.
guess you need to remove that one from your site config: Menus | Hugo
if you cannot get it to work would next share your code to replay. doesn’t make to much sense to dig it down step by step
here’s the translated example from the link I gave. it’s [[menu
s .main]]
[[menus.main]]
name = "Home"
pageRef = "/"
weight = 10
[[menus.main]]
name = "Posts"
pageRef = "/posts"
weight = 20
[[menus.main]]
name = "Hugo"
url = "https://gohugo.io/"
weight = 30
[menus.main.params]
external = true
irkode
July 26, 2024, 3:42pm
8
I moved the post to the support section. (I’m unable to split)
If you want that one in Showcases though, please re create the topic there.
please consider one topic one thread for the future
fixed. the theme had a menu inplace apperently i altered that