Skip to content
Snippets Groups Projects
Unverified Commit 005ce314 authored by Sébastien Gaya's avatar Sébastien Gaya Committed by GitHub
Browse files

handle preview with post link without url (#1761)

parent 9480ced7
No related branches found
No related tags found
No related merge requests found
......@@ -54,7 +54,7 @@ date_format = "%e %B %Y"
<% elsif block.template.layout === "highlight"%>
<% if block.data
$highlight_post = block.template.selected_posts.first
$highlight_post = block.template.selected_posts.first
%>
<div class="highlight">
<div class="highlight-post">
......@@ -87,7 +87,7 @@ date_format = "%e %B %Y"
</div>
</article>
</div>
<div class="list">
<% block.template.selected_posts.each do |post|
next if post.nil?
......@@ -128,7 +128,7 @@ date_format = "%e %B %Y"
<article class="post" itemprop="blogPosts" itemscope itemtype="http://schema.org/BlogPosting">
<div class="post-content">
<h3 itemprop="headline">
<%= link_to post, post.url %>
<%= link_to_if post.url.present?, post, post.url %>
</h3>
<% if !post.categories.empty? %>
<ul class="post-categories">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment