Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Icons in front matter #2

Closed
mattomis opened this issue Jul 25, 2023 · 1 comment
Closed

Icons in front matter #2

mattomis opened this issue Jul 25, 2023 · 1 comment

Comments

@mattomis
Copy link

mattomis commented Jul 25, 2023

What is the requirement for using icons in front matter?
It seems like the requirement is having at least two files to create a partials template in /layouts/partials that defines what icons will be references in the front matter and for which keys. Those files are _ico.html and ico.html.
In my case I created a folder in my project called partials in layouts, and then created a file called ico.html but I have no idea what is supposed to go in that file or in _ico.html other than MAYBE exactly whatever is in those files in this github project. I mean I have found something here that says you need to have some text along the lines of:
{{ .Params.icon | markdownify }} but I have no idea how to use that information in creating the template(s).

If you want to have front matter like this:

---
title: "This is a title preceded by an icon in the sidebar"
icon: {{< ico inbox-full>}}
---

But I do not see how these things work together to produce the desired effect.

@RoneoOrg
Copy link
Owner

This is discussed on discourse.gohugo.io

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants