refactor: add sass, minify HTML, remove i18n

This commit is contained in:
2022-10-20 16:10:47 +02:00
parent d211e28aa5
commit 8c0034d325
40 changed files with 405 additions and 197 deletions

21
src/_data/cacheBust.js Normal file
View File

@@ -0,0 +1,21 @@
const md5File = require('md5-file');
const cacheBust = () => {
// A "map" of files to cache bust
const files = {
mainCss: './src/compiled-assets/main.css',
// mainJs: './src/compiled-assets/main.js',
// vendorJs: './src/compiled-assets/vendor.js',
};
return Object.entries(files).reduce((acc, [key, path]) => {
const now = Date.now();
const bust = process.env.ELEVENTY_ENV === 'production' ? md5File.sync(path, (_err, hash) => hash) : now;
acc[key] = bust;
return acc;
}, {});
};
module.exports = cacheBust;

6
src/_data/metadata.json Normal file
View File

@@ -0,0 +1,6 @@
{
"title": "Blog IT's on us",
"url": "https://blog.itsonus.fr/",
"language": "fr",
"description": "Blog traitant de numérique responsable"
}