# Introducing Unidoc Preview: compile, validate, and browse rendered docs on your local machine!

**URL:** <https://forums.swift.org/t/introducing-unidoc-preview-compile-validate-and-browse-rendered-docs-on-your-local-machine/74251>\
**Category:** Community Showcase\
**Tags:** documentation, unidoc\
**Created:** [August 29, 2024, 11:31pm UTC](https://forums.swift.org/t/introducing-unidoc-preview-compile-validate-and-browse-rendered-docs-on-your-local-machine/74251 "2024-08-29T23:31:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![taylorswift](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/taylorswift/32/43413_2.png) [@taylorswift](https://forums.swift.org/u/taylorswift)\
**Post date:** [August 29, 2024, 11:31pm UTC](https://forums.swift.org/t/introducing-unidoc-preview-compile-validate-and-browse-rendered-docs-on-your-local-machine/74251/1 "2024-08-29T23:31:14Z")

</div>

As some may already be aware, [Swift Unidoc](https://github.com/tayloraswift/swift-unidoc) is a documentation engine that supports rendering documentation for a package and its dependencies, with symbol links that cross module and even package boundaries. This release introduces the `unidoc preview` and `unidoc local` tools, which enable **compiling and browsing rendered documentation on your local machine**.

## What’s the update for?

Although Unidoc has existed for a long time now, effectively writing documentation that takes full advantage of its feature set has historically been hampered by several obstacles:

- Cross-package link resolution occurs at link time, on the server side, which prevented the compiler from diagnosing broken cross-package links.
- Because cross-package links appear syntactically identical to package-internal links, this prevented the compiler from effectively diagnosing broken links at compile time at all.
- Because it is difficult (if not impossible) to model the entire Swift package ecosystem locally, in practice, iterating with Unidoc required interacting with the centralized [Swiftinit](https://swiftinit.org/) database.
- This also precluded using Unidoc as a CI validation step, as the CI pipeline would have to manage a build lifecycle on Swiftinit, which is very logistically complex.

## Validate your links locally!

Unidoc 0.19 completely overhauls Unidoc’s compilation model such that all link resolution now takes place at compile time, on the client, without having to interact with Swiftinit at all. This allows you to iterate on your documentation locally with the confidence that your documentation is valid before even committing it in Git, or pushing it to GitHub.

## Prebuilt binaries now available!

On [select platforms](https://github.com/tayloraswift/swift-unidoc/actions/workflows/package.yml) (x86\_64 Ubuntu 24.04 and aarch64 macOS), we now provide [pre-built toolchains](https://swiftinit.org/docs/swift-unidoc/guides/quickstart#Downloading%20a%20pre-built%20binary) that can be installed without compiling Unidoc from source. The downloadable archives also include a copy of the web assets needed to browse rendered documentation locally.

## Get started now!

You can get started with local documentation right now by following the Unidoc [Quickstart](https://swiftinit.org/docs/swift-unidoc/guides/quickstart) guide. Setting up Unidoc for the first time has also become much easier, as the `unidoc` tool now provides a `unidoc init` subcommand that can automatically configure and initialize a local deployment on Linux and macOS.

[https://swiftinit.org/docs/swift-unidoc/guides/quickstart](https://swiftinit.org/docs/swift-unidoc/guides/quickstart)
