If you look at a React docs markdown file (which are used to generate the docs html pages), you'll see a table of values at the very top (in the .md
, not the .html
). If you look at the actual markdown syntax used to create the table, you'll see a non-standard table syntax:
---
id: hello-world
title: Hello World
permalink: docs/hello-world.html
prev: installation.html
next: introducing-jsx.html
redirect_from:
- "docs/index.html"
- "docs/getting-started.html"
- "docs/getting-started-ko-KR.html"
- "docs/getting-started-zh-CN.html"
---
All GitHub/markdown resources I can find suggest that tables are created like this:
From https://guides.github.com/features/mastering-markdown/
Tables
You can create tables by assembling a list of words and dividing them with hyphens
-
(for the first row), and then separating each column with a pipe|
:First Header | Second Header ------------ | ------------- Content from cell 1 | Content from cell 2 Content in the first column | Content in the second column
I've exhausted my Googling skills, and wondering if someone knows whether this is a documented feature, and where that documentation might be?
That's YAML front matter, which a lot of static site generators* allow as a means of adding metadata to a document. It's not actually part of Markdown itself - GitHub just provides nice styling for it because it's so commonly used.
As Waylan commented, it's worth noting that the front matter generally gets stripped out by the static site generator before the Markdown actually gets parsed - hence why it doesn't show up in the React documentation pages.
* including Jekyll, which is what React's docs and GitHub Pages use