diff options
author | Florrie <towerofnix@gmail.com> | 2019-01-01 02:14:51 -0400 |
---|---|---|
committer | Florrie <towerofnix@gmail.com> | 2019-01-01 02:14:51 -0400 |
commit | 0054ac2d803e5308778c5fd8219be41fe4459ac7 (patch) | |
tree | 6eba51ff33c38fcbb3b968be9492540050c84eef /build.js | |
parent | b094791304da828bebcf502bba84179b1361ab96 (diff) |
New post, <art fullwidth>, post.config.unlisted
Diffstat (limited to 'build.js')
-rw-r--r-- | build.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/build.js b/build.js index 2be227c..71e9b8a 100644 --- a/build.js +++ b/build.js @@ -481,7 +481,7 @@ const generateArchiveTable = posts => ( </colgroup> <tbody> ${ - posts.map( + posts.filter(post => !post.config.unlisted).map( post => { const link = getPostPath(post) @@ -604,7 +604,7 @@ const parsePostText = async (text) => { }, attrs) return fixWS` - <div class="art-container"><div> + <div class="art-container${options.fullwidth ? ' full-width' : ''}"><div> <a href="static/media/${encodeURIComponent(filename)}.png"><img alt="${filename.match(/^[0-9]+-(.*)$/)[1]}" src="static/media/${encodeURIComponent(filename)}.png"></a> ${options.noext ? '' : fixWS` <br>(<a href="static/media/${encodeURIComponent(filename)}.${options.ext}">${filename.match(/^[0-9]+-(.*)$/)[1]}.${options.ext}</a>) @@ -691,10 +691,15 @@ const getCategoryData = () => ( ) const getLatestPost = posts => { - let latestPost = posts[0] + let latestPost = posts.find(post => !post.config.unlisted) let latestDate = 0 for (let curPost of posts) { + // If it's unlisted, skip it. + if (curPost.config.unlisted) { + continue + } + const curDate = getDate(curPost) if (curDate > latestDate) { latestPost = curPost |