hugo-scroll/layouts/shortcodes/contact_list.html
Filippo Fontana 69acce5ec7 Handle website contacts dynamically
This commits change the way contacts params are handled: instead of
declaring them statically, they are declared as an array of tables in
the TOML configuration file, then they are displayed in the two sections
(homepage and footer) of the website through the {{ range }} statement.

This makes handling multiple contacts params easier and avoids the
need of changing manually this two files:
- `layouts/partials/footer.html`;
- `exampleSite/content/homepage/contact.md`;

Signed-off-by: Filippo Fontana <filippofontana1998@gmail.com>
2024-03-10 22:29:58 +01:00

3 lines
125 B
HTML

{{ range .Site.Params.contacts }}
<p><i class="{{ .icon}}"></i>&nbsp;<a href="{{ .url }}">{{ .value }}</a></p>
{{ end }}