~subsetpark/bagatto

2521a3c63024bb9957d74bfcf7e60f8b9bc87c85 — Zach Smith 3 months ago e57261b
Add mago
3 files changed, 17 insertions(+), 7 deletions(-)

M bagatto.janet
M lockfile.jdn
M project.janet
M bagatto.janet => bagatto.janet +8 -0
@@ 4,6 4,7 @@
(import path)
(import jdn)
(import json)
(import mago)

(import /src/multimarkdown)



@@ 165,6 166,13 @@
  [src attrs]
  (merge-into attrs (json-data src)))

(defn parse-mago
  "Attribute parser for Mago."
  [src attrs]
  (let [{:front front :body body} (mago/parse src)]
    (put attrs :body body)
    (merge-into attrs front)))

#
# SITE
#

M lockfile.jdn => lockfile.jdn +7 -6
@@ 1,9 1,10 @@
@[{:sha "2268b81004bb9b58e8b263584c86219dab8180ac" :repo "https://github.com/andrewchambers/janet-jdn.git"}
  {:sha "b06c5dc089304e6a8a9685e02721f8175e5eeb90" :repo "https://github.com/janet-lang/argparse.git"}
  {:sha "70ae525ad8ab0bf08ccb42e9544ac2bd2103df35" :repo "https://github.com/andrewchambers/janet-posix-spawn.git"}
@[{:sha "c0951f6978555268a24d86eee2f118327328b40b" :repo "https://github.com/andrewchambers/janet-jdn.git"}
  {:sha "51a147f9c667fa4b96c796f83c90b0478466feed" :repo "https://git.sr.ht/~subsetpark/mago"}
  {:sha "5d1bea51664cf2f076ce6ac4786c2fb744f2c02c" :repo "https://github.com/janet-lang/argparse.git"}
  {:sha "5a3689c250a207186bcb1a30f131d71e45b8cea6" :repo "https://github.com/andrewchambers/janet-posix-spawn.git"}
  {:sha "ed7e83e8779e2a54e23bbbcc75366ade2dd5372a" :repo "https://git.sr.ht/~bakpakin/temple"}
  {:sha "ca257dd40159cf25bc49869386208df630b88336" :repo "https://github.com/pyrmont/testament"}
  {:sha "b6dd2f3dcfebd26b027234a84029ee099b83b1f0" :repo "https://github.com/janet-lang/path.git"}
  {:sha "12e2e338cba69b02f284d8082804d8e811436651" :repo "https://github.com/pyrmont/testament"}
  {:sha "fd552e880cb3510f10a230ea5f9dcc227fcb521f" :repo "https://github.com/janet-lang/path.git"}
  {:sha "61437d96b5df6eb7e524f88847e7d7521201662d" :repo "https://github.com/janet-lang/json.git"}
  {:sha "4226a4cae548fde38358aa1fdb6d6a90bf5fe175" :repo "https://github.com/andrewchambers/janet-sh.git"}
  {:sha "cbe7ad80137b1e8711b24b61b4be4a79dc116958" :repo "https://github.com/pyrmont/markable"}]
  {:sha "077ec6b7618d4e775e59705b28806c865ba67238" :repo "https://github.com/pyrmont/markable"}]

M project.janet => project.janet +2 -1
@@ 8,7 8,8 @@
                 "https://github.com/andrewchambers/janet-jdn.git"
                 "https://github.com/janet-lang/json.git"
                 "https://github.com/janet-lang/argparse.git"
                 "https://github.com/pyrmont/testament"])
                 "https://github.com/pyrmont/testament"
                 "https://git.sr.ht/~subsetpark/mago"])

(def *static-build* (= (or (os/getenv "BAG_STATIC_BUILD") "0") "1"))