Shared libraries for Project Helix.
helix-fstab.yaml
: maps paths to source URLs, use this to pull content from sources other than GitHubhelix-config.yaml
: defines Strains (variants) of a Helix site, use this to create "environments", tests, or other variantshelix-query.yaml
: define what can be indexed and queried in a Helix sitehelix-markup.yaml
: define what Markdown should generate which HTML, use this to tweak the HTML output
Helix is using YAML files for configuration management, but with the HelixConfig
class, exported from @adobe/helix-shared
, you can read, validate, and access configuration files with ease:
const { HelixConfig } = require('@adobe/helix-shared');
// in an async function
const configfromyaml = new HelixConfig()
.withSource(yamlstring)
.init();
const configfromjson = new HelixConfig()
.withJSON(jsonobject)
.init();
const configfromfile = new HelixConfig()
.withDirectory('/path/to/dir') // the directory contains a `helix-config.yaml`
.init();
npm install
npm test
npm run lint