---
title: 'Markdown Examples'
url: 'http://tales.01space.net/docs/grav%20documentation/some%20markdown%20examples'
markdown: 'http://tales.01space.net/docs/grav%20documentation/some%20markdown%20examples.md'
date: '2026-10-27'
description: 'Author: lgn Contact: lars-g.nilsson@01space.net Markdown examples Syntax highlighting GFM, or "GitHub Flavored Markdown" also supports syntax highlighting. To activate it, simply add the file extension of the language you want to use directly after the first code "fence", ```js, and synta…'
taxonomy:
  category:
    - document
    - markdown
  tag:
    - demo
    - example
  archives_month:
    - oct_2026
  archives_year:
    - '2026'
---

# Markdown Examples

#### Author: lgn

Contact: lars-g.nilsson@01space.net

## Markdown examples

### Syntax highlighting

GFM, or "GitHub Flavored Markdown" also supports syntax highlighting. To activate it, simply add the file extension of the language you want to use directly after the first code "fence", ```js, and syntax highlighting will automatically be applied in the rendered HTML. For example, to apply syntax highlighting to JavaScript code:

```js
grunt.initConfig({
  assemble: {
    options: {
      assets: 'docs/assets',
      data: 'src/data/*.{json,yml}',
      helpers: 'src/custom-helpers.js',
      partials: ['src/partials/**/*.{hbs,md}']
    },
    pages: {
      options: {
        layout: 'default.hbs'
      },
      files: {
        './': ['src/templates/pages/index.hbs']
      }
    }
  }
};
```

### Tables

Tables are created by adding pipes as dividers between each cell, and by adding a line of dashes (also separated by bars) beneath the header. Note that the pipes do not need to be vertically aligned. MARKDOWN

| Option | Description |
|---|---|
| data | path to data files to supply the data that will be passed into templates. |
| engine | engine to be used for processing templates. Handlebars is the default. |
| ext | extension to be used for dest files. |

#### Right aligned text

Adding a colon on the right side of the dashes below any heading will right align text for that column. MARKDOWN

| Option | Description |
|---|---|
| data | path to data files to supply the data that will be passed into templates. |
| engine | engine to be used for processing templates. Handlebars is the default. |
| ext | extension to be used for dest files. |

### Enhanced Tables

Grav 2.0 adds five opt-in table extensions. They are all off by default, so a standard table is never changed unless you turn one on — globally under Configuration, or per page in the page's front mattet. See front matter above

#### Colspan

Leave a cell empty and it merges into the cell on its left, increasing that cell's colspan (the MultiMarkdown convention). MARKDOWN

| Item | Jan | Feb | Mar |
|---|---|---|---|
| Widgets | 10 | 12 | 9 |
| Total for the quarter | 57 |

#### Header-less

Start a table directly at the divider row to produce a

| Mercury | Closest to the Sun |
|---|---|
| Neptune | Furthest from the Sun |

#### Captions

A \[Caption\] line immediately after a table becomes a

---

## Navigation

- Parent: [Grav documentation](http://tales.01space.net/docs/grav%20documentation.md)
- Previous: [Page Linking Examples](http://tales.01space.net/docs/grav%20documentation/page%20linking%20examples.md)
- Next: [Typography](http://tales.01space.net/docs/grav%20documentation/typography.md)
