Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/peaceiris/hugo-theme-iris.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShohei Ueda <30958501+peaceiris@users.noreply.github.com>2021-05-07 21:04:42 +0300
committerGitHub <noreply@github.com>2021-05-07 21:04:42 +0300
commitf4cf568c7666353c6b15ce40992ee6e51df4679e (patch)
tree2330745169e7d09e51ae0c0c83b42f82fd128116 /layouts
parent2018b4c9e0e27527c066d282215e34188198e1bb (diff)
feat: Add view-on-github-button (#326)
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/header.html1
-rw-r--r--layouts/partials/view-on-github-button.html5
2 files changed, 6 insertions, 0 deletions
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index 492b39b3..7abbe0dd 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -63,6 +63,7 @@
<div class="hero-foot columns is-desktop">
<div class="column is-8 is-offset-2">
{{ partial "lang-button" . }}
+ {{ partial "view-on-github-button" . }}
{{ partial "edit-button" . }}
{{ partial "check-tools" . }}
</div>
diff --git a/layouts/partials/view-on-github-button.html b/layouts/partials/view-on-github-button.html
new file mode 100644
index 00000000..8383688f
--- /dev/null
+++ b/layouts/partials/view-on-github-button.html
@@ -0,0 +1,5 @@
+{{ with $.Site.Params.repo }}
+ <a class="button is-pulled-right" href="{{ .URL }}/blob/{{ .branch }}/{{ .contentDir }}/{{ $.Lang }}/{{ $.File.Path }}">
+ {{ i18n "view_on_github" }}
+ </a>
+{{ end }}