Show blog posts

This commit is contained in:
Christine Dodrill 2015-02-13 12:48:30 -08:00
parent a63f68504a
commit dcf5110130
2 changed files with 8 additions and 3 deletions

View File

@ -1,10 +1,7 @@
discount = require "discount" discount = require "discount"
lapis = require "lapis" lapis = require "lapis"
file = require "pl.file"
http = require "lapis.nginx.http"
oleg = require "lib/oleg" oleg = require "lib/oleg"
util = require "lapis.util" util = require "lapis.util"
dir = require "pl.dir"
import render_html from require "lapis.html" import render_html from require "lapis.html"
split = require "util" split = require "util"
@ -28,4 +25,7 @@ class Blog extends lapis.Application
discount data, "toc", "nopants", "autolink" discount data, "toc", "nopants", "autolink"
with io.open "blog/#{@name}.markdown", "r"
@title = \read "*l"
render: true render: true

5
views/blog/post.moon Normal file
View File

@ -0,0 +1,5 @@
import Widget from require "lapis.html"
class Post extends Widget
content: =>
raw @doc