Deploy and host your documentation site
The Tech Docs Template is built on Middleman, which is a static site generator. You can therefore deploy your site anywhere that supports static sites.
GitHub Pages
With some modification, you can also deploy your site with GitHub Pages, but we do not support this. To do this, you could for example use the middleman-gh-pages
tool, which we do not support.
We also cannot guarantee that all features of the template will work if you deploy your site with GitHub Pages.
The Ministry of Justice cloud platform documentation uses GitHub Pages.
Add basic authentication
There are many ways to add basic authentication to your documentation site.
The following instructions apply if you want to deploy your documentation site on any platform using the Cloud Foundry open source cloud application platform.
This method relies on adding a Staticfile.auth
file to the build
folder because building the documentation doesn’t automatically add the Staticfile.auth
file. If you added Staticfile.auth
once and run the build command again, the file will disappear. You need to add Staticfile.auth
again to enable basic authentication for the new build.
In the command line, navigate to your local documentation repo.
If required, run
bundle exec middleman build
to create abuild
folder.Create a new
Staticfile.auth
file in thebuild
folder.Go to the Htpasswd Generator.
Complete the Username and Password fields, and select Create .htpasswd file.
Copy the generated username and password hash into the
Staticfile.auth
file and save.Deploy your documentation site in line with your normal process.