CsvToMarkdown Wyam.Tables

Converts CSV content to Markdown tables.
This module reads the content of each input document as CSV and outputs an Markdown table containing the CSV content. The input CSV content must use , as separator and enclose every value in ". The output table has the format
+--------------+-------------+
| Test value 1 | TestValue 2 |
+--------------+-------------+
| Test value 2 | TestValue 3 |
+--------------+-------------+

Package

This module exists in the Wyam.Tables package which is not part of the core distribution. Add the following preprocessor directive to your configuration file to use it:
#n Wyam.Tables

Usage

  • CsvToMarkdown()

Fluent Methods

Chain these methods together after the constructor to modify behavior.

  • WithHeader()

    Treats the first line of input content as a header and generates <th> tags in the output table.

GitHub