有观点的简单静态站点生成器
项目描述
corvid
corvid是一个有观点的简单静态站点生成器。
它处理Markdown文件、静态资源和目录,生成编译内容的1:1层次结构。
它包括可重载的本地开发服务器,支持自定义Markdown前端和Jinja模板。
安装
$ pip install corvid
运行
默认情况下,corvid期望在包含input
目录的目录中运行。如果没有参数,corvid将处理此目录中的所有文件到output
目录,然后退出。
$ corvid --help
Usage: corvid [OPTIONS]
Options:
-l, --listen Enable live reloading
-b, --bind TEXT Host to bind to
-p, --port INTEGER Port to run on
-i, --input TEXT Input directory
-o, --output TEXT Output directory
-t, --templates TEXT Templates directory
--help Show this message and exit.
示例
给定以下目录结构
├── input
│ └── index.md
└── templates
└── default.html
以下文件内容
input/index.md
---
title: This is the Index
---
Welcome
templates/default.html
<html>
<head>
<title>{{ title }}</title>
<body>
{{ content }}
</body>
</body>
运行corvid
将产生额外的output
目录
.
├── input
│ └── index.md
├── output
│ └── index.html
└── templates
└── default.html
文件内容如下
output/index.html
<html>
<head>
<title>This is the Index</title>
<head>
<body>
<p>Welcome</p>
</body>
</body>
使用模板
可以通过指定templates
目录中模板的路径作为template
前端来设置自定义模板。
请参阅/example
以获取完整示例。
项目详情
下载文件
下载适用于您的平台的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。
源分发
corvid-1.1.0.tar.gz (4.4 kB 查看哈希值)
构建发行版
corvid-1.1.0-py3-none-any.whl (9.9 kB 查看哈希值)
关闭
corvid-1.1.0.tar.gz的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | ba447e51a9e2a6fa749cdc5910a79b14698a74848d442bc311fef5ecfc31e290 |
|
MD5 | 35a8a49801a6c222728c349f55903d8f |
|
BLAKE2b-256 | 9793f5c786409e533ded5b0ae4fc1414aeb5590a95a256bb8a7568c2c95715e3 |
关闭
corvid-1.1.0-py3-none-any.whl的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | df7705a1ef74cace7468bc0ed2095d1b6425a1ae830de016e16e5a26c9a28ed8 |
|
MD5 | f12714751d457f1fee30911aecb8e599 |
|
BLAKE2b-256 | 8cac63e80e1c7a4b5ec2c536965955606e91d1d99379f6411f7c4c5655700eda |