joachimneu / pelican-md-metayaml

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pelican-md-metayaml

This Pelican plugin adds a reader for Markdown files with YAML metadata. As the well-known static site generator Jekyll uses Markdown files with YAML metadata, this eases migration from Jekyll to Pelican. Also, YAML metadata allows for easier specification of more complex metadata, such as nested lists or dictionaries.

Dependencies

(to be installed via pip)

Installation

Clone this repo (and its submodules) into a pelican-md-metayaml directory inside the plugins directory of your Pelican project (or whatever directory you specified for plugins in Pelican's PLUGIN_PATHS setting) and add 'pelican-md-metayaml' to the list of plugins (Pelican setting PLUGINS) of your project. Or just use it as part of pelican-plugins.

To make sure the submodule is included, use git clone --recursive [repo] [path]. Alternatively, clone without --recursive, then run git submodule update --init to checkout the submodule.

Usage

All your Markdown files (ending in .md, .markdown, .mkd and .mdown) will now be interpreted as using YAML for their metadata.

The following example shows a very simple article (only one line of text at the bottom) but with quite complex metadata (everything between the ---):

---
title: Some title
author: Some person
tags:
  - tag 1
  - tag 2
date: 2014-12-25 00:00
data:
  - name: some name
    options:
       - opt 1
       - opt 2
       - opt 3
    steps:
     - Step 1
     - Step 2
     - Step 3
---

This is the only text in the article.

About


Languages

Language:Python 100.0%