Go to file
2019-04-18 23:14:55 +03:00
markdown_metayaml@60d290e24f Use own submodule copy 2019-04-18 23:14:55 +03:00
__init__.py Major refactor, bordering on rewrite 2015-02-18 12:33:19 -05:00
.gitignore Remove cruft from .gitignore 2015-02-18 12:33:01 -05:00
.gitmodules Use own submodule copy 2019-04-18 23:14:55 +03:00
md_metayaml.py Fixes #10 - extension issue with newer Pelican version 2017-06-08 14:37:24 +08:00
README.md Updated README.md 2015-09-26 02:35:09 +02:00

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.