controllers/blog: make title separated out from the rest of the content
This commit is contained in:
parent
60f6520307
commit
d92feaf870
|
@ -1,5 +1,6 @@
|
||||||
discount = require "discount"
|
discount = require "discount"
|
||||||
lapis = require "lapis"
|
lapis = require "lapis"
|
||||||
|
file = require "pl.file"
|
||||||
oleg = require "lib/oleg"
|
oleg = require "lib/oleg"
|
||||||
util = require "lapis.util"
|
util = require "lapis.util"
|
||||||
|
|
||||||
|
@ -21,6 +22,9 @@ class Blog extends lapis.Application
|
||||||
@doc = oleg.cache "blogposts", @name, ->
|
@doc = oleg.cache "blogposts", @name, ->
|
||||||
local data
|
local data
|
||||||
with io.open "blog/#{@name}.markdown", "r"
|
with io.open "blog/#{@name}.markdown", "r"
|
||||||
|
\read "*l"
|
||||||
|
\read "*l"
|
||||||
|
\read "*l"
|
||||||
data = \read "*a"
|
data = \read "*a"
|
||||||
|
|
||||||
discount data, "toc", "nopants", "autolink"
|
discount data, "toc", "nopants", "autolink"
|
||||||
|
|
Loading…
Reference in New Issue