-
Am new to Hugo and am trying to place Social Icons (GitHub, LinkedIn & Footer) to a specific page (e.g. About page or Footer). Using: hugo v0.128.2 and the FixIt 2 theme. Inside my
Have an About page inside
Tried putting
How can I make them only appear in a specific page that I want (e.g. About page or Footer) Also, how could I position (right, center, or left) them? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
In about page, you can set social icons by FontAwesome , for example: :(fa-brands fa-github fa-fw):: [Lruihao](https://github.com/Lruihao) In footer section, you can create a custom file in your project root {{- define "custom-head" -}}
{{- end -}}
{{- define "custom-profile" -}}
{{- end -}}
{{- define "custom-aside" -}}
{{- end -}}
{{- define "custom-footer" -}}
{{/* insert here */}}
<a
href="https://github.com/Lruihao"
title="GitHub"
target="_blank"
rel="external nofollow noopener noreferrer"
>
<i class="fa-brands fa-github-alt fa-fw fa-xl" aria-hidden="true"></i>
</a>
{{- end -}}
{{- define "custom-widgets" -}}
{{- end -}}
{{- define "custom-assets" -}}
{{- end -}} |
Beta Was this translation helpful? Give feedback.
-
Well...There's no easier way to do this! Such so-called easier ways all involve complex processing done by those behind the scenes. So, concerning your question, I have a piece of development advice.
After that, you can insert your social icon links in any page using shortcode Preview like: |
Beta Was this translation helpful? Give feedback.
Well...There's no easier way to do this! Such so-called easier ways all involve complex processing done by those behind the scenes.
So, concerning your question, I have a piece of development advice.
Create
layouts/partials/custom/social-links.html
in your project root, and insert the following content: