sort posts

This commit is contained in:
Wolfgang Hottgenroth 2018-05-23 21:17:59 +02:00
parent 8dadc9c8d0
commit 5239d6513a
Signed by: wn
GPG Key ID: B586EAFCDF2F65F4

View File

@ -27,7 +27,7 @@ function getToc() : string {
logger.info("building toc")
let toc : string = ""
let posts = fs.readdirSync('./docroot/posts')
posts.forEach((v) => {
posts.sort().reverse().forEach((v) => {
let content = fs.readFileSync(`./docroot/posts/${v}/article.pag`)
let contentStr = content.toString()
let pageOptions = getPageOptions(contentStr)