punct
punct copied to clipboard
⏺✍️ Write in Lisp + Markdown, publish to multiple formats
Punct
Punct is a rudimentary, extensible programming environment for publishing things, implemented in Racket. It is also derivative, idiosyncratic, and extremely unfinished.
Punct’s two basic ideas are:
-
Markdown (CommonMark) documents, extensible with Racket code.
-
Multiple output formats. If all you want is HTML, Punct will be more work for you; if you want to publish (say) a book and a website from the same source and with a high degree of control, Punct will make more sense.
See the dev notes on my website for rationale, features, etc. There are no other docs (yet), other than code comments.
Installation and Use
Clone the repository, and from within the punct/
directory, do raco pkg install --link punct-lib/
(note the trailing slash).
Once this is done, try it out using #lang punct
at the top of your Racket files. Running a Punct
program directly will print out its AST.
Road Map
- [X] Finish the HTML renderer
- [ ] Add markup/functions
- [ ] Benchmarks, caching, other optimizations
- [ ] Scribble documentation
Example syntax
#lang punct "my-additional-tags.rkt"
---
title: Prepare to be amazed
date: 2020-05-07
---
This is a paragraph. **Bold text**, etc. — you know the Markdown drill.
The `my-additional-tags.rkt` above is an example of an optional module path
that will be `require`d into the current document for additional tag functions.
> Famous quotation.
>
> •attrib{Surly Buster, [_Fight to Win_][ftw] (2008)}
The above is an example of a Markdown blockquote containing a tag function which
in turn contains Markdown.
•note[#:date "2020-05-07" #:by "A Reader" #:bylink "[email protected]"]{
This is a note added to the document[^1].
•poem[#:title "Institutions"]{
‘Ləh’
}
[^1]: It can contain its own footnotes and link references.
}
[ftw]: https://surly.guy/fight-to-win/ 'Book website'