# The LinkaGoGo Markdown Bookmark Format

Version 1.1 — 2026-11-23

This page documents how [LinkaGoGo](https://www.linkagogo.com) implements the
[Open Markdown Bookmark Format](https://open-markdown-bookmark-format.henryvandenbroek.com)
— the vendor-neutral spec for this format, originated by
[mardo](https://github.com/hbroek/mardo). §§1–3 and 5–6 below are that spec
verbatim; §4 documents LinkaGoGo's own optional extension to it. If you're
building another tool against this format rather than using LinkaGoGo, read
the [open spec](https://open-markdown-bookmark-format.henryvandenbroek.com)
directly — it's the canonical reference and isn't LinkaGoGo-specific.

A bookmark file in this format is plain [CommonMark](https://commonmark.org/)
that reads well on its own, in any markdown viewer, and round-trips losslessly
through LinkaGoGo's export/import and through mardo, the markdown-native
browser that originated it. There is no custom syntax: a folder is a bold
list item, a bookmark is a link, and everything else is ordinary markdown.

```markdown
# Bookmarks

- **Dev**
  - **Web**
    - [Go](<https://go.dev/>) — The Go site
      Keywords: lang, go
- [Top level](<https://top.test/>)
```

## 1. Document shape

- The file is a single nested bullet list. Nesting is 2 spaces per level.
- An optional single `# Title` heading at the very top of the file is the
  *document's* title, not a folder — `# Bookmarks` in the example above. A
  writer should include it; a reader must not treat it as a folder named
  "Bookmarks".
- Everything else in the list is either a **folder** or a **bookmark**.

## 2. Folders

A folder is a list item whose text is bold:

```markdown
- **Folder Name**
```

Its children — subfolders and bookmarks — are the list items nested one level
deeper, in any order a writer chooses (LinkaGoGo writes subfolders before a
folder's own bookmarks, but a reader must accept either order).

## 3. Bookmarks

A bookmark is a list item that starts with a markdown link:

```markdown
- [Title](<https://example.com/>) — Optional description
    Keywords: one, two, three
```

- **Title and URL**: a standard markdown inline link, `[Title](URL)`. The URL
  is wrapped in angle brackets (`<...>`) so it survives unescaped if it
  contains a space, pipe, or other character markdown would otherwise treat
  as the end of the link destination. A bare autolink (`<https://example.com/>`
  or even a plain `https://example.com/` with no brackets) is also accepted
  as a bookmark with no title — the URL stands in for the title.
- **Description**: optional text after the link, separated by an em dash
  (`—`), en dash (`–`), hyphen (`-`), or colon (`:`). A writer should use an
  em dash; a reader must accept any of the four.
- **Keywords**: an optional line directly below the bookmark, indented one
  level deeper than the bullet, reading `Keywords: ` followed by a
  comma-separated list. A reader that does not recognize a continuation line
  (this one or any of §4's) should simply ignore it rather than erroring —
  the bookmark itself is still valid without it.

## 4. Extended fields (optional, LinkaGoGo-specific)

Everything in §3 is the *portable* format — what mardo reads and writes, and
what any markdown-native tool should be expected to understand. The open
spec's [extension mechanism](https://open-markdown-bookmark-format.henryvandenbroek.com#4-extensions)
is deliberately free-form: any tool can add continuation lines in the same
`Label: value` shape as `Keywords:` for data the portable core doesn't model.
This section is LinkaGoGo's own extension — ratings, favorite status, visit
history, reminders, aliases, smart URLs, and RSS associations — documented
as the worked example on the open spec's extensions page. A reader that
doesn't know about these — mardo included — simply doesn't match them
against any pattern it recognizes and drops them, the same way it would drop
any other line it doesn't understand. Writing them is always optional; a
plain export (§§1–3 only) remains the default and is what most writers
should produce.

```markdown
- [Go](<https://go.dev/>) — The Go site
    Keywords: lang, go
    Added: 2020-01-15T10:00:00Z
    Visited: 2021-06-15T12:00:00Z
    Visits: 3
    Rating: 4
    Favorite: yes
    Alias: godev
    Smart URL: <https://pkg.go.dev/search?q=%s>
    RSS: <https://go.dev/blog/feed.atom>
    Reminder: daily
```

All of these are optional and independent — include only the ones that
apply to a given bookmark:

| Label | Value |
|---|---|
| `Added` | When the bookmark was created, as an RFC 3339 timestamp (UTC). |
| `Visited` | When it was last visited, as an RFC 3339 timestamp (UTC). |
| `Visits` | Total visit count, a positive integer. |
| `Rating` | 1–5. |
| `Favorite` | `yes` if favorited; the line is omitted otherwise. |
| `Alias` | A short keyword shortcut for the bookmark, escaped as in §5. |
| `Smart URL` | A URL template (e.g. containing `%s`), wrapped in `<...>` like the bookmark's own URL. |
| `RSS` | The feed URL associated with the bookmark, wrapped in `<...>` the same way. |
| `Reminder` | `daily`, a weekday name, an ordinal day of the month (`1st`…`31st`), or a plain number of days. |

This is LinkaGoGo's own extension, not part of mardo's format — a file using
it is still valid, portable markdown, and still opens correctly in mardo or
any other reader; those readers just won't preserve this metadata on a
subsequent re-export, since they never modeled it in the first place.

## 5. Escaping

Markdown's own special characters — `` \ ` * _ [ ] < > & ~ | `` — are
backslash-escaped wherever they appear in a title, folder name, description,
or keyword, so that arbitrary bookmark data never breaks the list structure.
A URL additionally percent-encodes `<`, `>`, space, and newline, since those
cannot appear literally inside the `<...>` link-destination brackets.

## 6. Reading a hand-written list (not just a generated one)

A writer following §§1–3 and 5 produces files a reader can parse with a
simple, literal reading of this spec. But a reader should be more forgiving,
so that a list someone wrote by hand — not generated by any tool — imports
cleanly too:

- Any heading, `#` through `######`, is also a folder, nested by heading
  level. (As in §1, a lone `# Title` at the top of an otherwise heading-free
  document is the exception — that one is the document's title.)
- A list item with no link is also a folder if it is bold (`**Name**` or
  `__Name__`) **or** if it has nested list items under it. A plain, non-bold,
  childless line of text is not a folder — it is simply not part of the
  bookmark structure, and a reader should skip it rather than erroring.
- Fenced code blocks (` ``` ` or `~~~`) are skipped entirely, so a list that
  happens to include an example snippet elsewhere in the same document isn't
  misread as bookmarks.

## 7. Choosing plain vs. extended

The portable format (§§1–3) is the right choice when the file is meant to be
read, edited, and version-controlled as plain text by a person or a
markdown-native tool, or shared with someone who isn't using LinkaGoGo. The
extended format (§4) is for round-tripping LinkaGoGo's own data — between two
LinkaGoGo accounts, or as a human-readable backup — without reaching for
LinkaGoGo's [XBEL export](/xbel-linkagogo.dtd), which carries the same data
but isn't meant to be hand-read or hand-edited. Either way, importing a file
back in recovers everything the file actually contains — an extended field
simply has nothing to recover if the file never had it.

## 8. Using it with LinkaGoGo

- **Export**: `GET /api/v1/export/markdown` (Plus/Premium), or the "Download
  as Markdown" button in Export Bookmarks — check "Include LinkaGoGo details"
  there, or add `?extended=1`, for the §4 fields. Optionally scoped to one
  folder with `?folder_id=`.
- **Import**: the Import Bookmarks dialog accepts a `.md`/`.markdown` file
  alongside XBEL and Netscape HTML — the format is auto-detected, and any §4
  fields present are read automatically, with no separate toggle needed.
  Folders are merged by name under their parent; a bookmark already present
  at the same URL in the same folder is skipped. `POST /api/v1/import/markdown`
  (Plus/Premium) does the same for direct API use, optionally into a target
  `?folder_id=`.

See the [API docs](/api-docs) for the full request/response shape.
