How can one create a table on gitlab wiki?
It uses github flavored markdown, and this flavor of markdown support tables but I can't make the following example work:
Colons can be used to align columns.
| Tables | Are | Cool |
| ------------- |:-------------:| -----:|
| col 3 is | right-aligned | $1600 |
| col 2 is | centered | $12 |
| zebra stripes | are neat | $1 |
The outer pipes (|) are optional, and you don't need to make the raw Markdown line up prettily. You can also use inline Markdown.
Markdown | Less | Pretty
--- | --- | ---
*Still* | `renders` | **nicely**
1 | 2 | 3
Is there a trick to activate tables?
Tables. 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.
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 | .
Press CTRL + SHIFT + P. Select Markdown: Create Table of Contents.
Update: See GitLab 14.1 (July 2021)
Create tables and upload images in the Wiki Content Editor
Create tables and upload images in the Wiki Content Editor
We began improving your wiki editing experience in GitLab 14.0, when we introduced the MVC of a new WYSIWYG Markdown editor.
It supported the most common Markdown formatting options, but with some notable gaps.GitLab 14.1 continues to improve your editing experience for images and tables.
You can now upload images directly into the editor. You can also insert and edit tables, including copying and pasting content from popular spreadsheet applications to bring tables from other sources into your wiki.
See Documentation and Issue.
And:
See GitLab 14.3 (September 2021)
Edit a table’s structure visually in the new wiki editor
Edit a table’s structure visually in the new wiki editor
Editing a Markdown table that has 9 columns and 25 rows is one thing.
But adding a tenth column to that table in Markdown?
That involves very repetitive and error-prone edits to every row. One mistake or misplaced|
and the table fails to render.The new WYSIWYG Markdown editor in the wiki lets you quickly and easily insert a table using the button in the toolbar.
After selecting the initial number of rows and columns, however, dealing with the structure of the table can be more difficult.
In GitLab 14.3, you can now click on the caret icon in the top right corner of any selected cell to add or remove columns and rows, either before or after the selected cell.
Now, as your content scales, the complexity doesn’t follow suit.See Documentation and Issue.
See GitLab 14.5 (November 2021)
Tables in wikis support block-level elements
GitLab 14.1 introduced WYSIWYG editing for tables in the new wiki editor, but the types of content supported in table cells were limited by the underlying Markdown implementation: you couldn’t add block-level elements like lists, code blocks, or pull quotes inside a table.
Now, in GitLab 14.5, these block-level elements are fully supported inside table cells.
You can insert lists, code blocks, paragraphs, headings, and even nested tables inside a table cell, giving you more flexibility and freedom to format your content to meet your needs.
See Documentation and Issue.
Original answer: 2013:
It seems to be still the case, as described in Issue 3651 and issue 1238, even though Flavored Markdown is supported:
This wouldn't work:
| parameters | desc |
| :--------- | :------------------- |
| -w | --word | Parameter for Word |
So contributions are welcome on this specific bug.
However, AJNeufeld suggest (in 2016) in the comments:
You need to use the
|
entity code to get the vertical pipe between "-w
" and "--word
", so it appears as"-w | --word
" in the rendered table.
Ie, the full line should be:
| -w | --word | Parameter for Word |
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With