Pollen是一款基于Racket的文档编写工具。
作者创作它的目的是为了撰写在线书籍。Pollen的特点是以编写程序的方式来编写书籍。
安装:raco pkg install pollen
。raco pollen test
可以用来测试安装是否完整。
给定一个Pollen源文件,比如hello.txt.pp
,可以通过raco pollen render hello.txt.pp
编译成hello.txt
。
可以通过raco pollen start
启动一个web服务。在http://localhost:8080/index.ptree
可以看到控制盘。
markdown的话,对应的pollen文件后缀名是.pmd
。
markup的话,对应的pollen文件名后缀是.pm
。
Pollen的模板文件默认命名为"template.[output extension of source]"
。
一些链接
- https://jamstack.org/generators/pollen/
- https://github.com/mbutterick/pollen
- https://github.com/racket/racket/issues/4306
- 如果遇到
raco pkg install ssl requested protocol not supported error #4306
, 在Ubuntu上安装libssl-dev
解决
- 如果遇到
- https://github.com/mbutterick/pollen/issues/35
Feature request: server auto-refreshes page when save detected #35
问题没有解决,会影响实际使用体验。
(未完待续)