Skip to content

Latest commit

 

History

History
76 lines (48 loc) · 3.07 KB

README.md

File metadata and controls

76 lines (48 loc) · 3.07 KB

templating

License GitHub release exist-db CI Coverage percentage

eXist HTML Templating Library

This repository hosts the HTML templating library for eXist, which was previously part of the shared-resources package. shared-resources is now deprecated and users should upgrade their code. The new package intends to be backwards compatible: the namespace URI of the module has changed to avoid conflicts, but existing template functions will continue to work.

Upgrading from shared-resources

  1. change any dependency on shared-resources in your expath-pkg.xml to point to this package:

    <dependency package="http://exist-db.org/html-templating" semver-min="1.0.0"/>
  2. update the module URI for any imports of the templating module:

    import module namespace templates="http://exist-db.org/xquery/html-templating";

Requirements

  • exist-db version: 5.2.0 or greater

  • node version: 12.x (for building from source)

Installation

  1. Install the eXist-db HTML Templating Library package from eXist's package repository via the dashboard, or download the templating-1.0.0.xar file from GitHub releases page.

  2. Open the dashboard of your eXist-db instance and click on package manager.

    1. Click on the add package symbol in the upper left corner and select the .xar file you just downloaded.
  3. You have successfully installed templating into exist.

Building from source

  1. Download, fork or clone this GitHub repository
  2. Calling npm start in your CLI will install required dependencies from npm and create a .xar:
cd templating
npm start

To install it, follow the instructions above.

Running Tests

This app uses mochajs as a test-runner. To run the tests type:

npm test

This will automatically build and install the library plus a test application into your local eXist, assuming it can be reached on http://localhost:8080/exist. If this is not the case, edit .existdb.json and change the properties for the localhost server to match your setup.

Contributing

You can take a look at the Contribution guidelines for this project

License

LGPL-3.0 © eXist-db Project