Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
New METADATA_FORMAT option
  • Loading branch information
Roberto Alsina committed Jun 5, 2017
1 parent c9e4caa commit 61b50a1
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
9 changes: 9 additions & 0 deletions CHANGES.txt
@@ -1,3 +1,12 @@
New in master
=============

Features
--------

* New METADATA_FORMAT option to choose preferred metadata format
(Nikola/YAML/TOML/Pelican) (Part of Issue #2801)

New in v7.8.7
=============

Expand Down
8 changes: 8 additions & 0 deletions docs/manual.txt
Expand Up @@ -421,6 +421,14 @@ other static site generators. The currently supported metadata formats are:

You can add arbitrary meta fields in any format.

When you create new posts, by default the metadata will be created as reST style comments.
If you prefer a different format, you can set the ``METADATA_FORMAT`` to one of these values:

* ``"Nikola"``: reSt comments wrapped in a comment if needed (default)
* ``"YAML"``: YAML wrapped in "---"
* ``"TOML"``: TOML wrapped in "+++"
* ``"Pelican"``: Native markdown metadata or reSt docinfo fields. Nikola style for other formats.

reST-style comments
```````````````````

Expand Down
7 changes: 7 additions & 0 deletions nikola/conf.py.in
Expand Up @@ -206,6 +206,13 @@ COMPILERS = ${COMPILERS}
# Set to False for two-file posts, with separate metadata.
# ONE_FILE_POSTS = True

# Preferred metadata format for new posts
# "Nikola": reSt comments wrapped in a comment if needed (default)
# "YAML": YAML wrapped in "---"
# "TOML": TOML wrapped in "+++"
# "Pelican": Native markdown metadata or reSt docinfo fields. Nikola style for other formats.
# METADATA_FORMAT = "Nikola"

# Use date-based path when creating posts?
# Can be enabled on a per-post basis with `nikola new_post -d`.
# The setting is ignored when creating pages (`-d` still works).
Expand Down

0 comments on commit 61b50a1

Please sign in to comment.