Dynamically set version, link and date on frontpage

This commit is contained in:
Robbie Trencheny 2016-10-24 02:33:16 -07:00
parent 9b15c44756
commit a420dd20e7
3 changed files with 10 additions and 3 deletions

View File

@ -123,3 +123,7 @@ social:
twitter:
account: home_assistant
current_major_version: 0
current_minor_version: 31
current_patch_version: 1

View File

@ -4,6 +4,7 @@ title: "0.31: Reading you the news, some serious business, spooky hackery and a
description: "Alexa Flash Briefing API support, Markdown in persistent notifications, a new updater component, Hacktoberfest and breaking Z-Wave changes."
date: 2016-10-22 13:00:00 -0700
date_formatted: "October 22, 2016"
release_date: 2016-10-24 21:57:00 -0700
author: Robbie Trencheny
author_twitter: robbie
comments: true

View File

@ -11,15 +11,17 @@ description: Open-source home automation platform running on Python 3. Track and
hide_github_edit: true
---
{% assign recent_release_post = site.categories['Release-Notes'].first %}
<div class="frontpage">
<div class="grid">
<div class="grid__item one-third lap-one-third palm-one-whole">
<div class='current-version material-card text'>
<h1>Current Version: 0.31.1</h1>
Released: <span class='release-date'>October 24, 2016</span>
<h1>Current Version: {{ site.current_major_version }}.{{ site.current_minor_version }}.{{ site.current_patch_version }}</h1>
Released: <span class='release-date' title='{{ recent_release_post.release_date }}'>{{ recent_release_post.release_date | date: '%B %d, %Y' }}</span>
<div class='links'>
<a href='/blog/2016/10/22/flash-briefing-updater-hacktoberfest/'>Release notes</a>
<a href='{{ root_url }}{{ recent_release_post.url }}'>Release notes</a>
</div>
</div>
<div class='join-community material-card text'>