Skip to content

Commit adfa7ae

Browse files
ryonstack72
authored andcommitted
Update news section with YAML data file (hashicorp#14612)
* Update news section with April 4 webinar video * Use YAML data file for news; add webinar registration CTA
1 parent cc505b2 commit adfa7ae

4 files changed

Lines changed: 35 additions & 23 deletions

File tree

‎website/data/news.yml‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
default_link_text: 'Read more'
2+
3+
featured_post:
4+
media_html: <a href="http://hashi.co/2qO6A2H" src="assets/images/news/webinar-register-585w.png" alt="Webinar Register Now" srcset="assets/images/news/webinar-register-2000w.png 2x"></a>
5+
title: Controlling Your Organization With HashiCorp Terraform and Google Cloud Platform
6+
body: Register for our upcoming webinar with Google Cloud on May 24th. Learn how to build your entire infrastructure across Google Cloud with one command.
7+
link_url: http://hashi.co/2qO6A2H
8+
link_text: Register
9+
10+
additional_posts:
11+
-
12+
title: Terraform 0.9 Released
13+
body: Terraform 0.9 adds major new functionality to Terraform. Read the highlights from the 0.9 release.
14+
link_url: https://www.hashicorp.com/blog/terraform-0-9/
15+
-
16+
title: 'Webinar: Multi-Cloud, One Command with Terraform'
17+
body: Watch our recent webinar with Mitchell Hashimoto to learn how Terraform provisions infrastructure across different clouds using a consistent workflow.
18+
link_url: https://youtu.be/nLg7fpVcIv4
19+
link_text: Watch Now
93.3 KB
Loading
12.1 KB
Loading

‎website/source/index.html.erb‎

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -177,33 +177,26 @@ description: |-
177177
<h2>Latest News</h2>
178178
</div>
179179
<div class="col-md-5 col-sm-12">
180+
<% feature = data.news.featured_post %>
180181
<div class="latest-item">
181-
<iframe width="560" height="270" src="https://www.youtube.com/embed/nLg7fpVcIv4?color=white&modestbranding=1" frameborder="0" allowfullscreen></iframe>
182-
<%#= image_tag 'news/webinar-Terraform-4-4-2017.png', alt: 'Webinar April 4, 2017, 10:00 AM PST' %>
183-
<h3>Webinar: Multi-Cloud, One Command with Terraform</h3>
184-
<p>
185-
Watch our recent webinar with Mitchell Hashimoto to learn how Terraform provisions infrastructure across different clouds using a consistent workflow.
186-
</p>
187-
<a class="button" href="https://youtu.be/nLg7fpVcIv4" target="_blank">Watch Now</a>
182+
<%= feature.media_html %>
183+
<h3><%= feature.title %></h3>
184+
<%= simple_format feature.body %>
185+
<% if feature.link_url %>
186+
<a class="button" href="<%= feature.link_url %>" target="_blank"><%= feature.link_text || data.news.default_link_text %></a>
187+
<% end %>
188188
</div>
189189
</div>
190190
<div class="col-md-offset-1 col-md-6 col-sm-12">
191-
<div class="latest-item">
192-
<h3>Terraform 0.9 Released</h3>
193-
<p>
194-
Terraform 0.9 adds major new functionality to Terraform. Read the
195-
highlights from the 0.9 release
196-
</p>
197-
<a class="button" href="https://www.hashicorp.com/blog/terraform-0-9/">Read more</a>
198-
</div>
199-
<div class="latest-item">
200-
<h3>Applying Graph Theory to Infrastructure As Code</h3>
201-
<p>
202-
Watch this talk from HashiConf 2016 where we explore the graph
203-
theory at the heart of Terraform's orchestration engine.
204-
</p>
205-
<a class="button" href="https://www.youtube.com/watch?v=4Pd9NrZSbGU">Watch Video</a>
206-
</div>
191+
<% data.news.additional_posts.each do |post| %>
192+
<div class="latest-item">
193+
<h3><%= post.title %></h3>
194+
<%= simple_format post.body %>
195+
<% if post.link_url %>
196+
<a class="button" href="<%= post.link_url %>" target="_blank"><%= post.link_text || data.news.default_link_text %></a>
197+
<% end %>
198+
</div>
199+
<% end %>
207200
</div>
208201
</div>
209202
</div>

0 commit comments

Comments
 (0)