mirror of https://github.com/nodejs/node.git
blog: Don't print 'undefined' for missing author/category
parent
103921dac0
commit
5193d59219
|
@ -110,10 +110,12 @@
|
||||||
<% if (typeof post !== 'undefined') {
|
<% if (typeof post !== 'undefined') {
|
||||||
// just one post on this page
|
// just one post on this page
|
||||||
%>
|
%>
|
||||||
<p class="meta"><%=
|
<p class="meta"><%-
|
||||||
post.author + ' - ' +
|
post.date.toUTCString().replace(/ GMT$/, '') + ' UTC' +
|
||||||
post.date.toUTCString().replace(/ GMT$/, '') + ' - '
|
(post.author ? ' - ' + post.author : '') +
|
||||||
%><a href="/<%= post.category %>/"><%= post.category %></a></p>
|
(post.category ? ' - <a href="/' + post.category + '/">' +
|
||||||
|
post.category + '</a>' : '')
|
||||||
|
%></p>
|
||||||
|
|
||||||
<%- post.content %>
|
<%- post.content %>
|
||||||
|
|
||||||
|
@ -167,10 +169,14 @@
|
||||||
%>" class="permalink"><%-
|
%>" class="permalink"><%-
|
||||||
post.title
|
post.title
|
||||||
%></a></h1>
|
%></a></h1>
|
||||||
<p class="meta"><%=
|
|
||||||
post.author + ' - ' +
|
<p class="meta"><%-
|
||||||
post.date.toUTCString().replace(/ GMT$/, '') + ' - '
|
post.date.toUTCString().replace(/ GMT$/, '') + ' UTC' +
|
||||||
%><a href="/<%= post.category %>/"><%= post.category %></a></p>
|
(post.author ? ' - ' + post.author : '') +
|
||||||
|
(post.category ? ' - <a href="/' + post.category + '/">' +
|
||||||
|
post.category + '</a>' : '')
|
||||||
|
%></p>
|
||||||
|
|
||||||
<%- post.content %>
|
<%- post.content %>
|
||||||
</div>
|
</div>
|
||||||
<%
|
<%
|
||||||
|
|
Loading…
Reference in New Issue