Update moonscript header pattern
This commit is contained in:
parent
014a3fd49f
commit
f7e5e8e7d7
@ -1,12 +1,12 @@
|
||||
sitegen = require "sitegen"
|
||||
tools = require "sitegen.tools"
|
||||
site = require "sitegen.site"
|
||||
lfs = require "lfs"
|
||||
|
||||
date = require "date"
|
||||
path = require "sitegen.path"
|
||||
-- import slugify from "sitegen.common"
|
||||
|
||||
lfs = require "lfs"
|
||||
date = require "date"
|
||||
|
||||
-- Change output dir to what Openresty prefers
|
||||
site.config.out_dir = "html/"
|
||||
|
||||
@ -52,7 +52,7 @@ sitegen.create =>
|
||||
|
||||
-- replace yaml headers with moonscript headers
|
||||
filter "docs", (body) =>
|
||||
body\gsub "%-%-%-.-%.%.%.", (yaml_header) ->
|
||||
body\gsub "^%s*%-%-%-.-%.%.%.", (yaml_header) ->
|
||||
moonscript_header = yaml_header\gsub "%-%-%-", "{"
|
||||
result = moonscript_header\gsub "%.%.%.", "}"
|
||||
result
|
||||
|
Loading…
x
Reference in New Issue
Block a user