The Help section has caused a lot of headaches, and I have been a big proponent of removing it from the Rails app due to the constraints it introduces.
Problems with /help
Holds back docs.gitlab.com from being made great again.
Designers must consider it when implementing/updating the interface.
Tons of problems with routes in Rails (/help/help, broken routing to the Getting Started with Pipelines page, etc.).
Constrains the structural design and updating of the documentation.
Slows the technical writing team down.
Part of the reason docs.gitlab.com has such a terrible build system. (we switched to a proper static site generator since and deploying to Pages)
Slower than it should be because it’s part of the main Rails app.
Any "advanced features", e.g. a table of contents, need to be implemented in our static site as well as Rails. This is a massive pain for making the Help/Documentation easier to use.
You know the reason nobody has an m. site anymore? It doubled the work they had to do to implement a feature, they were essentially reimplementing it entirely for mobile. This is what we're doing here, and it sucks.
Considerations for removing it
I'm not suggesting we just rip out the Help section, the idea would be that it be replaced with some very basic information, links to docs.gitlab.com, and that's it.
In order to ensure that the docs will be in-sync with the on-premise version users are working with, the documentation site either needs to have a versioning system (based on the state of the GitLab repository's tags presumably), or we have to ship a static site alongside every GitLab instance to serve as their documentation. It cannot continue to be embedded in the Rails app, as this is what's causing the problems I discussed above.
We need to:
Have some way to make sure users are viewing the correct version of the documentation for their instance.
Ensure that, if we use docs.gitlab.com, enterprise customers are okay with that.
Replace Help links from the Search suggestions and help text with their new counterparts.
Make sure replacing this doesn't prevent the Docs team from adding new documentation on new features, it has to essentially be fully replaced in a single release.
@SeanPackham this is pretty convincing stuff from Connor. I care most about having the docs in the same repo. If we can't render them in the application that is acceptable. Programming without internet is very hard anyway.
Thank you for this @sytses I agree keeping it as part of the app makes sense and then we can tweak the documentation authoring process: swapping to Kramdown, improving CI builds, creating documentation authoring tools etc.
@SeanPackham, do you mean keeping docs as part of the repo, or the app? I am in favor of removing it from the app, but of course keeping the source in the repo. Although, as mentioned, there are many prerequisites.
@winniehell Yes, we will need versioned docs if we do this. It should stay at https://docs.gitlab.com, but it can still be deployed via GitLab Pages on GitLab.com.
I really like where this is going. Thanks for the discussion
I'm not suggesting we just rip out the Help section, the idea would be that it be replaced with some very basic information, links to docs.gitlab.com, and that's it.
I would really love to see us have a single source of truth instead of maintaining both /help and docs.gitlab.com. I discussed with @SeanPackham and our notes (appending on top of @connorshea ) are:
Thoughts:
Separate it from the Rails app
Separate the docs static site tech (Middleman) from something that has to work with Rails
Embed it in the app under /help using an iframe
Static docs will be built as part of the app startup process and served via rails asset engine (might have the most pushback on this).
Alternatively we commit the built docs, this has the added benefit of being immediately readable by someone downloading the repo, navigating to docs and opening index.html
We can use fancy things like yaml frontmatter that can be used by the static site generator.
Challenges:
GitLab docs will be eventually be built using a static site generator (SSG), but where will the source code live? If we are to continue serving all docs under doc/, will that dir also contain what an SSG contains (Gemfile, config.yml, static assets etc.)?
Not known impact to users/customers
Todos:
(easy) We link to the internal docs in various places. Find all help_page_path occurrences and replace with the new doc links.
Please, let's not do this. It will be ugly, multiple nav, etc. Let's remove it from the app and then if we can provide an easy way for someone to deploy an internal doc site, that's fantastic. Let's make that a secondary goal, though so we don't delay.
@axil I'm also opposed to the use of an iframe, that's less-than-ideal from a security standpoint and would be somewhat finicky. I'd rather we link to docs.gitlab.com or (ideally) have a Jekyll or Middleman site inside the Rails app.
Also, it should be part of the build process to create that, the final site shouldn't be included in the repository since that'd cause too much repo bloat.
Another SSG worth looking into is Nanoc, it seems to be the one best suited for creating versioned documentation.
I also think we should give a fair shake to Read the Docs (self-hosted by us, so we can use it on our domain).
for nanoc. I have a POC hanging out somewhere from a long time ago. It works well and is really flexible as far as allowing us to keep most of the current structure we have and without requiring us to change any markdown file names (like middleman would).
@connorshea: You suggested in the issue body that we replace the Help section with very basic info that links to the docs.gitlab.com. Would it make sense to just have 'Help' link directly to docs.gitlab.com instead?
@awhildy the Help section also has keyboard shortcuts, a link to buying a support subscription, the version and version check, etc. I think we should leave the page.
Another compelling reason to switch to maintaining solely the docs portal is the ability to do stuff like automatically generating index pages for relevant documentation.
I briefly talked about this with a customer+ in GitLab FOSS. They did not see a major reason that the online versioned docs would not be sufficient for them. Servers are often firewalled off from the world, but rarely are workstations, so a user clicking a help link that goes to docs.gitlab.com would be fine - especially if that link went directly to the correct version.
One more reason to focus entirely on the docs portal is that we could avoid things like splitting Omnibus and source docs in areas that are hard to follow:
If we used only the docs portal we could do something like what the Atom flight manual does and have both info (Omnibus + source) that could be toggled with a button.
For example, there is info on installing on all three platforms and instructions change with a click of a button:
Another consideration for removing the docs under help is to prevent someone from knowing the GitLab version. It might not be that difficult to deduct GitLab's version from comparing the docs that appear on /help with what we have in the repo. We show the help page on every instance whether you are logged in or not.
Here are my notes after investigating how we can proceed with this move. Essentially, Docker has solved the multiple versions issue with a way which I believe we can also use. They leverage the power of Docker images, DockerHub and GitHub Pages. We can do all three.
Advantages of keeping only the static site generator
We can create redirect pages without relying on the real document being
available all the time in the master branch (https://gitlab.com/gitlab-com/gitlab-docs/issues/96). We can have a list of redirects
in the gitlab-docs project and create the HTML redirects each time the
site is built. Advantage: flexibility, no ghost documents residing inside
/doc.
Using kramdown as our Markdown engine which gives us more flexibility.
Multiple versions the Docker way (TODO add explanation how they did it)
We support up to 3 versions in the docs portal including the master one,
so we have: master, stable, stable-1, stable-2. All previous versions
got to the archives project.
Create gitlab-docs-archive which will have all old precompiled html versions saved
in docker containers in our registry.
We update this once a month, we don't care how much time it will take to deploy
We assume /help is killed and we link to the docs portal from inline links.
With that said, how are we gonna link the inline GitLab docs to the correct
docs portal. We now have https://docs.gitlab.com. One possible sollution
would be to make the docs URL configurable in gitlab.yml. That way it's
only a matter of setting a default with each release and sysadmins can
always take our docs portal build it on-premise and change the URL to
point to theirs. The default URL would be pointing to docs.gitlab.com.
Notes
Never link to docs on master, master is the development branch and things
change/get deleted all the time. Prefer to link the stable branches instead
or use the Permalink button.
Make gitab-docs versioned now that all products follow the same versions?
What are the advantages/disadvantages?
The raketask doesn't have to build different versions, just the latest
stable one. We build a docker image each month that contains the previous
months' builds plus the new version. See how Docker does it.
We support up to 3 versions in the docs portal including the master one,
so we have: master, stable, stable-1, stable-2. All previous versions
got to the archives project.
Create gitlab-docs-archive which will have all old precompiled html versions saved
in docker containers in our registry.
We update this once a month, we don't care how much time it will take to deploy
What happens with the docker images of the older versions?
Servers are often firewalled off from the world, but rarely are workstations, so a user clicking a help link that goes to docs.gitlab.com would be fine - especially if that link went directly to the correct version.
... but some environments do not allow user workstations to access the internet. A solution to this would be to allow GitLab server admins to modify the URL that /help leads to and allow admins to host the gitlab-com/gitlab-docs static site on their own servers.
A solution to this would be to allow GitLab server admins to modify the URL that /help leads to and allow admins to host the gitlab-com/gitlab-docs static site on their own servers.
We assume /help is killed and we link to the docs portal from inline links.
With that said, how are we gonna link the inline GitLab docs to the correct
docs portal. We now have https://docs.gitlab.com. One possible sollution
would be to make the docs URL configurable in gitlab.yml. That way it's
only a matter of setting a default with each release and sysadmins can
always take our docs portal build it on-premise and change the URL to
point to theirs. The default URL would be pointing to docs.gitlab.com.
@SeanPackham@axil let's create an issue for that idea. Do we think that we should do that at the same time? I think not and am in support of removing /help.