diff --git a/.github/workflows/hugo.yml b/.github/workflows/hugo.yml index 4f94b3f..fd118e7 100644 --- a/.github/workflows/hugo.yml +++ b/.github/workflows/hugo.yml @@ -31,7 +31,7 @@ jobs: build: runs-on: ubuntu-latest env: - HUGO_VERSION: 0.108.0 + HUGO_VERSION: 0.123.7 steps: - name: Install Hugo CLI run: | diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html new file mode 100644 index 0000000..609675c --- /dev/null +++ b/layouts/_default/_markup/render-link.html @@ -0,0 +1,29 @@ +{{- $u := urls.Parse .Destination -}} +{{- $href := $u.String -}} +{{- if strings.HasPrefix $u.String "#" }} + {{- $href = printf "%s#%s" .Page.RelPermalink $u.Fragment }} +{{- else if not $u.IsAbs -}} + {{- with or + ($.Page.GetPage $u.Path) + ($.Page.Resources.Get $u.Path) + (resources.Get $u.Path) + -}} + {{- $href = .RelPermalink -}} + {{- with $u.RawQuery -}} + {{- $href = printf "%s?%s" $href . -}} + {{- end -}} + {{- with $u.Fragment -}} + {{- $href = printf "%s#%s" $href . -}} + {{- end -}} + {{- end -}} +{{- end -}} +{{- $attributes := dict "href" $href "title" .Title -}} +{{ .Text | safeHTML }} +{{- /**/ -}} \ No newline at end of file diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index dcb54aa..7fc89b9 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -78,7 +78,7 @@
- Star me on GitHub + Star me on GitHub {{ block "main" . }} diff --git a/layouts/index.html b/layouts/index.html index 082eef1..3193e08 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -2,4 +2,10 @@