瀏覽代碼

Update indexes, remove logs

Craig Fletcher 6 年之前
父節點
當前提交
1949819cef
共有 3 個文件被更改,包括 4 次插入4 次删除
  1. 0 2
      .npm-scripts/decorators/articleDecorator.js
  2. 0 1
      .npm-scripts/decorators/outputDecorator.js
  3. 4 1
      pages/index.handlebars

+ 0 - 2
.npm-scripts/decorators/articleDecorator.js

@@ -5,8 +5,6 @@ module.exports = function articleDecorator(config, item, meta) {
   );
 
   if (introMatches) {
-    console.log("groups:", introMatches.groups);
-    console.log("content:", item.content);
     blurb = introMatches.groups.introText.trim();
   }
   const titleStart = item.content.indexOf(">", item.content.indexOf("<h1")) + 1;

+ 0 - 1
.npm-scripts/decorators/outputDecorator.js

@@ -2,7 +2,6 @@ const path = require("path");
 
 module.exports = function outputDecorator(config, item, meta) {
   const outputDir = path.join(meta.dir.replace(config.baseDir, ""));
-  console.log("OPD", `${path.join(outputDir, meta.name)}`);
   return {
     ...item,
     outputPath: `${path.join(outputDir, meta.name)}`,

+ 4 - 1
pages/index.handlebars

@@ -1,8 +1,11 @@
 {{> header }}
 <main>
 <section>
+{{#if item.content}}
+    {{{ item.content }}}
+{{else}}
   <h1><a title="{{meta.name}}" href="{{meta.outputPath}}">{{meta.title}}</a></h1>
-  {{meta.outputPath}}
+{{/if}}
 </section>
   {{#if meta.sections}}
 <section class="filetree">