44 lines
1.2 KiB
Plaintext
44 lines
1.2 KiB
Plaintext
-- =========================================================================
|
|
-- 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'
|