Git Product home page Git Product logo

webbuilders-group-silverstripe-cmsuserdocs's Introduction

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

webbuilders-group-silverstripe-cmsuserdocs's People

Contributors

undefinedoffset avatar

Watchers

James Cloos avatar helpfulrobot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.