Skip to content

Commit a420dd2

Browse files
committed
Dynamically set version, link and date on frontpage
1 parent 9b15c44 commit a420dd2

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

_config.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,3 +123,7 @@ social:
123123

124124
twitter:
125125
account: home_assistant
126+
127+
current_major_version: 0
128+
current_minor_version: 31
129+
current_patch_version: 1

source/_posts/2016-10-22-flash-briefing-updater-hacktoberfest.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ title: "0.31: Reading you the news, some serious business, spooky hackery and a
44
description: "Alexa Flash Briefing API support, Markdown in persistent notifications, a new updater component, Hacktoberfest and breaking Z-Wave changes."
55
date: 2016-10-22 13:00:00 -0700
66
date_formatted: "October 22, 2016"
7+
release_date: 2016-10-24 21:57:00 -0700
78
author: Robbie Trencheny
89
author_twitter: robbie
910
comments: true

source/index.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,17 @@
1111
hide_github_edit: true
1212
---
1313

14+
{% assign recent_release_post = site.categories['Release-Notes'].first %}
15+
1416
<div class="frontpage">
1517
<div class="grid">
1618
<div class="grid__item one-third lap-one-third palm-one-whole">
1719
<div class='current-version material-card text'>
18-
<h1>Current Version: 0.31.1</h1>
19-
Released: <span class='release-date'>October 24, 2016</span>
20+
<h1>Current Version: {{ site.current_major_version }}.{{ site.current_minor_version }}.{{ site.current_patch_version }}</h1>
21+
Released: <span class='release-date' title='{{ recent_release_post.release_date }}'>{{ recent_release_post.release_date | date: '%B %d, %Y' }}</span>
2022

2123
<div class='links'>
22-
<a href='/blog/2016/10/22/flash-briefing-updater-hacktoberfest/'>Release notes</a>
24+
<a href='{{ root_url }}{{ recent_release_post.url }}'>Release notes</a>
2325
</div>
2426
</div>
2527
<div class='join-community material-card text'>

0 commit comments

Comments
 (0)