From bcac6e80b9e22cf6140e6ceba6fe1f977832c5b9 Mon Sep 17 00:00:00 2001 From: Justin Mayer Date: Sat, 21 Sep 2019 12:19:43 -0700 Subject: [PATCH 1/2] Improve content metadata field docs. Fixes #2347 --- docs/content.rst | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/docs/content.rst b/docs/content.rst index f0022c35..bff30e1d 100644 --- a/docs/content.rst +++ b/docs/content.rst @@ -71,22 +71,31 @@ Metadata syntax for Markdown posts should follow this pattern:: This is the content of my super blog post. You can also have your own metadata keys (so long as they don't conflict with -reserved metadata keywords) for use in your python templates. The following is +reserved metadata keywords) for use in your templates. Following is the list of reserved metadata keywords: -* `Title` -* `Tags` -* `Date` -* `Modified` -* `Status` -* `Category` -* `Author` -* `Authors` -* `Slug` -* `Summary` -* `Template` -* `Save_as` -* `Url` +================= ================ ============================================ +reStructuredText Markdown Description +================= ================ ============================================ +``:title:`` ``Title:`` Title of the article or page +``:date:`` ``Date:`` Publication date (``YYYY-MM-DD HH:SS``) +``:modified:`` ``Modified:`` Modification date (``YYYY-MM-DD HH:SS``) +``:tags:`` ``Tags:`` Content tags, separated by commas +``:keywords:`` ``Keywords:`` Content keywords, separated by commas +``:category:`` ``Category:`` Content category (one only — not multiple) +``:slug:`` ``Slug:`` Identifier used in URLs and translations +``:author:`` ``Author:`` Content author, when there is only one +``:authors:`` ``Authors:`` Content authors, when there are multiple +``:summary:`` ``Summary:`` Brief description of content for index pages +``:lang:`` ``Lang:`` Content language ID (``en``, ``fr``, etc.) +``:translation:`` ``Translation:`` Is article is a translation of another + (``true`` or ``false``) +``:status:`` ``Status:`` Content status: + ``draft``, ``hidden``, or ``published`` +``:template:`` ``Template:`` Name of template to use to generate content +``:save_us:`` ``Save_us:`` Save content to this relative file path +``:url:`` ``Url:`` URL to use for this article/page +================= ================ ============================================ Readers for additional formats (such as AsciiDoc_) are available via plugins. Refer to `pelican-plugins`_ repository for those. From f0617a53dc253432077fe3acbcd8d8bd87f636ab Mon Sep 17 00:00:00 2001 From: Justin Mayer Date: Wed, 16 Oct 2019 15:52:50 -0700 Subject: [PATCH 2/2] Follow-up changes to metadata field docs --- docs/content.rst | 46 ++++++++++++++++++++++------------------------ 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/docs/content.rst b/docs/content.rst index bff30e1d..2ca4a347 100644 --- a/docs/content.rst +++ b/docs/content.rst @@ -71,31 +71,29 @@ Metadata syntax for Markdown posts should follow this pattern:: This is the content of my super blog post. You can also have your own metadata keys (so long as they don't conflict with -reserved metadata keywords) for use in your templates. Following is -the list of reserved metadata keywords: +reserved metadata keywords) for use in your templates. The following table +contains a list of reserved metadata keywords: -================= ================ ============================================ -reStructuredText Markdown Description -================= ================ ============================================ -``:title:`` ``Title:`` Title of the article or page -``:date:`` ``Date:`` Publication date (``YYYY-MM-DD HH:SS``) -``:modified:`` ``Modified:`` Modification date (``YYYY-MM-DD HH:SS``) -``:tags:`` ``Tags:`` Content tags, separated by commas -``:keywords:`` ``Keywords:`` Content keywords, separated by commas -``:category:`` ``Category:`` Content category (one only — not multiple) -``:slug:`` ``Slug:`` Identifier used in URLs and translations -``:author:`` ``Author:`` Content author, when there is only one -``:authors:`` ``Authors:`` Content authors, when there are multiple -``:summary:`` ``Summary:`` Brief description of content for index pages -``:lang:`` ``Lang:`` Content language ID (``en``, ``fr``, etc.) -``:translation:`` ``Translation:`` Is article is a translation of another - (``true`` or ``false``) -``:status:`` ``Status:`` Content status: - ``draft``, ``hidden``, or ``published`` -``:template:`` ``Template:`` Name of template to use to generate content -``:save_us:`` ``Save_us:`` Save content to this relative file path -``:url:`` ``Url:`` URL to use for this article/page -================= ================ ============================================ +=============== =============================================================== + Metadata Description +=============== =============================================================== +``title`` Title of the article or page +``date`` Publication date (e.g., ``YYYY-MM-DD HH:SS``) +``modified`` Modification date (e.g., ``YYYY-MM-DD HH:SS``) +``tags`` Content tags, separated by commas +``keywords`` Content keywords, separated by commas (HTML content only) +``category`` Content category (one only — not multiple) +``slug`` Identifier used in URLs and translations +``author`` Content author, when there is only one +``authors`` Content authors, when there are multiple +``summary`` Brief description of content for index pages +``lang`` Content language ID (``en``, ``fr``, etc.) +``translation`` Is content is a translation of another (``true`` or ``false``) +``status`` Content status: ``draft``, ``hidden``, or ``published`` +``template`` Name of template to use to generate content (without extension) +``save_as`` Save content to this relative file path +``url`` URL to use for this article/page +=============== =============================================================== Readers for additional formats (such as AsciiDoc_) are available via plugins. Refer to `pelican-plugins`_ repository for those.