Use Nanoc Environments to build a custom embedded version of the Docs site
This has been floating around in my head for a while, I'm not 100% sure how we should do it or if it's even possible, but I'd like to try it. Apologies for the mind barf that follows.
There are a number of drawbacks to removing the Help section from the self-hosted instance entirely. Notably: firewalls, ease of access, possible downtime for docs.gitlab.com, etc. This is a potential alternative without those drawbacks, and without the drawbacks of the Rails-app-rendered Help section.
Essentially the goal would be to ship this Nanoc site inside the GitLab CE/EE Rails application. Currently we have the Rails app dynamically render the Markdown inside the doc
folder, which is bad for a number of reasons. Environments can be (ab)used to modify the site's layout and other functions depending on the environment in which the site is being compiled. In theory we could have the docs site be generated with modifications so it can be embedded in the Rails app itself.
This has some engineering difficulties associated with it. How do we package this with the Rails app? The Help section works because the Rails app parses the Markdown on-demand. This would require packaging the static site with the Rails app which would require either including the code for this site in the main GitLab repository or... something else? With Omnibus we could compile the Nanoc site ourselves for inclusion in the Rails app. Unfortunately, this wouldn't work for source installs. In theory we could just have source installs link to docs.gitlab.com and Omnibus installs would include it, but that assumes that all our big customers would be using Omnibus (are they?), and would also leave source install users in the dust. We could possibly host the site as a vanilla Rack app alongside the main Rails app and just direct /help/
to it, that's how the Sidekiq Web UI works right now.
TL;DR: Unfortunately removing the Help section entirely has some significant drawbacks. I'd like to figure out a way to create a custom-built package of the Nanoc site to be included in the self-hosted GitLab application. This would be nearly identical to the Docs site on docs.gitlab.com, but without the extra sections or versions, while using all the same rendering so we don't have to maintain two entirely separate means of rendering the documentation (as we do now).
Thoughts?