Closed wvirany closed 2 months ago
Note: I achieved the result by doing something a bit hacky...
After the html was rendered in the public
directory, I copied the code corresponding to the social icons into my about page. However, I'd like to do this the right way... by making it automatically include the socials I have in the config file
Thank you for the kind comment about the theme!
Honestly, I was going to suggest your hacky solution. I believe you can't include Hugo constructs, such as that for loop, in a page content.
Perhaps your best bet would be to have a custom fork of the theme and modify layouts/_default/single.html
to have something like:
if (about page) {
render about.md content;
render social icons;
render news part;
} else {
...
}
I don't think it's worth it in your case, as I believe your social icons would not change so frequently anyway.
Hi,
I am trying to move my social icons from my home page:
To my about page: (preferably just before the news section)
I tried moving this code:
from
home.html
in thelayouts/
directory of the theme to theindex.html
file in my 'about' folder (located incontents/
at the top of my site. Evidently you can see the result. How can I achieve this? Thanks(by the way, I love the theme! )