# Publishing and Collections

Publishing a document in Marked Share is designed to give you precise control over who can read your work and how it is organized.

## Visibility Levels

Every document in your library has one of three visibility settings:

1. **Private (Default):** Only you and authenticated API tokens on your account can access the document. Anyone else visiting the URL receives a strict `404 Not Found`—not an authorization challenge—so the link never leaks that the document even exists.
2. **Unlisted:** Anyone with the link can view the document, but it will never appear on your public profile or in search engine listings.
3. **Public:** Anyone with the link can view the document, and you can optionally feature it on your public profile.

## Link Formats and Protection

When you publish, Marked Share generates clean short links on `markedb.in`:

- **Short Codes:** `markedb.in/x7k2m` — quick 5-character slugs generated on publish.
- **Custom Slugs:** `markedb.in/yourname/custom-slug` — human-readable URLs tied to your profile handle.
- **Raw Markdown:** `markedb.in/d/<id>.md` — instant access to clean plain text.
- **TextBundle Exports:** `markedb.in/d/<id>.textpack` — zipped bundle containing the markdown and all embedded assets.

Need extra security? You can add **password protection** or an **expiration date** directly from the Share dialog. Password-protected documents require readers to enter a passphrase before unlocking, and expired documents gracefully return 404s after their deadline.

## Collections: From Reading Lists to Full Blogs

A **Collection** is an ordered group of documents with its own landing page at `markedb.in/u/yourname/c/collection-slug`.

Collections can be displayed in two modes:

- **List Mode:** A clean, curated table of contents or documentation index where you can order articles up and down.
- **Blog Mode:** A reverse-chronological blog feed with full-text or summary post views, pagination, and an automatic Atom feed at `/feed.xml`.

You can even attach custom CNAME domains to collections, turning Marked Share into a lightning-fast Markdown blogging engine.
