diff --git a/Dockerfile b/Dockerfile index 99959b4..9c93cd8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM openresty/openresty:1.27.1.2-0-bookworm-buildpack WORKDIR /opt/app -RUN apt-get update && apt-get install -y python3-pygments +RUN apt-get update && apt-get install -y python3-pygments pandoc RUN luarocks install sitegen CMD ["sh", "-c", "openresty -p `pwd` -g 'daemon off;'"] diff --git a/README.md b/README.md index fbd62a1..27f5242 100644 --- a/README.md +++ b/README.md @@ -53,8 +53,6 @@ ## todo -current problem: why does sitegen wrap every thing in
tags?
-
* treesitter highlighting for moonscript
* penlight library
* sitegen plugins
diff --git a/markdown.moon b/markdown.moon
index 975c531..531e3d5 100644
--- a/markdown.moon
+++ b/markdown.moon
@@ -76,39 +76,18 @@ class MarkdownRenderer extends require "sitegen.renderers.html"
ext: "html"
render: (page, md_source) =>
- discount = require "discount"
-
+ -- discount = require "discount"
md_source = page\pipe "renderer.markdown.pre_render", md_source
md_source, escapes = escape_cosmo md_source
- -- require("moon").p md_source
- --mathjax --output=../priv/static/posts/#{output_file}.html
- -- handle = io.popen "pandoc"
- -- handle\write "# hello"
- -- handle\flush!
- -- result = handle\read("*a")
- -- print result
- -- handle\close!
+ markup_filename = os.tmpname!
+ input_handle = io.popen "pandoc > #{markup_filename}", "w"
+ input_handle\write md_source
+ input_handle\close!
- -- require("moon").p result
-
- -- txt = "# hello"
- -- md = "<