Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Lists in markdown table (with Jekyll)

I'm writing document with Jekyll/Markdown and its engine is kramdown.
And now I'm wondering the way to write lists in table built by markdown.

I tried following.

|Name   |Columns             |
|-------|--------------------|
|PRIMARY|<ul><li>id</li></ul>|

In GitHub's Gist, it's rendered as I thought.

But in Jekyll (my local one or GitHub Pages' one), it's not.
http://yuya-takeyama.github.io/2011/10/08/hello-github-pages.html

Is there any way to write lists in table in Jekyll?
I'll replace markdown engine if it's required.

like image 231
Yuya Takeyama Avatar asked Nov 10 '14 13:11

Yuya Takeyama


People also ask

Does Jekyll support Markdown?

Jekyll supports Markdown in addition to HTML when building pages. Markdown is a great choice for pages with a simple content structure (just paragraphs, headings and images), as it's less verbose than raw HTML.

Can you do tables in Markdown?

To add a table, use three or more hyphens ( --- ) to create each column's header, and use pipes ( | ) to separate each column. For compatibility, you should also add a pipe on either end of the row. Cell widths can vary, as shown below. The rendered output will look the same.

How do you show a table in Markdown?

A table is an arrangement of data in rows and columns. To add a table in Markdown, use the vertical line | to separate each column, and use three or more dahses --- to create each column's header. A vertical line should also be added at either end of the row.


1 Answers

nomarkdown tag helps:

|Name   |Columns                               |
|-------|--------------------------------------|
|PRIMARY|{::nomarkdown}<ul><li>id</li></ul>{:/}|

Jekyll rendered table

The solution works with both kramdown and redcarpet.

like image 54
user2291296 Avatar answered Sep 19 '22 07:09

user2291296