Integration Methods

The jsHarmony CMS can be integrated into Client-side JS applications in a variety of ways.  Capabilities will vary based on the integration method:

Integration Method Pages Generated As Add Pages Add Media Add Redirects Add Page URLs outside Content Folder Single-Page / SPA
Simple Content Folder HTML
Router - Page Object JSON
Standalone JSON N/A N/A

 

Simple Content Folder
  • Generate static HTML pages in a subfolder of the site, based on static HTML templates.
  • Work Involved: Very Easy - no SDK required

    View Integration Tutorial

Router - Page Object
  • Generate a JSON object for each page
  • Includes a Router to enable:
    • Loading the JSON object and rendering it in a server-side template
    • Page URLs anywhere in the site
    • Redirects defined in CMS
  • Work Involved: Easy to Medium, based on site complexity

    View Integration Tutorial

Standalone
  • Add CMS content to an existing page in the site
  • Generate a JSON object for that page on publish
  • On page view:
    • Load the JSON object and render it in the server-side template
  • Work Involved: Easy to Medium, based on site complexity

    View Integration Tutorial


Redirect Regular Expression Syntax

The syntax for Redirect regular expressions is specific to the deployment environment.  The Client-side Native JS SDK uses JavaScript Regular Expression syntax.

Back-references are implemented using $N.  For example, "$1" replaces the first matched group, "$2" replaces the second matched group, and so on.

Below is an example of RegEx variable replacement, using the Client-side Native JS SDK:

URL:         ^/products/([a-zA-Z]*)$
Destination: /view_product?id=$1

 

SDK Documentation

Explore the SDK Documentation and source code at the Github site: jsharmony-cms-sdk-clientjs.

 

Loading
Loading