summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/content/doc/advanced/customizing-gitea.en-us.md2
-rw-r--r--templates/base/head.tmpl3
-rw-r--r--templates/custom/extra_links.tmpl0
-rw-r--r--templates/custom/extra_tabs.tmpl0
-rw-r--r--templates/repo/header.tmpl2
5 files changed, 7 insertions, 0 deletions
diff --git a/docs/content/doc/advanced/customizing-gitea.en-us.md b/docs/content/doc/advanced/customizing-gitea.en-us.md
index 5be30740c2..55e47d0203 100644
--- a/docs/content/doc/advanced/customizing-gitea.en-us.md
+++ b/docs/content/doc/advanced/customizing-gitea.en-us.md
@@ -66,6 +66,8 @@ To add custom HTML to the header or the footer of the page, in the `templates/cu
directory there is `header.tmpl` and `footer.tmpl` that can be modified. This can be
a useful place to add custom CSS files or additional Javascript.
+If all you want is to add extra links to the top navigation bar, or extra tabs to the repository view, you can put them in `extra_links.tmpl` and `extra_tabs.tmpl` inside your `custom/templates/custom/` directory.
+
## Customizing gitignores, labels, licenses, locales, and readmes.
Place custom files in corresponding sub-folder under `custom/options`.
diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl
index 04c5a43e4c..a486d9b9b9 100644
--- a/templates/base/head.tmpl
+++ b/templates/base/head.tmpl
@@ -158,6 +158,9 @@
{{end}}
<a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "explore"}}</a>
+
+ {{template "custom/extra_links" .}}
+
{{/*
<div class="item">
<div class="ui icon input">
diff --git a/templates/custom/extra_links.tmpl b/templates/custom/extra_links.tmpl
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/templates/custom/extra_links.tmpl
diff --git a/templates/custom/extra_tabs.tmpl b/templates/custom/extra_tabs.tmpl
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/templates/custom/extra_tabs.tmpl
diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl
index c83505ac96..db5b6c7f0c 100644
--- a/templates/repo/header.tmpl
+++ b/templates/repo/header.tmpl
@@ -89,6 +89,8 @@
</a>
{{end}}
+ {{template "custom/extra_tabs" .}}
+
{{if .IsRepositoryAdmin}}
<div class="right menu">
<a class="{{if .PageIsSettings}}active{{end}} item" href="{{.RepoLink}}/settings">