This is an automated email from the ASF dual-hosted git repository. bdelacretaz pushed a commit to branch preview/edit-github in repository https://gitbox.apache.org/repos/asf/comdev-site.git
commit 5e75b700866ebaee30c2e23c01a03a1228b16705 Author: Bertrand Delacretaz <[email protected]> AuthorDate: Tue Nov 28 10:06:46 2023 +0100 Add link to GitHub page source --- 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..ea37ab9 --- /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 .IsPage }} + <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
