diff --git a/routes/articles.js b/routes/articles.js index 897bc1a..5f10851 100644 --- a/routes/articles.js +++ b/routes/articles.js @@ -8,8 +8,6 @@ function toTitleCase(str) { /* GET home page. */ function articles(request, response) { - var articlesPage = `20 text/gemini\r\n\r\n# Articles by Uplink:SI\r\nList of Articles:\r\n${contents}\r\n`; - try { var articleList = fs.readdirSync('./articles'); articleList.reverse(); @@ -19,6 +17,7 @@ function articles(request, response) { title = toTitleCase(title); contents += `=> /articles/${item} ${title}\r\n`; }); + var articlesPage = `20 text/gemini\r\n\r\n# Articles by Uplink:SI\r\nList of Articles:\r\n${contents}\r\n`; response.send(articlesPage); } catch (error) { response.error(51);