This commit is contained in:
Catalin Constantin Mititiuc 2025-05-24 13:18:30 -07:00
parent 0baf9a4f67
commit 14b6054946
4 changed files with 1 additions and 75 deletions

View File

@ -3,7 +3,6 @@ FROM openresty/openresty:1.27.1.2-0-bookworm-buildpack
WORKDIR /opt/app WORKDIR /opt/app
RUN apt-get update && apt-get install -y python3-pygments pandoc lua-inotify RUN apt-get update && apt-get install -y python3-pygments pandoc lua-inotify
RUN opm get DevonStrawn/lua-resty-route
RUN luarocks install sitegen RUN luarocks install sitegen
RUN luarocks install inotify INOTIFY_INCDIR=/usr/include/x86_64-linux-gnu/ RUN luarocks install inotify INOTIFY_INCDIR=/usr/include/x86_64-linux-gnu/

View File

@ -1,5 +0,0 @@
$some[[<p>$one and then $two</p> ]]
$if{ true, target = 'World' }[[ Hello $target! ]], [[ Hi $target! ]]
$each{ { thing = "bye" }, { thing = "hello" } }[[$thing]]

View File

@ -1,69 +0,0 @@
-- =========================================================================
-- capture output of a system command
-- =========================================================================
-- handle = io.popen "ls"
-- result = handle\read("*a")
-- print result
-- handle\close!
-- =========================================================================
-- how changing the config in the Site class works
-- =========================================================================
-- f = class Site, config: { "one" } -- simulate `f = require "sitegen.site"`
-- f.config = { "two" }
-- simulate `n = require "sitegen.site"`
-- n = f -- because it has already been required, it returns the existing `f`
-- n!
-- { v } = n.config
-- print v
-- =========================================================================
-- markdown link pseudo-protocols
-- =========================================================================
-- [what-is-this](class:asdf)
--
-- [reference link][blah]
--
-- [blah]: <https://example.com> "titlehere"
--
-- [App Platform](id:doesthiswork><https://example.com>)
--
-- > %class-one%
-- >
-- > Lorem ipsum...
--
-- [postoffice](class:caps "asdf")
--
-- [postoffice][caps]
--
-- [caps]: class:caps 'ALL UPPER CASE, ALL THE TIME'
-- md = require "sitegen.renderers.markdown"
-- require("moon").p md
-- file = "docs/2023-08-03-recursively-list-all-files-in-a-directory-with-elixir.md"
--
-- Path = require "sitegen.path"
-- result = Path.join("/two", "one")
--
-- require("moon").p result
-- some_instance_method = (...) => @@ ...
--
-- blah = => @@var1
--
-- class Blah
-- @var1: "var1"
-- @var2 = "var2"
-- var3: "var3"
-- var4 = "var4"
--
-- meth1: =>
-- -- @var1
-- blah!
--
-- b = Blah!
-- -- require("moon").p Blah.meth1!
-- require("moon").p b\meth1!

View File

@ -16,6 +16,7 @@ Site.config.out_dir = "html/"
-- Configure the command our custom renderer uses to convert markdown to html -- Configure the command our custom renderer uses to convert markdown to html
rend = "renderers.markdown" rend = "renderers.markdown"
require(rend).cmd = "pandoc --mathjax >" require(rend).cmd = "pandoc --mathjax >"
-- require(rend).cmd = "pandoc --mathjax -f json >"
-- Insert custom renderer in the first position so it will be preferred -- Insert custom renderer in the first position so it will be preferred
table.insert Site.default_renderers, 1, rend table.insert Site.default_renderers, 1, rend