summaryrefslogtreecommitdiff
path: root/TODO.org
blob: f4b500491cff797e48f4c46d2f0860f477587ff0 (plain)
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
* To-do list
** Output XHTML5?
<cbaines> there's still code in the data service that was copied from Mumi
<cbaines> e.g. sxml->html should live somewhere else and be shared  [10:34]
<andreas-e> Is this not already part of some library? It is needed by haunt if
            I remember well.  [10:36]
<andreas-e> Well, haunt defines a function with the same name.
<cbaines> I don't know, but if you find a place, please let me know!
<dthompson> I think I wrote one for haunt that handles some of the special
            html tags  [10:37]
<andreas-e> In haunt, html.scm. But the full module has only 130 lines.
<dthompson> it's mostly the usual sxml->xml process but some html tags aren't
            self-closing if they don't have any child nodes  [10:38]
<mirai> why not simply output XHTML5? :-)  [10:41]
<mirai> you get to use modern HTML and its valid XML
<dthompson> I guess because I didn't know about it :)  [10:43]
** DONE bug: Atom feed "summary" should be "content"
haunt/builder/atom.scm line 157
https://validator.w3.org/feed/docs/atom.html#recommendedEntryElements
** Allow for cache-busting assets
Providing the option to incorporate a hash of CSS, JS, etc. assets
into the URLs for those assets would be nice to ensure browser cache
misses when updates occur.  Using the query string for this would keep
the URL paths the same but the overall URL different.
** Allow #:prefix arg for 'blog' to be a procedure
In addition to a string. Will allow for custom placement of blog
posts. Some people want a hierarchy based on date, for example.
** Add blog theme example to manual
** DONE Remove website directory
That is no longer used for the actual website
** DONE Add docs for artifacts
** Allow collection pages to live in a different directory than posts.
** Feature request: Auto-reload pages when --watch detects changes
** External command processing
Hacky experimentation:
#+BEGIN_SRC scheme
  (use-modules (ice-9 match))

  (call-with-output-file "bloop.txt"
    (lambda (port)
      (match (primitive-fork)
        (0
         (close 1)
         (dup2 (fileno port) 1)
         (execlp "grep" "-e" "cat" "animals"))
        (pid
         (waitpid pid)))))

  (define (gcc c-file o-file)
    (list "gcc" "-o" o-file c-file))

  (define (external-artifact source destination command)
    (unless (file-exists? source)
      (error "input file does not exist" source))
    (make-artifact destination
                   (lambda (output)
                     (let ((command* (append command (list source))))
                       (format #t "run '~a' → '~a'~%"
                               (string-join command* " ")
                               destination)
                       (call-with-output-file output
                         (lambda (port)
                           ;; Run the command in a new process with
                           ;; stdout redirected into the output file.
                           (match (primitive-fork)
                             (0
                              (close 1)
                              (dup2 (fileno port) 1)
                              (apply execlp command*))
                             (pid
                              (match (waitpid pid)
                                ((_ . status)
                                 (unless (zero? (status:exit-val status))
                                   (error "command failed" command*))))))))))))

#+END_SRC
** Org-mode support
Just shell out to emacs using batch mode!