sachinsancheti1 / json-yaml-front-matter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Create yaml files from a json array for Eleventy

This repo helps you create markdown/nunjuncks template files with relevant headers and other data for use in the paging layouts and include templates

Instructions

  1. Clone repo
  2. Run `cd js-yaml-front-matter` or bash into the repo downloaded
  3. Run `npm install` to install all node modules
  4. Ensure the `_site/_data` being the data source is in place
  5. Then run `node templateMaker/js-yaml-script.js` to generate the files under the folder here `houses-for-sale`. I have made the run only for the first element in the array - see line number 7 in `templateMaker/js-yaml-script.js`
  6. Run the build command `eleventy --serve` if you have installed eleventy globally to convert the files into a `dist` folder

About

License:MIT License


Languages

Language:JavaScript 67.0%Language:CSS 17.5%Language:Nunjucks 6.6%Language:SCSS 4.6%Language:Less 4.2%Language:Ruby 0.1%