← Back to blog

docs.page – Local Preview Mode

Jacob Cable

Software Engineer

30th November, 2021

Need a custom tool? Invertase can help

Tired of investing in off-the-shelf software that doesn't quite fit your business? Invertase can build solutions tailored to your exact needs. Tell us what you're looking for here and we'll be in touch.

What is docs.page?

In July this year we introduced docs.page, an open source project which allows you to create instant documentation with zero configuration.

docs.page provides a pain-free solution to documentation, letting you focus on the content of the documentation rather than the details of its setup, generation, and hosting.

Local Preview Mode

In the past, to preview your documentation, you’d have to first set up a github repository and then commit all your markdown files. If you wanted to edit something, it would take another commit
to the repository. Previews were possible for pull-requests, but for bulk-writing documentation and quick fixes this was not ideal.

We’re excited to announce a feature that makes writing documentation with docs.page even easier: Local Preview Mode!

Local Preview Mode allows you to write up and edit your documentation locally without needing to commit then push changes and without needing to download any local packages or tools. What’s more is it also includes a hot-reload feature, so changes you make
to your local markdown will be reflected in your browser as you make them!

Note that local previews are currently only available with Chromium based browsers, and some features (such as PR previews) are not yet supported.

To try it out, navigate to docs.page/preview, press ‘Select Directory’, and choose your local directory containing at least a docs subdirectory and a file docs/index.mdx.

How does it work?

Local Preview Mode makes use of the new File System Access API. This API is currently
only supported in Chrome.

The File System Access API allows interaction with files on a user’s local device. The user provides permission for the browser to access a directory handle.

Development

We’re actively working on docs.page, which has now been adopted by exciting projects such as Go Router. Local Preview Mode is considered a beta feature of docs.page, and we welcome any issues and suggestions (for this or docs.page in general)
submitted through our Github repo.

Jacob Cable

Software Engineer

Categories

Tags