Getting Started
Table of Contents
Plugin activation
Upon plugin activation, a page is automatically created for you, titled: Documentation.
You can change the title of “Documentation” to whatever you like, but mind you that it should make sense.
In the contents of this page you’ll find a shortcode, called docs_base
.
You can dress up the page however you like, but it’s important that this shortcode remains in place somewhere on the page. This shortcode is used to render a list of links to each of your Help Scout Docs categories.
Setting up Help Scout Docs for WordPress
The plugin’s settings can be found in your admin area under Settings > WP Help Scout Docs.
They’re quite straight forward. All you need to do is create an API key in Help Scout, paste it and hit Save Changes.
You can also choose to change the value of the Base option. The default is “docs”, which should suffice in most situations. If you were to change to e.g. “help”, your Docs section can be found at yourdomain.com/help.
After saving your API key, you’ll notice that the Collection option has appeared, containing the available collections in your Help Scout Docs.
Select the collection you wish to connect to your WordPress instance and enable the Auto TOC and Restrict Search to Docs options if you so wish. Hit Save Changes again. A Build Docs button will appear. Hit it to prime the cache of your documentation.
Building the docs might take a while, depending on the size of your Help Scout Docs. What it does is, basically, is fetch a list of categories, their names, IDs and article titles. These are needed to render the articles when requested.
Using constants to setup WP Help Scout Docs.
It’s possible to setup this plugin using just constants by manually defining them in wp-config.php
. This is not required and should only be used by agencies and/or developers.
The following constants are supported:
- WP_HELP_SCOUT_DOCS_API_KEY overwrites the API Key option.
- WP_HELP_SCOUT_DOCS_BASE overwrites the Base option.
- WP_HELP_SCOUT_DOCS_COLLECTION_ID overwrites the Collection option.
- WP_HELP_SCOUT_DOCS_TOC overwrites the Auto TOC option.
- WP_HELP_SCOUT_DOCS_RESTRICT_SEARCH overwrites the Restrict Search to Docs option.
It’s important to remember that constants will take precedence over options in the Settings screen at all times. If you wish to return to using the settings page, the constants need to be removed from wp-config.php
.