-
-
Notifications
You must be signed in to change notification settings - Fork 355
feat(navbar): navbar link icon item #781
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
Conversation
✅ Deploy Preview for hugo-hextra ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
e20bf84 to
11f7b5f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Do you want me to add some icons to the example site? |
Co-authored-by: Xin <[email protected]>
sure, we can do this for one nested + one regular, too many icons might be overwhelming. diff --git a/exampleSite/hugo.yaml b/exampleSite/hugo.yaml
index 79ecca0..e72889b 100644
--- a/exampleSite/hugo.yaml
+++ b/exampleSite/hugo.yaml
@@ -85,6 +85,9 @@ menu:
name: Showcase
pageRef: /showcase
weight: 5
+ params:
+ icon: collection
+ type: link
- name: Search
weight: 6
params:
@@ -98,6 +101,9 @@ menu:
name: Development ↗
url: https://imfing.github.io/hextra/versions/latest/
parent: versions
+ params:
+ icon: beaker
+ type: link
- identifier: v0.9
name: v0.9 ↗
url: https://imfing.github.io/hextra/versions/v0.9/ |

As the item has a parameter
icon, it must be handled before icon only item.To avoid repetition, I moved the code related to links into a dedicated partial.
I made a commit only for that; it can help the review.
The icon is supported for "normal" link and "menu" (parent/children) links.
Closes #359