Skip to content

Commit

Permalink
[publishCategory] optimize HTML
Browse files Browse the repository at this point in the history
Make `<li>` a single line for smaller and cleaner difs
Fixes #95
  • Loading branch information
pkra committed Aug 16, 2017
1 parent 2726334 commit 1ffc694
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions lib/publishCategory.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,10 @@ exports.publishCategory = function(cat, entries) {
'---\n\n' // +
;

theOutput += '<ul class="entry-list"> \n'
theOutput += '<ul class="entry-list">\n'

filteredEntries.forEach( (entry) => {
theOutput += `
<li>
<a class="entry-title" href="${entry.url}" rel="nofollow">
<time datetime="${entry.date}" class="entry-date">
${new Date(entry.date).toUTCString().substring(5, 16)}
</time>
${escapeMD(entry.postTitle)}
<span class="entry-blog">
${escapeMD(entry.blogTitle)}
</span>
</a>
</li>
`;
theOutput += `<li><a class="entry-title" href="${entry.url}" rel="nofollow"><time datetime="${entry.date}" class="entry-date">${new Date(entry.date).toUTCString().substring(5, 16)}</time>${escapeMD(entry.postTitle)}<span class="entry-blog">${escapeMD(entry.blogTitle)}</span></a></li>\n`;
})

theOutput += '</ul>\n';
Expand Down

0 comments on commit 1ffc694

Please sign in to comment.