Jade - A Python library for rendering markdown to HTML for Flask.
Project description
Jade
Jade is a markdown renderer for Flask applications.
Initialise a new Jade project after installing with python -m jade init
. This will create a simple Flask site with a home page, and a small blog, as an example of how to use the framework.
To get started, try editing the content/home.md
file.
At the top of this file, you will see some frontmatter
. This is yaml
formatted content that is passed to the builder, and the template.
While not required, the following frontmatter
is recommended for each of your pages.
permalink
- Where on the site you want the page to register. Defaults to the file's path within thecontent
directory, without the file extension.template
- the name of the template in yourtemplates
directory to render the content into. Defaults todefault
.
Reserved names
-
page
- You can access the page frontmatter in your templates through thepage
variable. For example, the title for this page would be accessed withpage.title
. -
pages
- Thepages
variable contains all subdirectories of thecontent
directory. This can be useful for things such as rendering a blog home page, with a link to each post in a directory. Note that nested directories are not currently supported. -
site
- You can also access site parameters, such as the site name through thesite
variable in all of your templates. Any parameters that you need globally should be added to the.jade-config.yaml
file, under the site key. Try updating thename
key undersite
in the config file.
Contribution
Install development requirements with pip install -r requirements-dev.txt
, then install pre-commit
with pre-commit install
. Ensure all nox
tests are passing before creating a pull request.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.