-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable GH Pages workflow on pushes to master & mllint-site branches, …
…fixes GH Pages website footer so that it can show individual commit versions instead of just proper tags
- Loading branch information
Showing
3 changed files
with
37 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,5 @@ | |
|
||
/content/docs/rules/* | ||
!/content/docs/rules/_index.md | ||
|
||
/public/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,20 @@ | ||
<footer class="footer-version"> | ||
<!-- HUGO_MLLINT_VERSION will be set to basically the output of `git describe --tags` during build, e.g. `v0.11.0` or `v0.11.0-8-g3b6aa93` --> | ||
{{ $version := getenv "HUGO_MLLINT_VERSION" }} | ||
{{ if ne $version "" }} | ||
<span>mllint version: </span> | ||
<span><a href="https://github.com/bvobart/mllint/releases/tag/{{ $version }}" rel="noopener noreferrer" target="_blank">{{ $version }}</a></span> | ||
{{ $tag := index (split $version "-") 0 }} | ||
|
||
<!-- If not set, just say version unknown --> | ||
{{ if eq $version "" }} <span>mllint version unknown</span> | ||
<!-- else, display proper version with link to latest release. --> | ||
{{ else }} | ||
<span>mllint version unknown</span> | ||
<span>mllint version: </span> | ||
<span><a href="https://github.com/bvobart/mllint/releases/tag/{{ $tag }}" rel="noopener noreferrer" target="_blank">{{ $tag }}</a></span> | ||
<!-- if the current deployment is not a tagged release, but a regular commit, display the full Git reference --> | ||
{{ if ne $version $tag }} | ||
<br /> | ||
<span> Git ref:</span> | ||
<span> {{ $version }} </span> | ||
{{ end }} | ||
{{ end }} | ||
|
||
</footer> |