~subsetpark/bagatto

ref: b7cf335535bf8a5c1a474cabbd3736ed8e4a24f2 bagatto/repl.janet -rw-r--r-- 1020 bytes
b7cf3355 — Zach Smith Update lockfile 6 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
(import /src/core)
(import /src/threads)
(import /src/writers)

(defn eval-data
  ```
  Evaluate an object according to the Bagatto *site data specification*.

  Not necessary to define a module, but can be useful to debug your
  configuration from within the REPL.
  ```
  [data]
  (core/load-data data @{}))

(defn eval-site
  ```
  Evaluate an object according to the Bagatto *site generation specification*,
  given a site data object as context.

  Not necessary to define a module, but can be useful to debug your
  configuration from within the REPL.
  ```
  [site data]
  (core/produce-writer-specs site data @{}))

(defn write-site
  ```
  Given the output of a site generation specification, trigger the
  actual file generation.

  Not necessary to define a module, but can be useful to debug your
  configuration from within the REPL.
  ```
  [writer-specs output-dir]
  (-> writer-specs
      (threads/demand-pipeline writers/writer-init
                               (writers/handle-writes output-dir))))