A wrapper for silverstripe/docsviewer that pulls the documentation into the cms replacing the Help menu item.


Repository: https://github.com/webbuilders-group/silverstripe-cmsuserdocs

Packagist: http://packagist.org/packages/webbuilders-group/silverstripe-cmsuserdocs

Issues: https://github.com/webbuilders-group/silverstripe-cmsuserdocs/issues

Authors: Ed Chipman

2 2 191


Readme

CMS User Docs Viewer

A wrapper for silverstripe/docsviewer that pulls the documentation into the cms replacing the Help menu item.

Maintainer Contact

Requirements

Installation

Composer (recommended):

composer require webbuilders-group/silverstripe-cmsuserdocs

Usage

Documentation will now be visible in the CMS replacing the Help menu item that normally links over to the SilverStripe userdocs for your version. That link is still maintained at the bottom of the list of documentation sections in the cms.

Out of the box the module will display the documentation files that have been bundled into any of your installed modules. To configure what is shown in the list of available documentation and other information on how to write documentation see the detailed documentation for the SilverStripe Documentation Viewer Module.

Configuration

There are a number of configuration options available see below for a full list:

CMSDocumentationViewer:
    append_current_doc_title: true #Whether to append the current documentation path titles to the cms title or not
    search_engine: false #Search engine to use for searching documentation this must be an implementor of ICMSUserDocsSearchEngine, if left as false then the search form is not shown. See below for more information
    skip_default_entity: false #Skip the default entity in the page title and the breadcrumbs

LuceneCMSUserDocsSearch:
    index_location: null #Location for the search index, defaults to the TEMP_FOLDER/RebuildLuceneDocsIndex

Enabling search support

You can enable search support by setting the configuration option CMSDocumentationViewer.search_engine to the built in LuceneCMSUserDocsSearch engine. If you are using the default docs search engine each time you update your documentation you must rebuild the index using dev/tasks/RebuildLuceneCMSDocsIndex. To change the location of the index you need to set the LuceneCMSUserDocsSearch.index_location configuration option to the full path to the index, by default will be in the temp folder for the site under the RebuildLuceneDocsIndex folder).

You can also build your own search engine must implement the ICMSUserDocsSearchEngine, your getSearchResults must return an array data containing the following:

  • Results: The results from the search each item must be an instance of DocumentationPage
  • Query: Term searched for
  • TotalResults: Total Number of Results
  • TotalPages: Total Number of Pages
  • ThisPage: Current Page Number
  • PrevUrl: URL for the previous page
  • NextUrl: URL for the next page
  • SearchPages: Array List of Array Data objects containing Link, Current, and PageNumber

Versions

dev-master
2016-08-02 7:38pm UTC
BSD-3-Clause

Install composer require webbuilders-group/silverstripe-cmsuserdocs dev-master

Manual Install: Download

Requires
  • silverstripe/framework: ~3.1
  • silverstripe/docsviewer: ~1.4
  • composer/installers: *
0.1.1
2016-05-04 7:43pm UTC
BSD-3-Clause

Install composer require webbuilders-group/silverstripe-cmsuserdocs 0.1.1

Manual Install: Download

Requires
  • silverstripe/framework: ~3.1
  • silverstripe/docsviewer: ~1.4
  • composer/installers: *
0.1.0
2016-04-20 5:21pm UTC
BSD-3-Clause

Install composer require webbuilders-group/silverstripe-cmsuserdocs 0.1.0

Manual Install: Download

Requires
  • silverstripe/framework: ~3.1
  • silverstripe/docsviewer: ~1.4
  • composer/installers: *