---
title: "Writing in Markdown"
description: "Front matter, formatting and components for articles synced from GitHub or imported as a Markdown file."
url: "https://www.contito.com/docs/writing-content/writing-in-markdown"
published: "2026-11-16T06:04:37.917Z"
modified: "2026-11-16T06:04:37.917Z"
---

# Writing in Markdown

Articles from a GitHub repository or an imported Markdown file are written in Markdown, a plain-text format where `**bold**` means **bold**.

Everything a Google Doc can do works here too, with tags in place of parentheses for components.

For a small, real example, see our demo repository: [github.com/kytokev/seo-playbook](https://github.com/kytokev/seo-playbook).

## Front matter

The article's details go in a block at the very top of the file, between two `---` lines:

```markdown
---
title: Keyword Research
description: Find the words your customers type into Google.
coverImage: ./images/cover.png
tags: [seo, keywords]
authors:
  - Ada Lovelace <ada@example.com>
---
```

| Field | Also accepted | What it sets |
| --- | --- | --- |
| `title` | none | The title, and the article's address |
| `description` | `summary`, `excerpt` | The short summary under the title and in search results |
| `coverImage` | `cover`, `image`, `thumbnail` | The image in listings and link previews |
| `tags` | `keywords` | Tags: a list, or names separated by commas |
| `authors` | `author` | Authors, one per entry. The email is optional |

- Without `title`, a single `#` heading at the top becomes the title, and after that the file name.
- Don't repeat the title as a `#` heading. A single top-level `#` heading is always removed from the article. Start sections at `##`.
- In a GitHub repository, `coverImage` can be a path inside the repo. For an imported file, use a full `https://` address.

See [Article Details](https://www.contito.com/content/article-details) for what each detail does on the site.

## Formatting

Standard GitHub Markdown works:

| Write | Get |
| --- | --- |
| `## Heading` to `###### Heading` | Headings. The highest level you use becomes the top level |
| `**bold**`, `*italic*`, `~~strikethrough~~` | **Bold**, *italic*, ~~strikethrough~~ |
| A word between backticks | Inline code |
| `[text](https://example.com)` | A link |
| `- item`, `1. item` | Lists. Indent an item to nest it |
| `> quote` | A blockquote |
| A table with a `---` line under the first row | A table. The first row is the header |
| `---` on its own line | A divider |
| `![alt text](image.png)` | An image |

Two formats need a small HTML tag:

| Write | Get |
| --- | --- |
| `<u>underlined</u>` | Underline |
| `<mark>highlighted</mark>` | Highlight |

Code goes in a fenced block: a line of three backticks with the language after them, the code, then a line of three backticks.

The language turns on syntax highlighting, and the site draws it like this:

```python
print("Hello")
```

These show as typed, or not at all:

- Task-list checkboxes: `- [ ]` shows as a plain list item.
- `==highlight==`, footnotes and math show as typed.
- Any other HTML tag, such as `<div>`, `<details>`, `<sup>` or `<iframe>`, is removed together with everything inside it.

## Components

Write each component as a tag, with the opening and closing tags on lines of their own:

```markdown
<Callout type="warning">
Back up your data **before** upgrading.
</Callout>

<Accordion heading="Can I use my own domain?">
Yes, on the Pro and Ultimate plans.
</Accordion>

<Image src="./images/home.png" alt="The dashboard home screen" caption="The dashboard after first sign-in" />
```

The text between the tags is normal Markdown: lists, bold, links and images all work inside.

| Component | Tag |
| --- | --- |
| Callout | `<Callout type="info">` … `</Callout>`. `type` is `info`, `warning`, `error` or `success` |
| Accordion | `<Accordion heading="…">` … `</Accordion>`. Add `open` to start it expanded |
| Image | `<Image src="…" alt="…" caption="…" />`. Add `frame` for a border, `zoom="false"` to turn off click-to-zoom |
| Code Block | A fenced code block with a language |
| Blockquote | A line starting with `>` |
| Divider | `---` on its own line |
| Description, Tags, Authors, Cover Image | Front matter. The tags also work, but front matter wins when both are set |

Rules:

- Use the exact capitalization: `<Callout>`, not `<callout>`. A lowercase tag is removed together with everything inside it.
- Switches are written bare, with no value: `<Accordion heading="…" open>`, `<Image … frame />`.
- Captions need the `<Image>` tag. The title in `![alt](src "title")` is not shown.
- For a one-paragraph component, the Google Docs short form works too: `(Callout | type: info) Remember to save.` at the start of a paragraph.

See [Components](https://www.contito.com/writing-content/components) for what each one draws, and the [Kitchen Sink](https://www.contito.com/writing-content/kitchen-sink) to see them rendered.

## GitHub specifics

Relative paths work: `![A search result](./images/search-result.png)`.

Contito copies the image to your site on sync.

Link to another Markdown file in the repository by its relative path, and the link points at that article on your site.

`[Writing for Search](./content-strategy/01-writing-for-search.md)` works, and so does `../` to go up a folder.

See [Links Between Articles](https://www.contito.com/writing-content/links-between-articles).

Contito reads `.mdx` files as Markdown.

Imports and code expressions are not supported: only the components above work.

Name files for sorting, such as `01-introduction.md` and `02-setup.md`, and put the real title in front matter.

The articles appear in file-name order, and each gets its address from its title.

## A full example

`02-on-page-basics.md` from the demo repository, as it appears on GitHub:

```markdown
---
title: On-Page Basics
description: Titles, headings and descriptions that help Google understand a page.
tags: [seo]
---

## The title

Put the main keyword near the start. Keep it under 60 characters.

## Headings

Use one heading per idea, in order. Google reads them like a table of contents.

![A search result showing the title, address and description](./images/search-result.png)

<Callout type="warning">
Never stuff the same keyword into every heading. Google treats it as spam.
</Callout>

Next: [Writing for Search](./content-strategy/01-writing-for-search.md).
```

## Related

- [GitHub](https://www.contito.com/content-sources/github): connect a repository.
- [Importing a Markdown File](https://www.contito.com/content-sources/importing-a-markdown-file)
- [Components](https://www.contito.com/writing-content/components)
