Me like many others in these discussions find ourself lost in the terms and naming Hugo use.
I was searching and trying different methods to make a simple thing like showing some text under the menu name
as I was trying to add
in config file all were giving error
can't evaluate field slognText in type *navigation.MenuEntry
and after reading many blogs and discussions I now use pre: and it works but there is no way a beginner like me will ever search for “Hugo pre” when trying to show menu item slogan
is it possible we can create level based discussions for beginners and a list of things which one can search without knowing the exact names like .pre in Hugo.
Right now I feel the info need is really hard to find.
I will search the menu, and then I get
an example like below
gohugo-theme-ananke/site-navigation.html at adeb59e2a318c3f58eb134861f2363e6663842bf · CarsonSlovoka/gohugo-theme-ananke · GitHub
.Site, you can get to the contents of the config, the actual effect depends on the template you use, that is, if you use the theme, not implement the
.Pre, then even if the config you set, it will not have results.
I would recommend learning a little Go, understanding the text/template or html/template. Then, if you still want to use the Hugo to help you build a static site, you will better understand many things and rely on the documentation; you will be very pained!
I post in the category meta as a suggestion and not something very specific to me. As I am learning Hugo the hard way
The word pre: is used 3 times on the page you shared but no where it explain what the
pre: is, it is expecting me to understand the use of pre just by looking at
pre: <i class='fa fa-heart'></I> which to me looks like a method on how to use an icon in menu.
isn’t the purpose of good documentation to provide answers on how to make use of the tool/product? so, this was just a suggestion on how to improve.
thanks for taking the time
Pre is documented here: Menu Entry Properties | Hugo for anyone after this.
Documentation comes up repeatedly and while I agree that is a great suggestion to have tutorials and what not for beginners, it is about resources of which there are limited and requests of which there are many.
MenuEntry that you can set on your
hugo/menu.go at e3dc5240f01fd5ec67643e40f27c026d707da110 · gohugoio/hugo · GitHub
If you want to customize by yourself, you may consider using the Params
Here is an example
run by yourself
git clone https://github.com/CarsonSlovoka/old-home.git
git fetch origin dev
git checkout aa5a9b0632b4b09d85adf52ca85cf801efa44428
git submodule update --init
Hugo has helped us think through many scenarios, but because of this, you may have to try to understand the documentation. Even if you want to look at the source code, I don’t think it’s suitable for beginners at this stage, and you can certainly go up from the first version, but it’s tiring to do so without guidance.
Hugo wants to give us is a macro concept. It tells us a static site has those things to consider. You can touch the framework and learn its spirit, but if you want to be entirely led by the framework, I think it’s very tiring!
thanks for sharing the link, I myself found this but it was not easy to find. the most difficult part is to find out what
and once you go to this page Menu Entry Properties | Hugo
This is the language you need to make sense of, as this text is not easy to understand. There appears to be a grammatical panic on the first line.
template.HTML Value of the
pre key if set for the menu entry. This value typically contains a string representing HTML.
So documentation for dummies/beginners can make use of simple English, otherwise at least correct grammar so one can read properly.