Skip to content

Commit a40d5cf

Browse files
committed
add repo link to the index page
1 parent 40fb7ce commit a40d5cf

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

.github/workflows/website.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ jobs:
3131
echo "" >> .env.final
3232
owner="${{ github.repository_owner }}"
3333
repo="$(awk -F / '{print $2}' <<< "${{ github.repository }}")"
34+
repo_url="${GITHUB_SERVER_URL%/}/${GITHUB_REPOSITORY#/}"
3435
if ! grep -qE '^HUGO_BASEURL=' .env.final; then echo "HUGO_BASEURL=${BASEURL:-https://$owner.github.io/$repo/}" | tee -a .env.final; fi
35-
if ! grep -qE '^HUGO_PARAMS_FOOTER=' .env.final; then echo HUGO_PARAMS_FOOTER=$'\'<a href="${{ github.server_url }}/${{ github.repository }}">source repo</a>\'' | tee -a .env.final; fi
36+
if ! grep -qE '^HUGO_PARAMS_SOURCEREPOURL=' .env.final; then echo HUGO_PARAMS_SOURCEREPOURL="$repo_url" | tee -a .env.final; fi
3637
if ! grep -qE '^DOMAIN=' .env.final; then echo "DOMAIN=$(awk -F / '/^HUGO_BASEURL=/ {print $3}' .env.final | tail -n1)" | tee -a .env.final; fi
3738
env:
3839
DOTENV: ${{ secrets.DOTENV }}

config.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ staticDir = ["static", "org/assets"]
88

99
[params]
1010
11+
sourceRepoURL = "https://example.org/"
1112

1213
[markup]
1314
[markup.goldmark]
@@ -39,4 +40,4 @@ email = "[email protected]"
3940
tabWidth = 4
4041

4142
[permalinks]
42-
posts = "/:title/"
43+
posts = "/:title/"

content/_index.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ type = "index"
44
draft = false
55
+++
66

7-
# Table of Contents
7+
Welcome. If you have any comments, please open an issue in the [source repo]({{< param "sourceRepoURL" >}}).
8+
# List of Posts

0 commit comments

Comments
 (0)