articles-adapter-pluxml
Adapter to get informations from a pluXml cms
Install
npm install articles-adapter-pluxml
Usage
Instantiation with a local directory
const PluXmlAdapter = adapter = "/var/www/pluxml";
Getting all articles ids as an array of string
adapterarticles;
Getting article by id
adapterarticles;
Url rewriting
Url rewriting setting use sprintf syntax with the following arguments :
With an article having the following properties :
id:"0001"slug:"article-slug"
The following code rewrite url to http://example.com/1-article-slug.html
const adapter = storage:"/var/www/pluxml" rewriteRule:"http://example.com/%d-%s.html";adapterarticles;