[x]):Is there any way to create custom pages with the templating engine and custom routes?
Here in germany, we need at least two custom sites (imprint and privacy policy) and it would be great, if i could create this two sites in the custom directory.
The template files can already be created in _custom/templates_ but how do i define the routing?
It looks like the routing is made in go files in the _routers_ directory? That means i would have to edit the source files? (And updates would destroy my changes?)
None
Probably this could be created adding new reserved name pages and something like Gitea wiki but editable only by admins
After #3308 "Templates for extra links in top navbar and repo tool tabs." you can do this by placing your extra sites/pages under your "custom/public/" directory (for instance custom/public/impressum.html) and putting links to them in custom/templates/custom/extra_links.tmpl:
https://docs.gitea.io/en-us/customizing-gitea/#customizing-gitea-pages
To match the current style, the link should have class name "item":
<a class="item" href="{{AppSubUrl}}/impressum.html">Impressum</a>
That should be added to docs
Hi, I've added that information to the docs and also listed all the other template hooks at the PR "Improve documentation about custom templates. #3345"
Sounds good. Im closing this issue now
Most helpful comment
Hi, I've added that information to the docs and also listed all the other template hooks at the PR "Improve documentation about custom templates. #3345"