16

I just saw a video on Markdown which uses a percent sign (%) to add a title and author to a document. Here is the video clip (strating from the relevant section): https://youtu.be/hpAJMSS8pvs?t=5m30s

I have not been able to reproduce this feature, though (I've tried in different markdown editors -- like StackEdit).

Is this a different version of Markdown? Do I just need a different editor?

In short, any idea how to do this?

Thanks.

Moshe
  • 551
  • 3
  • 7
  • 17
  • 1
    Possible duplicate of [Markdown metadata format](https://stackoverflow.com/questions/44215896/markdown-metadata-format) – Waylan Nov 10 '17 at 17:25

2 Answers2

21

Yes, some markdown engines support this using metadata blocks.

The following is called yaml_metadata_block by pandoc (this format is supported by Jekyll, StackEdit and quite a few others):

---
title: my title
author: my name
date: today
---

or equivalently:

---
title: my title
author: my name
date: today
...

Pandoc also supports the pandoc_title_block format:

% title
% author(s) (separated by semicolons)
% date
mb21
  • 34,845
  • 8
  • 116
  • 142
  • I favour the `Yaml` block notation to the `pandoc` notation as you see in each line where you are (e.g. `title: ...` and not just `% super titlename`) – Timo Jul 14 '20 at 06:04
1

There is no such standard syntax for Title or Author. But you can always mention them below your first Heading.

I prefer in this way

HEADING - I


Title - Documentation
Author - Saumitra Jagdale
Created On - 2 October 2020