summaryrefslogtreecommitdiff
path: root/lib/page_local.rb
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2017-01-09 16:45:53 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2017-01-09 16:45:53 -0500
commit5022d1a0df1534b1cbec1cbee23568f201ea1cc6 (patch)
tree559db39e2be5933c621a02c3f9874641b7f1a70c /lib/page_local.rb
parentf63a89bb8c494ea6b049285ec7c904d6d6136a88 (diff)
Implement actual file generation, go through fixing things.
Diffstat (limited to 'lib/page_local.rb')
-rw-r--r--lib/page_local.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/page_local.rb b/lib/page_local.rb
index ca3aa31..da8689d 100644
--- a/lib/page_local.rb
+++ b/lib/page_local.rb
@@ -21,15 +21,16 @@ class LocalPage < Page
def local_infile ; @infile ; end
def local_input ; @input ||= File::read(local_infile); end
- def _pandoc
- if @pandoc.nil?
+ def local_intype
types = {
'md' => 'markdown'
}
-
ext = File::extname(local_infile).gsub(/^[.]/, '')
- type = types[ext] || ext
- @pandoc = Pandoc::load(type, local_input)
+ return types[ext] || ext
+ end
+ def _pandoc
+ if @pandoc.nil?
+ @pandoc = Pandoc::load(local_intype, local_input)
if @pandoc['pandoc_format']
@pandoc = Pandoc::load(@pandoc['pandoc_format'], local_input)