Skip to content

Commit

Permalink
Merge pull request #42 from coreruleset/update-github-edit-footer-link
Browse files Browse the repository at this point in the history
fix: edit link in footer
  • Loading branch information
dune73 authored Apr 12, 2024
2 parents b1f86cf + e2efb54 commit 321d293
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions layouts/partials/footer/github.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{{ with .Site.Params.github }}
{{ if and .repo_url .show_edit_link }}
{{ with $.File }}
{{ $pageRelPath := replace .Path "\\" "/" }}
{{ $editURL := printf "%s/content/%s" $.Site.Params.github.repo_url $pageRelPath }}

<a target="_blank" rel="noopener noreferrer" href="{{ $editURL }}" class="nowrap">
{{ $.Site.Params.github_edit | default "Edit this page on GitHub" }}
</a>

{{ end }}
{{ end }}
{{ end }}

0 comments on commit 321d293

Please sign in to comment.