summary refs log tree commit diff stats
path: root/src/domain
diff options
context:
space:
mode:
Diffstat (limited to 'src/domain')
-rw-r--r--src/domain/posts.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/domain/posts.js b/src/domain/posts.js
index aedf58e..ea81729 100644
--- a/src/domain/posts.js
+++ b/src/domain/posts.js
@@ -4,6 +4,7 @@ const fs = require('fs')
 const path = require('path')
 const matter = require('gray-matter')
 const markdown = require('../modules/markdown.js')
+const { indentForTemplate, postIndentLevel } = require('../responders.js')
 
 const grayMatterOptions = {
   lang: 'toml',
@@ -33,7 +34,10 @@ function get (filename) {
   const fileMatter = matter.read(filename, grayMatterOptions)
   fileMatter.basename = getTitle(fileMatter)
   delete fileMatter.orig
-  fileMatter.body = markdown(fileMatter.content)
+  fileMatter.body = indentForTemplate(
+    markdown(fileMatter.content),
+    postIndentLevel
+  )
   return canonicaliseMetadata(fileMatter)
 }