controllers/blog: make title separated out from the rest of the content

This commit is contained in:
Christine Dodrill 2015-02-16 13:23:55 -08:00
parent 60f6520307
commit d92feaf870
1 changed files with 4 additions and 0 deletions

View File

@ -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"