Markdown on Gno

Introduction

Markdown on Gno is based on standard markdown, but also has some unique features, making it the Gno Flavored Markdown. This document describes the current markdown support in Gno, demonstrating both the syntax and its rendered output.

[!NOTE] Markdown support in Gno is still evolving. New features and improvements will be added in future releases.

Basic Syntax

Headings

Headings are created using hash symbols (#). The number of hash symbols indicates the heading level.

1# Heading 1
2## Heading 2
3### Heading 3
4#### Heading 4
5##### Heading 5
6###### Heading 6

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

Text Formatting

You can format text using the following syntax:

1**Bold text**
2*Italic text*
3~~Strikethrough text~~
4**Bold and _nested italic_**
5***All bold and italic***

Bold text Italic text Strikethrough text Bold and nested italic All bold and italic

Links can be created using the following syntax:

1[Link text](https://example.com)
2[Link with title](https://example.com "Link title")

Link text Link with title

XXX: custom CSS for internal/external links and if possible for "in the same realm/namespace".

Lists

Unordered lists use asterisks, plus signs, or hyphens:

1* Item 1
2* Item 2
3  * Nested item 1
4  * Nested item 2
  • Item 1
  • Item 2
    • Nested item 1
    • Nested item 2

Ordered lists use numbers:

11. First item
22. Second item
3   1. Nested item 1
4   2. Nested item 2
  1. First item
  2. Second item
    1. Nested item 1
    2. Nested item 2

Blockquotes

Blockquotes are created using the > character:

1> This is a blockquote
2>
3> It can span multiple lines

This is a blockquote

It can span multiple lines

Code

Inline code uses single backticks:

1Use `func main()` to define the entry point.

Use func main() to define the entry point.

Code blocks use triple backticks with an optional language identifier:

1```go
2package main
3
4func main() {
5    println("Hello, Gno!")
6}
1package main
2
3func main() {
4    println("Hello, Gno!")
5}

Horizontal Rules

Horizontal rules are created using three or more asterisks, hyphens, or underscores:

1---

Tables

Tables are created using pipes and hyphens:

1| Header 1 | Header 2 |
2| -------- | -------- |
3| Cell 1   | Cell 2   |
4| Cell 3   | Cell 4   |
Header 1 Header 2
Cell 1 Cell 2
Cell 3 Cell 4

Images

Images can be included using the following syntax:

1![Alt text](/public/imgs/gnoland.svg "Optional title")

Alt text

Currently, only a short list of content providers are supported:

 1// Gno-related hosts
 2"https://gnolang.github.io"
 3"https://assets.gnoteam.com"
 4"https://sa.gno.services"
 5
 6// Other providers should respect DMCA guidelines
 7// NOTE: Feel free to open a PR to add more providers here :)
 8
 9// imgur
10"https://imgur.com"
11"https://*.imgur.com"
12
13// GitHub
14"https://*.github.io"
15"https://github.com"
16"https://*.githubusercontent.com"
17
18// IPFS
19"https://ipfs.io"
20"https://cloudflare-ipfs.com"

Gno-Specific Features

HTML Support

By design, most typical HTML support is disabled in Gno's markdown implementation. This is an intentional decision for both security and ecosystem cohesion.

While traditional markdown often allows arbitrary HTML tags, Gno Flavored Markdown takes a more controlled approach:

  • We may progressively whitelist certain HTML components or add custom ones over time
  • Our priority is to enhance our flavored markdown to natively support all essential components
  • We aim to eventually support all the initially HTML-supported features, but with syntax that is:
    • More readable when viewing the source directly
    • More integrable with custom browsers such as gnobro in CLI

This approach allows for a more consistent rendering experience across different Gno interfaces while maintaining security and readability as core principles.

Columns

Gno-Flavored Markdown introduces a column layout system that uses special tags. You can create columns with <gno-columns> blocks and separate the content with |||.

Basic Syntax

1<gno-columns>
2Left content
3
4|||
5
6Right content
7</gno-columns>
  • Renders as:

Left content

Right content


Key Features

  1. Multiple Columns:

Depending on the screen size. A maximum of four rows can be displayed in one row.

Note: Any overflow will result in items being displayed in the next row. Also, keep in mind that on smaller screens (e.g., phones), this overflow may occur with fewer elements.

 1<gno-columns>
 2First column
 3
 4|||
 5
 6Second column
 7
 8|||
 9
10Third column
11
12|||
13
14Fourth column
15
16|||
17
18Fifth column
19</gno-columns>
  • Renders as:

First column

Second column

Third column

Fourth column

Fifth column


  1. Mixed Content:

Columns can be mixed with any markdown content

Note: Nested columns are currently not possible

1<gno-columns>
2### Text Section
3Paragraph with _formatting_
4
5|||
6
7My Image ![Alt](/public/imgs/gnoland.svg)
8</gno-columns>
  • Renders as:

Text Section

Paragraph with formatting

My Image Alt


Usernames

XXX: TODO (add again this feature that was removed)

Bech32 Addresses

XXX: TODO

Gno markdown can automatically recognize and render Bech32 addresses.

1g1jg955hm9a6f0yen878c2hur6q7stqz7rzpyrwpe

g1jg955hm9a6f0yen878c2hur6q7stqz7rzpyrwpe

Smart Contract Integration

XXX: TODO

1gno.land/r/boards
2gno.land/r/boards:foo/bar
3gno.land/r/docs/markdown$source

gno.land/r/boards gno.land/r/boards:foo/bar gno.land/r/docs/markdown$source

And more...

XXX: TODO

Future Enhancements

The markdown support in Gno is being actively developed. Future enhancements may include:

  • Extended support for custom components
  • Interactive elements specific to blockchain functions
  • Rich rendering of on-chain data
  • Better integration with Gno's package system

Read more

Conclusion

Markdown on Gno provides a familiar syntax for developers who have experience with GitHub Flavored Markdown, while adding blockchain-specific extensions that make it more powerful in the context of the Gno platform.

As the Gno ecosystem grows, expect the markdown capabilities to expand accordingly, providing even richer formatting and interactive elements for documentation and user interfaces.