Move navigation from _menu.json files in each navigation-parent directory to a naviga...
[ndcode_site.git] / _lib / post.jst
diff --git a/_lib/post.jst b/_lib/post.jst
deleted file mode 100644 (file)
index 75d261a..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-let assert = require('assert')
-
-return async (env, head, body, scripts) => {
-  let breadcrumbs = await _require('/_lib/breadcrumbs.jst')
-  let navbar = await _require('/_lib/navbar.jst')
-
-  await navbar(
-    env,
-    head,
-    // body
-    async _out => {
-      await breadcrumbs(env, _out)
-
-      // extract second-level directory name
-      assert(env.parsed_url.pathname.slice(0, 6) === '/blog/')
-      let index = env.parsed_url.pathname.indexOf('/', 6)
-      let dir = index === -1 ? '' : env.parsed_url.pathname.slice(6, index)
-
-      // load article data
-      let menu = await env.site.get_menu('/blog/_menu.json')
-      let article = menu.entries[menu.index[dir]]
-
-      div.row.mb-3 {
-        div.col-sm-12 {
-          img.img-responsive(src=article.image || 'image.jpg') {}
-        }
-      }
-
-      h3 {`${article.description}—by ${article.author}`}
-
-      await body(_out)
-    },
-    scripts
-  )
-}