// Page title utils.fs.get('dist/index.html?title'); // Page html lang attribute utils.fs.get('dist/index.html?lang'); // Canonical URL utils.fs.get('dist/index.html?canonical');
// Meta tag values utils.fs.get('dist/index.html?meta.og:description');
// JSON-LD data (always in an array) utils.fs.get('dist/index.html?jsonLd[0].headline'); utils.fs.get('dist/index.html?jsonLd[1].@type');
Get data from a local file.
Like lodash.get but for data held in JSON, YAML and HTML files.
Example
HTML files
HTML files return specially structured data, including the page's title, lang and canonical URL as well as meta tag values and json+ld data.
Example