name |
---|
Customize Navbar |
By default, Peach only shows three items on navbar:
- Home page
- Documentation page
- GitHub link
You can customize these items in your custom/app.ini
file:
[navbar]
-: home
-: documentation
-: github
[navbar.home]
LOCALE = navbar.home
LINK = /
[navbar.documentation]
LOCALE = navbar.documentation
LINK = /docs
[navbar.github]
ICON = github
LOCALE = GitHub
LINK = https://github.com/peachdocs/peach
BLANK = true
Or add more items:
[navbar]
-: home
-: download
-: documentation
-: github
[navbar.home]
...
[navbar.download]
...
[navbar.documentation]
...
[navbar.github]
...
You can see that the order of items are defined in the section [navbar]
, and in each of those sections, you can define at most four attributes:
- ICON: the name of icon in Semantic UI, no icon if it's empty.
- LOCALE: the value to be translated based on your locale file, and for certain name like "GitHub", you don't define a translation result, so it will not be translated.
- LINK: link of item, can be internal link like
/docs
or external link likehttps://github.com/peachdocs/peach
. - BLANK:
true
for open link in a new windows, default isfalse
.
🔔 You don't need to write or change anything, if your settings are exactly the same as default! This way, you can have most compatible way to work with Peach with possible future updates.
If you don't like the way Peach presents the navbar, you can always customize it by changing template file navbar.html
.