Hello
Menu definitions
need a pre
attribute which has to be supplied in the config.toml file.
Example:
What does pre
mean and what do I need to supply as the value?
Regards
HJH
Hello
Menu definitions
need a pre
attribute which has to be supplied in the config.toml file.
Example:
What does pre
mean and what do I need to supply as the value?
Regards
HJH
This seems to be relevant to the theme you chose to use.
The required pre
tag (preformatted text element) has to do with how that theme renders the menu.
What Hugo does it that the value which is given for pre
is copied as is. But no pre
tag. What is not clear why the theme wants that and what it is for
<i class='fa fa-user fa-fw'>
The possible values for the blackburn
theme are
pre = "<i class='fa fa-home fa-fw'></i>"
pre = "<i class='fa fa-list fa-fw'></i>"
pre = "<i class='fa fa-user fa-fw'></i>"
pre = "<i class='fa fa-phone fa-fw'></i>"
So this looks like a trick to assign specific CSS classes to a menu item. However I would have expected for classes
fa
fa-fw
to be assigned generally.
On a more general level the question is:
Which themes are recommended as good and well written examples to learn from?
In another thread the following theme was recommended
http://en.xianmin.org/hugo-theme-jane/
I wonder if there are more noteworthey examples which show how menus are to be constructed.
These could be linked to from
https://gohugo.io/templates/menu-templates/
Check out Hugo’s Twitter feed. @bep has been porting themes to Hugo lately.
Thank you
Here they are
https://themes.gohugo.io/hugo-smorg/