哑静态站点生成器。
notes-p的Python项目详细描述
notes py是一个dumb静态站点生成器。我用它来编译notes(duh),我在安装软件包、服务器或w/e时会用到html,这样我就可以用apache来服务它们,并从任何可以访问internet的机器上查看它们。
基本上,它使用https://github.com/rtfd/CommonMark-py从标记文件编译html(基本上就像其他静态站点生成器一样)。
安装
由于notes py是自包含的(在notes py/notes.py中),您只需下载并安装这个文件到您路径中的某个位置即可使用它。它也可以在pypi上使用,所以您应该也可以用pip install notes-py安装它。
如果与pip一起安装,它还将在compile_notes上安装一个入口点,该入口点可以有效地作为指向notes_py.notes的链接。
用法
notes py提供了命令行和编程接口。
命令行
要使命令行选项保持简单,只需指定配置文件的位置:
usage: compile_notes [-c path_to_config] [options] Options: -h, --help : Print this help text -c, --config : Specipy the path to a configuration file -V, --version : Print version and licence info
编程
通过位于notes_py.notes.compile(content_path, compile_path, stylesheet, html_template)的函数可以获得完整的功能性(并不多)。如果您是以编程方式使用notes py,那么您应该通读该函数以了解它的作用。