diff --git a/_build.js b/_build.js index ecae612..aa5d4bf 100644 --- a/_build.js +++ b/_build.js @@ -3,12 +3,13 @@ const os = require('os'); const path = require('path'); const fs = require('fs-extra'); +const moment = require('moment'); const YAML = require('yaml'); // A hacky sort of "class" to contain methods for each section const BUILD_SECTION = { // TODO: Make more of these YAML-based functions - header: () => readFile('md/_header.md'), + header: () => readFile('md/_header.md').replace('{{DATE}}', moment().format('MMMM Do YYYY @h:mm a').replace(/ /g, '%20')), index: () => readFile('md/_index.md'), contributing: () => readFile('md/_contributing.md'), browserExtensions: () => generateBrowserExtensions(), diff --git a/md/_header.md b/md/_header.md index 1ad9bc5..c78e6d9 100644 --- a/md/_header.md +++ b/md/_header.md @@ -12,10 +12,12 @@ -# Cutting Google out of your life *(Updated: May 2020)* +# Cutting Google out of your life ### *I don't have anything to hide, but I don't have anything to show you either.* +![Updated](https://img.shields.io/static/v1?label=updated&message={{DATE}}&color=388E3C&style=flat-square) + ![GitHub](https://img.shields.io/github/license/tycrek/degoogle?style=flat-square) ![GitHub stars](https://img.shields.io/github/stars/tycrek/degoogle?style=flat-square) ![GitHub issues](https://img.shields.io/github/issues/tycrek/degoogle?style=flat-square) diff --git a/package-lock.json b/package-lock.json index ee8e662..cc6a0e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -34,6 +34,11 @@ "universalify": "^1.0.0" } }, + "moment": { + "version": "2.26.0", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.26.0.tgz", + "integrity": "sha512-oIixUO+OamkUkwjhAVE18rAMfRJNsNe/Stid/gwHSOfHrOtw9EhAY2AHvdKZ/k/MggcYELFCJz/Sn2pL8b8JMw==" + }, "universalify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-1.0.0.tgz", diff --git a/package.json b/package.json index 9863051..c2a9eb8 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "homepage": "https://github.com/tycrek/degoogle#readme", "dependencies": { "fs-extra": "^9.0.0", + "moment": "^2.26.0", "yaml": "^1.10.0" } }