Skip to main content

Exporting Swimm Documentation To Docusaurus

Docusaurus is a great way to organize and present technical documentation in a stylish and accessible web view. By copying the files generated by swimm export to an input directory and running a few commands, you can build a documentation portal that looks just like this one, the portal you're currently viewing, which is also built on Docusaurus.

Additionally, there are many awesome themes contributed by the Docusaurus community that you can use as a starting point.

Getting Started#

The first step is to enable markdown export for the repositor(ies) where you want the documentation exported to the web. This is done by navigating to the repository that you want to enable and clicking on the "Integrations" link found at the top right:


Then, click the slider that enables markdown exporting:


Now, whenever you save a document, it will be automatically exported to .swm/swm_md/ in the repository. Saving a doc will also cause an auto-generated timestamp in the corresponding .md file to be updated, which will be visible in your IDE's Git integration tab. It's up to you if you want to track these documents in source control. You'll see, in the next step, that we request swimm to create fresh markdown each time we build the docusaurus site.

Getting the sample repo & Code#

At this point, you're ready to head over to Github and clone our docusaurus-template repository. Follow the README in that repository for instructions on how to build your documentation site, and deploy it continuously using Netlify or other git-friendly hosts.