Adds site var for version

This commit is contained in:
Ryan L McIntyre 2020-02-01 08:43:14 -08:00
parent fe3ba4e3b8
commit 8843f4d589
3 changed files with 4 additions and 3 deletions

View file

@ -21,6 +21,7 @@ source_link: "https://github.com/ryanoasis/nerd-fonts/tree/gh-pages"
favicon: "assets/img/favicon.ico" favicon: "assets/img/favicon.ico"
touch_icon: "assets/img/apple-touch-icon.png" touch_icon: "assets/img/apple-touch-icon.png"
google_analytics_key: "UA-91070609-1" google_analytics_key: "UA-91070609-1"
current_version: 2.1.0
### template colors, used site-wide via css ### ### template colors, used site-wide via css ###

View file

@ -19,6 +19,6 @@
"downloadUrl" : "https://www.nerdfonts.com/font-downloads", "downloadUrl" : "https://www.nerdfonts.com/font-downloads",
"operatingSystem" : "Linux, macOS, Windows", "operatingSystem" : "Linux, macOS, Windows",
"screenshot" : "https://www.nerdfonts.com/assets/img/nerd-fonts-powerline-extra-terminal.png", "screenshot" : "https://www.nerdfonts.com/assets/img/nerd-fonts-powerline-extra-terminal.png",
"softwareVersion" : "2.0.0" "softwareVersion" : "{{ site.current_version }}"
} }
</script> </script>

View file

@ -12,7 +12,7 @@ page: font-downloads
<div class="d-flex flex-row flex-wrap align-items-stretch justify-content-betweeen justify-content-aroundd justify-content-center"> <div class="d-flex flex-row flex-wrap align-items-stretch justify-content-betweeen justify-content-aroundd justify-content-center">
{% for font in site.data.fonts.fonts %} {% for font in site.data.fonts.fonts %}
<div class="item"> <div class="item">
<a href="https://github.com/ryanoasis/nerd-fonts/releases/download/v2.0.0/{{ font.unpatchedName }}.zip"> <a href="https://github.com/ryanoasis/nerd-fonts/releases/download/v{{ site.current_version }}/{{ font.unpatchedName }}.zip">
<div class="download-icon"></div> <div class="download-icon"></div>
<img src="/assets/img/previews/{{ font.patchedName }} Nerd Font.svg" alt="{{ font.unpatchedName }}" title="Download {{ font.unpatchedName }}"> <img src="/assets/img/previews/{{ font.patchedName }} Nerd Font.svg" alt="{{ font.unpatchedName }}" title="Download {{ font.unpatchedName }}">
</a> </a>
@ -22,7 +22,7 @@ page: font-downloads
<div> <div>
<h4 class="inlineblock bg-green border-white text-white nerd-font-button"> <h4 class="inlineblock bg-green border-white text-white nerd-font-button">
<i class="nf nf-fa-download"></i> <i class="nf nf-fa-download"></i>
<a href="https://github.com/ryanoasis/nerd-fonts/releases/download/v2.0.0/{{ font.unpatchedName }}.zip" class="inlineblock">Download</a> <a href="https://github.com/ryanoasis/nerd-fonts/releases/download/v{{ site.current_version }}/{{ font.unpatchedName }}.zip" class="inlineblock">Download</a>
</h4> </h4>
{% if font.linkPreviewFont != false %} {% if font.linkPreviewFont != false %}
<h4 class="inlineblock bg-purple border-white text-white nerd-font-button"> <h4 class="inlineblock bg-purple border-white text-white nerd-font-button">