mirror of
https://gitea.com/gitea/theme.git
synced 2026-02-03 03:23:17 +08:00
Add Edit on GitHub (#116)
resolved #115 The following configuration need to be added to [config.yml](https://github.com/go-gitea/gitea/blob/main/docs/config.yaml) ([go-gitea/gitea#21981](https://github.com/go-gitea/gitea/pull/21981)) ```yml params: repo: "https://github.com/go-gitea/gitea" docContentPath: "docs/content" ``` Signed-off-by: Xinyu Zhou <i@sourcehut.net> Reviewed-on: https://gitea.com/gitea/theme/pulls/116 Reviewed-by: silverwind <silverwind@noreply.gitea.io> Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Xinyu Zhou <i@sourcehut.net> Co-committed-by: Xinyu Zhou <i@sourcehut.net>
This commit is contained in:
3
layouts/partials/edit-this-page.html
Normal file
3
layouts/partials/edit-this-page.html
Normal file
@@ -0,0 +1,3 @@
|
||||
{{- if and .Site.Params.repo .File -}}
|
||||
<a href="{{ .Site.Params.repo }}/edit/main/{{ .Site.Params.docContentPath }}/{{ .File.Path }}">{{- T "edit_this_page" -}}</a>
|
||||
{{- end -}}
|
||||
Reference in New Issue
Block a user