diff --git a/build.js b/build.js index 65112bf..0ff0283 100644 --- a/build.js +++ b/build.js @@ -6,6 +6,7 @@ var pagination = require('metalsmith-pagination') var paths = require('metalsmith-paths') var filemetadata = require('metalsmith-filemetadata') var matters = require('metalsmith-matters') +var postcss = require('metalsmith-postcss') var fs = require('fs'); var moment = require('moment'); @@ -126,6 +127,7 @@ metalsmith(__dirname) .use(paths(require('./config/paths'))) .use(layouts(require('./config/layouts'))) .use(copyVendor()) + .use(postcss(require('./config/postcss'))) .use(epubGen()) .destination('build') .build(function (err) { diff --git a/config/css.js b/config/css.js deleted file mode 100644 index 246d32f..0000000 --- a/config/css.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = { - files: '**/*.css', - cleanCSS: { - rebase: true - } -} diff --git a/config/pagination.js b/config/pagination.js index 6c65db5..5f77705 100644 --- a/config/pagination.js +++ b/config/pagination.js @@ -11,6 +11,7 @@ module.exports = { first: 'search.html', layout: 'search.hbs', path: 'search/:num/index.html', + filter: 'type == \'recette\'', groupBy: function(data) { return data.title.normalize('NFD').charAt(0); } diff --git a/config/postcss.js b/config/postcss.js new file mode 100644 index 0000000..632861c --- /dev/null +++ b/config/postcss.js @@ -0,0 +1,5 @@ +module.exports = { + plugins: { + 'autoprefixer': {} + } +} diff --git a/package.json b/package.json index e9e5b38..78942fb 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "0.1.0", "private": true, "dependencies": { + "autoprefixer": ">=6.5.3", "bower": ">=1.5.2", "epub-generator": ">=1.0.1", "handlebars": ">=3.0.3", @@ -16,9 +17,10 @@ "metalsmith-matters": ">=1.2.0", "metalsmith-pagination": ">=1.0.0", "metalsmith-paths": ">=2.1.2", - "metalsmith-permalinks": "^0.5.0", + "metalsmith-permalinks": ">=0.5.0", + "metalsmith-postcss": ">=4.0.0", "moment": ">=2.6.0", - "underscore": "^1.8.3" + "underscore": ">=1.8.3" }, "scripts": { "build": "node build.js", diff --git a/templates/index.hbs b/templates/index.hbs index afca41c..1b38b17 100644 --- a/templates/index.hbs +++ b/templates/index.hbs @@ -4,10 +4,10 @@ Recettes {{/ content}} - {{#content "content"}}