Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: metalsmith/layouts
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 72952d490a30b1a5efa86eb9878f04adc404f363
Choose a base ref
...
head repository: metalsmith/layouts
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1c547d98fae1c9d652a988b9ee6e1d73c1a59272
Choose a head ref
  • 5 commits
  • 170 files changed
  • 3 contributors

Commits on Aug 13, 2017

  1. Add custom error message to include file path (#130)

    This leads to errors like
    
    ```
    Error rendering template `content.html` for file `styleguide/text-media.html`:
     Error: Parse error on line 102:
    ...      {{#if headline)}}      <div class
    -----------------------^
    Expecting 'CLOSE', 'OPEN_SEXPR', 'ID', 'OPEN_BLOCK_PARAMS', 'STRING', 'NUMBER', 'BOOLEAN', 'UNDEFINED', 'NULL', 'DATA', got 'CLOSE_SEXPR'
    ```
    killercup authored and ismay committed Aug 13, 2017
    Copy the full SHA
    7b8bd9b View commit details

Commits on Dec 8, 2017

  1. Update after move (#136)

    ismay authored Dec 8, 2017
    Copy the full SHA
    5f83be3 View commit details

Commits on Jan 10, 2018

  1. v2 (#132)

    * Update build config
    
    * Add package-lock.json
    
    * Rename history and readme docs
    
    * Add issue template
    
    * Remove clutter and add eslint config
    
    * Remove package lock
    
    * Update travis
    
    * Add tests
    
    * Add tests
    
    * Update pattern tests
    
    * Remove metalsmith-engine-jstransformer
    
    * Add tests
    
    * Remove package-lock
    
    * Simplify render
    
    * Add coverage testing
    
    * Ignore catch for coverage
    
    * Ignore package-lock
    
    * Update tooling
    
    * Change options handling
    
    * Remove default for default option
    
    * Update npmignore
    
    * Allow default layout to be overridden
    ismay authored Jan 10, 2018
    Copy the full SHA
    4ddd399 View commit details
  2. Update dependencies to enable Greenkeeper 🌴 (#135)

    * docs(readme): add Greenkeeper badge
    
    * Update badges
    
    * Ignore airbnb base dependencies
    greenkeeper[bot] authored and ismay committed Jan 10, 2018
    Copy the full SHA
    0e434ac View commit details

Commits on Jan 11, 2018

  1. Prepare 2.0.0 (#140)

    * Bump version to 2.0.0
    
    * Update readme
    ismay authored Jan 11, 2018
    Copy the full SHA
    1c547d9 View commit details
Showing with 1,167 additions and 1,177 deletions.
  1. +6 −8 .eslintrc
  2. +7 −0 .github/ISSUE_TEMPLATE.md
  3. +13 −1 .gitignore
  4. +0 −4 .hound.yml
  5. +7 −0 .lintstagedrc
  6. +11 −0 .npmignore
  7. +6 −0 .prettierrc
  8. +18 −2 .travis.yml
  9. +43 −66 History.md → CHANGELOG.md
  10. +209 −0 README.md
  11. +0 −247 Readme.md
  12. +5 −0 lib/__snapshots__/index.test.js.snap
  13. +15 −0 lib/get-transformer.js
  14. +0 −36 lib/helpers/check.js
  15. +0 −44 lib/helpers/read-partials.js
  16. +99 −157 lib/index.js
  17. +303 −0 lib/index.test.js
  18. +38 −19 package.json
  19. +0 −3 test/.eslintrc
  20. +8 −0 test/fixtures/array-pattern/expected/also.html
  21. +1 −0 test/fixtures/array-pattern/expected/index.html
  22. +8 −0 test/fixtures/array-pattern/expected/match.html
  23. +7 −0 test/fixtures/array-pattern/layouts/standard.hbs
  24. +4 −0 test/fixtures/array-pattern/src/also.html
  25. +4 −0 test/fixtures/array-pattern/src/index.html
  26. +4 −0 test/fixtures/array-pattern/src/match.html
  27. +0 −6 test/fixtures/basic/build/index.html
  28. +0 −6 test/fixtures/basic/expected/index.html
  29. +0 −5 test/fixtures/basic/layouts/layout.html
  30. +0 −5 test/fixtures/basic/src/index.html
  31. BIN test/fixtures/binary/build/image.png
  32. BIN test/fixtures/binary/expected/image.png
  33. BIN test/fixtures/binary/src/image.png
  34. +8 −0 test/fixtures/default-layout/expected/index.html
  35. +7 −0 test/fixtures/default-layout/layouts/standard.hbs
  36. +1 −0 test/fixtures/default-layout/src/index.html
  37. +0 −3 test/fixtures/default/build/default.md
  38. +0 −2 test/fixtures/default/build/other.md
  39. +0 −3 test/fixtures/default/expected/default.md
  40. +0 −2 test/fixtures/default/expected/other.md
  41. +0 −2 test/fixtures/default/layouts/default.html
  42. +0 −1 test/fixtures/default/layouts/other.html
  43. +0 −5 test/fixtures/default/src/default.md
  44. +0 −6 test/fixtures/default/src/other.md
  45. +0 −6 test/fixtures/directory/build/index.html
  46. +7 −5 test/fixtures/directory/expected/index.html
  47. +2 −3 test/fixtures/directory/src/index.html
  48. +0 −5 test/fixtures/directory/templates/layout.html
  49. +7 −0 test/fixtures/directory/templates/standard.hbs
  50. +8 −0 test/fixtures/ignore-binary/expected/index.html
  51. BIN test/fixtures/ignore-binary/expected/picture.jpg
  52. +7 −0 test/fixtures/ignore-binary/layouts/standard.hbs
  53. +4 −0 test/fixtures/ignore-binary/src/index.html
  54. BIN test/fixtures/ignore-binary/src/picture.jpg
  55. +1 −0 test/fixtures/ignore-invalid-layout/expected/about.html
  56. +8 −0 test/fixtures/ignore-invalid-layout/expected/index.html
  57. +7 −0 test/fixtures/ignore-invalid-layout/layouts/standard
  58. +7 −0 test/fixtures/ignore-invalid-layout/layouts/standard.hbs
  59. +4 −0 test/fixtures/ignore-invalid-layout/src/about.html
  60. +4 −0 test/fixtures/ignore-invalid-layout/src/index.html
  61. +8 −0 test/fixtures/ignore-layout-without-jstransformer/expected/about.html
  62. +1 −0 test/fixtures/ignore-layout-without-jstransformer/expected/index.html
  63. +7 −0 test/fixtures/ignore-layout-without-jstransformer/layouts/standard.hbs
  64. +7 −0 test/fixtures/ignore-layout-without-jstransformer/layouts/standard.njk
  65. +4 −0 test/fixtures/ignore-layout-without-jstransformer/src/about.html
  66. +4 −0 test/fixtures/ignore-layout-without-jstransformer/src/index.html
  67. +0 −6 test/fixtures/ignore/build/layout.html
  68. +0 −1 test/fixtures/ignore/build/no-layout.html
  69. +0 −6 test/fixtures/ignore/expected/layout.html
  70. +0 −1 test/fixtures/ignore/expected/no-layout.html
  71. +0 −5 test/fixtures/ignore/layouts/layout.html
  72. +0 −4 test/fixtures/ignore/src/layout.html
  73. +0 −1 test/fixtures/ignore/src/no-layout.html
  74. +0 −4 test/fixtures/include/build/index.html
  75. +0 −4 test/fixtures/include/expected/index.html
  76. +0 −1 test/fixtures/include/layouts/includes/include.html
  77. +0 −2 test/fixtures/include/layouts/layout.html
  78. +0 −4 test/fixtures/include/src/index.html
  79. +1 −0 test/fixtures/invalid-pattern/src/index.html
  80. +0 −1 test/fixtures/layout-false/build/layout-false.html
  81. +0 −1 test/fixtures/layout-false/expected/layout-false.html
  82. +0 −2 test/fixtures/layout-false/layouts/default.html
  83. +0 −5 test/fixtures/layout-false/src/layout-false.html
  84. +0 −9 test/fixtures/metadata/build/one.html
  85. +0 −9 test/fixtures/metadata/build/two.html
  86. +9 −0 test/fixtures/metadata/expected/index.html
  87. +0 −9 test/fixtures/metadata/expected/one.html
  88. +0 −9 test/fixtures/metadata/expected/two.html
  89. +0 −8 test/fixtures/metadata/layouts/layout.html
  90. +8 −0 test/fixtures/metadata/layouts/standard.hbs
  91. +4 −0 test/fixtures/metadata/src/index.html
  92. +0 −6 test/fixtures/metadata/src/one.html
  93. +0 −5 test/fixtures/metadata/src/two.html
  94. +10 −0 test/fixtures/multiple-files-and-layouts/expected/about.html
  95. +10 −0 test/fixtures/multiple-files-and-layouts/expected/index.html
  96. +9 −0 test/fixtures/multiple-files-and-layouts/layouts/other.hbs
  97. +9 −0 test/fixtures/multiple-files-and-layouts/layouts/standard.hbs
  98. +4 −0 test/fixtures/multiple-files-and-layouts/src/about.html
  99. +4 −0 test/fixtures/multiple-files-and-layouts/src/index.html
  100. +8 −0 test/fixtures/multiple-files/expected/about.html
  101. +8 −0 test/fixtures/multiple-files/expected/index.html
  102. +7 −0 test/fixtures/multiple-files/layouts/standard.hbs
  103. +4 −0 test/fixtures/multiple-files/src/about.html
  104. +4 −0 test/fixtures/multiple-files/src/index.html
  105. +1 −0 test/fixtures/no-files/src/index.html
  106. +10 −0 test/fixtures/override-default-layout/expected/index.html
  107. +9 −0 test/fixtures/override-default-layout/layouts/override.hbs
  108. +7 −0 test/fixtures/override-default-layout/layouts/standard.hbs
  109. +4 −0 test/fixtures/override-default-layout/src/index.html
  110. +8 −0 test/fixtures/override-default/expected/about.html
  111. +1 −0 test/fixtures/override-default/expected/index.html
  112. +7 −0 test/fixtures/override-default/layouts/standard.hbs
  113. +1 −0 test/fixtures/override-default/src/about.html
  114. +4 −0 test/fixtures/override-default/src/index.html
  115. +9 −0 test/fixtures/override-metadata/expected/index.html
  116. +8 −0 test/fixtures/override-metadata/layouts/standard.hbs
  117. +5 −0 test/fixtures/override-metadata/src/index.html
  118. +0 −3 test/fixtures/partials-multiple/build/index.html
  119. +0 −3 test/fixtures/partials-multiple/expected/index.html
  120. +0 −2 test/fixtures/partials-multiple/layouts/layout.html
  121. +0 −1 test/fixtures/partials-multiple/layouts/partials/nav.html
  122. +0 −4 test/fixtures/partials-multiple/src/index.html
  123. +0 −4 test/fixtures/partials-option/build/index.html
  124. +0 −4 test/fixtures/partials-option/expected/index.html
  125. +0 −3 test/fixtures/partials-option/layouts/layout.html
  126. +0 −1 test/fixtures/partials-option/partials/header.html
  127. +0 −1 test/fixtures/partials-option/partials/nested/footer.html
  128. +0 −4 test/fixtures/partials-option/src/index.html
  129. +0 −3 test/fixtures/partials-partialExtension/build/index.html
  130. +0 −3 test/fixtures/partials-partialExtension/expected/index.html
  131. +0 −2 test/fixtures/partials-partialExtension/layouts/layout.html
  132. +0 −1 test/fixtures/partials-partialExtension/layouts/partials/nested/nav.config.yaml
  133. +0 −1 test/fixtures/partials-partialExtension/layouts/partials/nested/nav.html
  134. +0 −4 test/fixtures/partials-partialExtension/src/index.html
  135. +0 −3 test/fixtures/partials-subdirectories/build/index.html
  136. +0 −3 test/fixtures/partials-subdirectories/expected/index.html
  137. +0 −2 test/fixtures/partials-subdirectories/layouts/layout.html
  138. +0 −1 test/fixtures/partials-subdirectories/layouts/partials/nested/nav.html
  139. +0 −4 test/fixtures/partials-subdirectories/src/index.html
  140. +0 −2 test/fixtures/pattern/build/index.html
  141. +0 −3 test/fixtures/pattern/build/index.md
  142. +0 −2 test/fixtures/pattern/expected/index.html
  143. +0 −3 test/fixtures/pattern/expected/index.md
  144. +0 −2 test/fixtures/pattern/layouts/layout.html
  145. +0 −6 test/fixtures/pattern/src/index.html
  146. +0 −6 test/fixtures/pattern/src/index.md
  147. +0 −7 test/fixtures/rename-option-default/build/index.hbs
  148. +0 −7 test/fixtures/rename-option-default/expected/index.hbs
  149. +0 −5 test/fixtures/rename-option-default/layouts/layout.hbs
  150. +0 −5 test/fixtures/rename-option-default/src/index.hbs
  151. +0 −7 test/fixtures/rename-option-nested/build/folder/index.html
  152. +0 −7 test/fixtures/rename-option-nested/expected/folder/index.html
  153. +0 −5 test/fixtures/rename-option-nested/layouts/layout.hbs
  154. +0 −5 test/fixtures/rename-option-nested/src/folder/index.hbs
  155. +0 −7 test/fixtures/rename-option/build/index.html
  156. +0 −7 test/fixtures/rename-option/expected/index.html
  157. +0 −5 test/fixtures/rename-option/layouts/layout.hbs
  158. +0 −5 test/fixtures/rename-option/src/index.hbs
  159. +8 −0 test/fixtures/single-file/expected/index.html
  160. +7 −0 test/fixtures/single-file/layouts/standard.hbs
  161. +4 −0 test/fixtures/single-file/src/index.html
  162. +1 −0 test/fixtures/string-pattern/expected/index.html
  163. +8 −0 test/fixtures/string-pattern/expected/match.html
  164. +7 −0 test/fixtures/string-pattern/layouts/standard.hbs
  165. +4 −0 test/fixtures/string-pattern/src/index.html
  166. +4 −0 test/fixtures/string-pattern/src/match.html
  167. +9 −0 test/fixtures/variables/expected/index.html
  168. +8 −0 test/fixtures/variables/layouts/standard.hbs
  169. +5 −0 test/fixtures/variables/src/index.html
  170. +0 −269 test/index.js
14 changes: 6 additions & 8 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
env:
node: true
rules:
indent: [2, 2]
linebreak-style: 2
no-irregular-whitespace: 2
no-trailing-spaces: 2
quotes: [2, "single", "avoid-escape"]
{
"extends": ["airbnb-base", "prettier"],
"env": {
"node": true
}
}
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## Before opening an issue

* The issues aren't meant for support requests but for reporting bugs and feature requests. If you
have a support request then please use: http://metalsmith-slack.herokuapp.com/ or http://stackoverflow.com/questions/tagged/metalsmith

* If you're reporting a bug, please open either a pull request with a failing test demonstrating the
problem, or include a link to a repository with a reduced test case demonstrating the problem.
14 changes: 13 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,14 @@
# Node
node_modules
debug.log
npm-debug.log
yarn-error.log
package-lock.json

# Test build results
test/fixtures/*/build

# Babel build results
dist

# Coverage reports
/coverage
4 changes: 0 additions & 4 deletions .hound.yml

This file was deleted.

7 changes: 7 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"lib/**/*.js": [
"prettier --write",
"git add",
"eslint"
]
}
11 changes: 11 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Dotfiles
.editorconfig
.eslintrc
.gitattributes
.gitignore
.lintstagedrc
.prettierrc
.travis.yml

# Tests
/test
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"printWidth": 100,
"useTabs": false,
"singleQuote": true,
"tabWidth": 2
}
20 changes: 18 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
sudo: false
language: node_js
cache:
directories:
- node_modules
notifications:
email: false
node_js:
- "node"
- "6"
- "8"
jobs:
include:
- stage: coverage
node_js: "8"
script:
- npm run test:coverage
- stage: lint
node_js: "8"
script:
- npm run lint:prettier
- npm run lint:js
109 changes: 43 additions & 66 deletions History.md → CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,145 +1,122 @@
1.8.1 - April 20, 2017
----------------------
### 2.0.0 - January 10, 2018
* moved to jstransformers (and dropped consolidate)
* breaking: dropped node 0.12 and node 4 support
* breaking: removed options:
* `engine`: inferred automatically from the layout extension by jstransformer
* `partials`: use metalsmith-register-partials instead
* `partialExtension`: no longer necessary
* `rename`: use metalsmith-rename instead
* `exposeConsolidate`: no longer necessary

### 1.8.1 - April 20, 2017
* fix "too many opened files" error

1.8.0 - February 3, 2017
------------------------
### 1.8.0 - February 3, 2017
* add partialExtension option, to fix partials matching on the wrong extension

1.7.0 - November 6, 2016
-------------------
### 1.7.0 - November 6, 2016
* expose consolidate.requires fix (#18)
* check if paths are already absolute before joining the metalsmith path

1.6.5 - May 3, 2016
-------------------
### 1.6.5 - May 3, 2016
* normalize partial name for windows

1.6.4 - February 22, 2016
-------------------------
### 1.6.4 - February 22, 2016
* allow layout: false to override default template

1.5.4 - February 14, 2016
-------------------------
### 1.5.4 - February 14, 2016
* add rename option
* prevent path issue on windows

1.4.4 - January 27, 2016
------------------------
### 1.4.4 - January 27, 2016
* update lodash.omit

1.4.3 - January 27, 2016
------------------------
### 1.4.3 - January 27, 2016
* update consolidate

1.4.2 - October 17, 2015
------------------------
### 1.4.2 - October 17, 2015
* update fs-readdir-recursive

1.4.1 - September 19, 2015
--------------------------
### 1.4.1 - September 19, 2015
* move check for unspecified layout, #41
* update devdependencies

1.4.0 - August 14, 2015
-----------------------
### 1.4.0 - August 14, 2015
* ignore files with unspecified layout
* update readme

1.3.1 - August 8, 2015
----------------------
### 1.3.1 - August 8, 2015
* improve error message for unspecified layout
* update readme

1.3.0 - August 7, 2015
----------------------
### 1.3.0 - August 7, 2015
* add swig include test
* code style, dependency and readme updates
* add partials option and test

1.2.1 - July 25, 2015
---------------------
### 1.2.1 - July 25, 2015
* add error handling
* add test for partials

1.2.0 - July 25, 2015
---------------------
### 1.2.0 - July 25, 2015
* ignore binary files
* add dotfiles
* update readme

1.1.0 - July 19, 2015
---------------------
### 1.1.0 - July 19, 2015
* update dependencies and devDependencies

1.0.1 - July 16, 2015
---------------------
### 1.0.1 - July 16, 2015
* update tests and add Travis CI

1.0.0 - November 18, 2014
-------------------------
### 1.0.0 - November 18, 2014
* remove `inPlace` option
* use `layout` instead of `template` in the front-matter to specify a layout
* set default folder for layouts to `layouts` instead of `templates`

0.6.0 - October 3, 2014
-----------------------
### 0.6.0 - October 3, 2014
* fix to use `path` for metalsmith `1.0.0`

0.5.2 - July 9, 2014
--------------------
### 0.5.2 - July 9, 2014
* fix breaking binary files

0.5.1 - June 11, 2014
---------------------
### 0.5.1 - June 11, 2014
* fix race condition with stringify file contents

0.5.0 - April 29, 2014
----------------------
### 0.5.0 - April 29, 2014
* pass in options to consolidate.js

0.4.0 - April 2, 2014
---------------------
### 0.4.0 - April 2, 2014
* add `default` option

0.3.0 - March 10, 2014
----------------------
### 0.3.0 - March 10, 2014
* add `inPlace` option
* change `pattern` option to just filter

0.2.1 - March 10, 2014
----------------------
### 0.2.1 - March 10, 2014
* fix bug in matching pattern logic

0.2.0 - March 8, 2014
---------------------
### 0.2.0 - March 8, 2014
* add rendering files in place with a `pattern`

0.1.0 - March 5, 2014
---------------------
### 0.1.0 - March 5, 2014
* add `string` engine convenience

0.0.6 - February 7, 2014
------------------------
### 0.0.6 - February 7, 2014
* fix `directory` option bug

0.0.5 - February 7, 2014
------------------------
### 0.0.5 - February 7, 2014
* stringify `contents` on the original file data

0.0.4 - February 6, 2014
------------------------
### 0.0.4 - February 6, 2014
* switch to `extend` from `defaults` to avoid cloning
* add debug statements

0.0.3 - February 6, 2014
------------------------
### 0.0.3 - February 6, 2014
* fix to use buffers

0.0.2 - February 5, 2014
------------------------
### 0.0.2 - February 5, 2014
* mix in metadata

0.0.1 - February 4, 2014
------------------------
### 0.0.1 - February 4, 2014
:sparkles:
Loading