Reference
Element reference
This page lists every element of a GitRead page. For each one you see how to insert it in the editor and how it is written in Markdown. The Markdown column is what is stored, what the Markdown (Import) block accepts and what an AI assistant sends and receives.
You never need the syntax to use GitRead. The editor writes it for you. It matters when you import content, copy a page or let an AI assistant write pages.
Text and structure
| Element | In the editor | Markdown syntax | Notes |
|---|---|---|---|
| Paragraph | Default block | Plain text | A blank line starts a new paragraph. |
| Heading 1 | /, or type # |
# Title |
Levels 4 to 6 (####) are rendered, but have no editor block. |
| Heading 2 | /, or type ## |
## Title |
Appears in On this page. |
| Heading 3 | /, or type ### |
### Title |
Appears in On this page. |
| Bulleted list | /, or type - |
- item |
* and + also work. |
| Numbered list | /, or type 1. |
1. item |
|
| Task list | /, or type [] |
- [ ] open and - [x] done |
Checkboxes. |
| Quote | /, or type > |
> quote |
|
| Divider | /, or type --- |
--- |
*** and ___ also work. |
Inline formatting
| Element | In the editor | Markdown syntax |
|---|---|---|
| Bold | Select text, Ctrl + B |
**text** |
| Italic | Select text, Ctrl + I |
*text* |
| Strikethrough | Select text, toolbar | ~~text~~ |
| Inline code | Select text, Ctrl + E |
`code` |
| Link | Select text, Ctrl + K |
[text](https://example.com) |
| Line break | Shift + Enter |
Two spaces or a backslash at the end of the line |
Rich elements
| Element | In the editor | Markdown syntax | Notes |
|---|---|---|---|
| Code block | /, or type three backticks |
Fenced block with a language, see below | The language gives syntax highlighting. |
| Code block with caption | Code block menu: With caption | {% code title="index.php" %} around a fenced block, see below |
Shows the title above the code. |
| Code block with line numbers | Code block menu: With line numbers | {% code lineNumbers="true" %} around a fenced block |
Combine with title. |
| Hint | / and choose Hint |
` |
Text
| Styles:info, success, warning, danger. Can contain several paragraphs. | | Button | /and choose **Button** |{% button href="https://example.com" style="primary" %}Label{% endbutton %}| Styles:primary, secondary. One button per line. | | Link card (web address) | /and choose **Link** |{% link href="https://example.com" title="Example" sub="example.com" %}| Title and icon are fetched automatically in the editor. | | Link card (page) |/, choose **Link**, search for a page | {% link href="page:42" %}|42is the number of a page of the same project. The title is taken from the page. | | Image |/and choose **Image** |
| Enter an image address and an alt text. | | Table |/and choose **Table** | Pipe table, see below | Column alignment with:---, :---:and---:. | | Diagram | /and choose **Diagram (Mermaid)** | Fenced block with the languagemermaid| Drawn as a diagram for readers. | | Raw Markdown |/and choose **Markdown (raw)** | Any Markdown | Used for content that has no block of its own. | | Markdown import |/` and choose Markdown (Import) | none | Converts pasted Markdown into blocks. Nothing is stored. |
Tag attributes
The tags hint, code, button and link are written as {% name attribute="value" %}.
| Tag | Attribute | Values | Default |
|---|---|---|---|
hint |
style |
info, success, warning, danger |
info for unknown values |
code |
title |
Any text | No caption |
code |
lineNumbers |
true |
Off |
button |
href |
Web address, path or anchor | none |
button |
style |
primary, secondary |
primary |
link |
href |
https://…, a path, an anchor, or page: followed by a page number |
none |
link |
title |
Any text | The page title, or the subtitle, or the address |
link |
sub |
Any text | No subtitle |
link |
icon |
Address of an image (https://…) |
A letter or a page symbol |
Closing tags exist for hint ({% endhint %}), code ({% endcode %}) and button ({% endbutton %}). The link tag has no closing tag.
Examples
Hint with several paragraphs
DOCSHINT2X
Code block with caption and line numbers
DOCSHINT3X
Buttons in a row
Buttons on consecutive lines are shown side by side.
{% button href="https://example.com" style="primary" %}Get started{% endbutton %}
{% button href="https://example.com/docs" style="secondary" %}Read the docs{% endbutton %}
Link cards
{% link href="https://example.com" title="Example" sub="example.com" icon="https://example.com/icon.png" %}
{% link href="page:42" %}
Table with alignment
| Name | Type | Price |
| :---- | :----: | ----: |
| Basic | Free | 0 |
| Pro | Paid | 12 |
Diagram
```mermaid
flowchart LR
Write --> Review --> Publish
```
Rules to remember
- Tags need their own line for block elements. Write a
buttonorlinktag on a line of its own. Ahintorcodetag may wrap several lines. - Code is never interpreted. Tags inside code blocks and inline code are shown as written. This is how this page can show them.
- Unknown values fall back to the default. An unknown hint style becomes
info, an unknown button style becomesprimary. - Unsafe links are blocked. Targets such as
javascript:are replaced by an empty link. - HTML is removed. Raw HTML in Markdown is not rendered. Use the elements above instead.
- Link cards to pages show as broken if the page no longer exists.