Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Helix Shared

Shared libraries for Project Helix.

Status

NPM Version codecov CircleCI GitHub license GitHub issues LGTM Code Quality Grade: JavaScript Known Vulnerabilities

Helix Configuration Files

  • helix-fstab.yaml: maps paths to source URLs, use this to pull content from sources other than GitHub
  • helix-config.yaml: defines Strains (variants) of a Helix site, use this to create "environments", tests, or other variants
  • helix-query.yaml: define what can be indexed and queried in a Helix site
  • helix-markup.yaml: define what Markdown should generate which HTML, use this to tweak the HTML output

Usage

Using HelixConfig to read Helix configuration files

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();

Using sequence, functional, and op for functional programming

Development

Build

npm install

Test

npm test

Lint

npm run lint
You can’t perform that action at this time.