mirror of https://gitea.com/gitea/theme.git
Add `Edit on GitHub`
resolved #115 The following configuration need to be added to [config.yml](https://github.com/go-gitea/gitea/blob/main/docs/config.yaml) ```yml params: github_doc_repository: "https://github.com/go-gitea/gitea" github_doc_repository_path: "docs/content" ``` Signed-off-by: Xinyu Zhou <i@sourcehut.net>
This commit is contained in:
parent
3abdb2e66a
commit
6560d588d0
|
@ -12,3 +12,6 @@
|
|||
|
||||
- id: page_next
|
||||
translation: "Next"
|
||||
|
||||
- id: edit_on_github
|
||||
translation: "Edit on GitHub"
|
||||
|
|
|
@ -12,3 +12,6 @@
|
|||
|
||||
- id: page_next
|
||||
translation: "Volgende"
|
||||
|
||||
- id: edit_on_github
|
||||
translation: "Bewerken op GitHub"
|
||||
|
|
|
@ -12,3 +12,6 @@
|
|||
|
||||
- id: page_next
|
||||
translation: "Próximo"
|
||||
|
||||
- id: edit_on_github
|
||||
translation: "Edite em GitHub"
|
||||
|
|
|
@ -12,3 +12,6 @@
|
|||
|
||||
- id: page_next
|
||||
translation: "后一页"
|
||||
|
||||
- id: edit_on_github
|
||||
translation: "在 GitHub 上编辑此页面"
|
||||
|
|
|
@ -12,3 +12,6 @@
|
|||
|
||||
- id: page_next
|
||||
translation: "下一頁"
|
||||
|
||||
- id: edit_on_github
|
||||
translation: "在 GitHub 上編輯此頁面"
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
<div class="column is-three-quarters">
|
||||
<div class="content">
|
||||
{{ .Content }}
|
||||
<hr>
|
||||
{{ partial "edit-this" . }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
<div class="column">
|
||||
<div class=" content">
|
||||
{{ .Content }}
|
||||
<hr>
|
||||
{{ partial "edit-this" . }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
{{- if and .Site.Params.github_doc_repository .File -}}
|
||||
<a href="{{ .Site.Params.github_doc_repository }}/edit/main/{{ .Site.Params.github_doc_repository_path }}/{{ .File.Path }}" class="edit-page"><i class="fas fa-pen-square"></i>{{- T "edit_on_github" -}}</a>
|
||||
{{- end -}}
|
Loading…
Reference in New Issue