This is an automated email from the ASF dual-hosted git repository.
bdelacretaz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/comdev-site.git
The following commit(s) were added to refs/heads/main by this push:
new 5386212 Add link to GitHub page source (#147)
5386212 is described below
commit 5386212a7f9b498f05c0f9d0c65c6e9742883b8d
Author: Bertrand Delacretaz <[email protected]>
AuthorDate: Fri Dec 1 09:11:24 2023 +0100
Add link to GitHub page source (#147)
---
hugo.toml | 1 +
layouts/_default/baseof.html | 6 +-----
layouts/partials/website-source.html | 7 +++++++
3 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/hugo.toml b/hugo.toml
index 4383c90..2fae7c6 100644
--- a/hugo.toml
+++ b/hugo.toml
@@ -39,6 +39,7 @@ date = ["date", ":filename", "publishDate", "lastmod"]
# Source Code repository section
repositoryUrl = "https://github.com/apache/comdev-site"
repositorySourceBranch = "main"
+repositoryContentBaseUrl =
"https://github.com/apache/comdev-site/blob/main/source"
# Open Graph section
title = "Apache Community Development"
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index d7f6441..7652eab 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -84,11 +84,7 @@
<div class="col-md-6 mb-md-0 mb-3">
<h5 class="text-uppercase">Website sources</h5>
-
- <p>
- This website is generated from the <a
href="https://github.com/apache/comdev-site">comdev-site repository</a>.<br>
- Patches are welcome!
- </p>
+ {{ partial "website-source.html" .}}
</div>
</div>
</div>
diff --git a/layouts/partials/website-source.html
b/layouts/partials/website-source.html
new file mode 100644
index 0000000..3c92acc
--- /dev/null
+++ b/layouts/partials/website-source.html
@@ -0,0 +1,7 @@
+<p>
+ This website is generated from the <a href="{{ .Site.Params.repositoryUrl
}}">comdev-site repository</a>
+ {{ if or .IsPage .IsSection .IsHome }}
+ <br/>
+ Source of this page: <a href="{{ .Site.Params.repositoryContentBaseUrl
}}/{{ .Page.File.Path }}" title="Source of this page">{{ .Page.File.Path }}</a>
+ {{ end }}
+</p>
\ No newline at end of file