Show blog posts
This commit is contained in:
parent
a63f68504a
commit
dcf5110130
|
@ -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
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
import Widget from require "lapis.html"
|
||||||
|
|
||||||
|
class Post extends Widget
|
||||||
|
content: =>
|
||||||
|
raw @doc
|
Loading…
Reference in New Issue