# How WriteDocs works

> For the complete documentation index, see [llms.txt](https://docs.writedocs.io/llms.txt).

The WriteDocs platform, your repository and the generator - how they fit together, and what gets published where.

A WriteDocs site comes from three parts: the platform, where your project lives; a repository, if you'd rather write in GitHub; and the generator, which turns your pages into the site. You can work in the dashboard, in a repository, or in both - the site is the same.

## The three parts

- **The WriteDocs platform.** Every site is a project on the platform. In the WriteDocs dashboard you edit pages, the navigation and the site's settings, publish, invite your team and connect a custom domain. The platform builds each new version of the site and serves it.
- **Your repository.** Optional. Connect a GitHub repository to the project, and the platform reads your pages from its connected branch - the whole repository, or one folder of it. What you change in the dashboard is committed back to the repository, so the two stay in step.
- **The generator.** `@writedocs/generator`, the `writedocs` command. It turns your MDX pages and your `writedocs.json` into the site. The platform builds every site with it, and you can run it on your own computer to preview the site as you write.

## What comes in from your repository

The platform reads the files of the connected branch, in the folder chosen when the repository was connected. These stay out:

- **What's [left out by default](https://docs.writedocs.io/docs/ignoring-files/#whats-left-out-by-default)** - secrets, files and folders whose name starts with a dot, `package.json` and other tooling files, `node_modules/`, `dist/` and the repository's `README.md` - and **what your [`.wdignore`](https://docs.writedocs.io/docs/ignoring-files/) lists**.
- **Files marked `export-ignore`** in a `.gitattributes`.
- **Symbolic links, and what's inside a Git submodule.** Put a copy of those files in the repository instead.

Pages are read as UTF-8. A file saved in another encoding still comes in, with `�` in place of each character that couldn't be read: save it as UTF-8 and commit it again.

## What's published, and where

Every project has an address on the platform, `https://<slug>.writedocs.io`, where the slug is the short name given to the project when it was created. On top of it, the site can have one of these:

- **A custom domain**, a subdomain of your own like `docs.example.com`. You point it at the platform with a DNS record, and the platform takes care of the HTTPS certificate.
- **A path of your own site**, like `example.com/docs`, behind your own proxy. The WriteDocs team sets it up - see [Serving under a path](https://docs.writedocs.io/docs/configuration/base-path/).

Along with the pages, every published site has:

- **[Search](https://docs.writedocs.io/docs/search/)**, with nothing to set up.
- **[`llms.txt` and `llms-full.txt`](https://docs.writedocs.io/docs/configuration/llms-txt/)**, and a Markdown copy of every page, for AI tools.
- **An [MCP server](https://docs.writedocs.io/docs/configuration/mcp/)** at `/mcp`, so AI tools can search and read your docs.

Publishing from the dashboard, or pushing to the connected branch, builds a new version. When the build finishes, the new version is what readers see, at every address of the site.

## Two ways to work

**In the dashboard**

Everything happens in the browser, with nothing to install: write and edit pages, arrange the navigation, change the site's look and settings, and publish.

If the project has a connected repository, your edits are committed to it, and what others push to the connected branch comes into the dashboard.

**In a repository**

Write in your own editor, in a GitHub repository connected to the project:

1. Install the generator, and preview the site on your computer with `writedocs dev` - it updates as you edit. See the [Quickstart](https://docs.writedocs.io/docs/quickstart/).
2. Check your changes with `writedocs validate` and `writedocs broken-links` - see the [CLI reference](https://docs.writedocs.io/docs/cli/).
3. Push to the connected branch: the platform builds and publishes the new version.

[Project structure](https://docs.writedocs.io/docs/project-structure/) shows how the files are laid out, and [writedocs.json](https://docs.writedocs.io/docs/configuration/overview/) covers every setting of the site.

## Hosting it yourself

Sites are built and hosted by the WriteDocs platform. To host your site on your own infrastructure, [contact us](mailto:support@writedocs.io).