-
Notifications
You must be signed in to change notification settings - Fork 194
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]>
- Loading branch information
1 parent
2d94f74
commit 69acce5
Showing
4 changed files
with
20 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,6 +61,14 @@ title = "Jane Doe - Nutrition Coach & Chef Consultant" | |
[params.meta] | ||
keywords = "some, keywords, for, seo, you, know, google, duckduckgo, and, such" | ||
|
||
[params.contact] | ||
email = "[email protected]" | ||
phone = "+49 1111 555555" | ||
[[params.contacts]] | ||
label = "phone" | ||
value = "+49 1111 555555" | ||
url = "tel: +49 1111 555555" | ||
icon = "fa fa-phone" | ||
|
||
[[params.contacts]] | ||
label = "email" | ||
value = "[email protected]" | ||
url = "mailto: [email protected]" | ||
icon = "fa fa-envelope" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{{ range .Site.Params.contacts }} | ||
<p><i class="{{ .icon}}"></i> <a href="{{ .url }}">{{ .value }}</a></p> | ||
{{ end }} |