Skip to content

Commit

Permalink
Add use of .js files in the data option to the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
gakimball committed Apr 1, 2016
1 parent 61eda02 commit f110fe4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ module.exports = function(text) {

Path to a folder containing external data, which will be passed in to every page. Data can be formatted as JSON (`.json`) or YAML (`.yml`). Within a template, the data is stored within a variable with the same name as the file it came from.

Data can also be a `.js` file with a `module.exports`. The data returned by the export function will be used.

Data can also be inserted into the page itself with a Front Matter template at the top of the file.

Lastly, the reserved `page` variable is added to every page template as it renders. It contains the name of the page being rendered, without the extension.
Expand Down

0 comments on commit f110fe4

Please sign in to comment.