diff --git a/dataops b/dataops index 290dde602d4..395d6c4c06c 160000 --- a/dataops +++ b/dataops @@ -1 +1 @@ -Subproject commit 290dde602d405a54f6fde4356ba7116f86bdd535 +Subproject commit 395d6c4c06c2298315164a102e439bc49209a499 diff --git a/package-lock.json b/package-lock.json index fe81ab04a5b..5373541de62 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,7 @@ "nprogress": "^0.2.0", "react": "^16.14.0", "react-dom": "^16.14.0", - "sitemap": "^6.3.5" + "sitemap": "^6.4.0" }, "devDependencies": { "babel-plugin-inline-react-svg": "^1.1.1", @@ -1708,9 +1708,9 @@ "integrity": "sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw==" }, "node_modules/@types/node": { - "version": "14.14.20", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.20.tgz", - "integrity": "sha512-Y93R97Ouif9JEOWPIUyU+eyIdyRqQR0I8Ez1dzku4hDx34NWh4HbtIc3WNzwB1Y9ULvNGeu5B8h8bVL5cAk4/A==" + "version": "14.14.35", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.35.tgz", + "integrity": "sha512-Lt+wj8NVPx0zUmUwumiVXapmaLUcAk3yPuHCFVXras9k5VT9TdhJqKqGVUQCD60OTMCl0qxJ57OiTL0Mic3Iag==" }, "node_modules/@types/prop-types": { "version": "15.7.3", @@ -2722,7 +2722,6 @@ "anymatch": "^2.0.0", "async-each": "^1.0.1", "braces": "^2.3.2", - "fsevents": "^1.2.7", "glob-parent": "^3.1.0", "inherits": "^2.0.3", "is-binary-path": "^1.0.0", @@ -4236,7 +4235,6 @@ "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-2.9.4.tgz", "integrity": "sha512-Bvgdwpu5UO6VnEEwenJEmnGeo9ILRRWh9f3iIX+71NiM5X60Qi6KlkBFGZc9DGbdIUAn0AYgaxVhTKL39OOYng==", "dependencies": { - "@emotion/is-prop-valid": "^0.8.2", "framesync": "^4.1.0", "hey-listen": "^1.0.8", "popmotion": "9.0.0-rc.20", @@ -7212,11 +7210,11 @@ "dev": true }, "node_modules/sitemap": { - "version": "6.3.5", - "resolved": "https://registry.npmjs.org/sitemap/-/sitemap-6.3.5.tgz", - "integrity": "sha512-uLz8c5nI31bd4/+nccVWhJx18JxLF+1bAKhhxMv0IYKClSK8wWtANKsl9FOluqmz37ObeBLGVVgNOpg3r+yz/g==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/sitemap/-/sitemap-6.4.0.tgz", + "integrity": "sha512-DoPKNc2/apQZTUnfiOONWctwq7s6dZVspxAZe2VPMNtoqNq7HgXRvlRnbIpKjf+8+piQdWncwcy+YhhTGY5USQ==", "dependencies": { - "@types/node": "^14.14.14", + "@types/node": "^14.14.28", "@types/sax": "^1.2.1", "arg": "^5.0.0", "sax": "^1.2.4" @@ -8774,10 +8772,8 @@ "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.7.5.tgz", "integrity": "sha512-9P3MWk6SrKjHsGkLT2KHXdQ/9SNkyoJbabxnKOoJepsvJjJG8uYTR3yTPxPQvNDI3w4Nz1xnE0TLHK4RIVe/MQ==", "dependencies": { - "chokidar": "^3.4.1", "graceful-fs": "^4.1.2", - "neo-async": "^2.5.0", - "watchpack-chokidar2": "^2.0.1" + "neo-async": "^2.5.0" }, "optionalDependencies": { "chokidar": "^3.4.1", @@ -10495,9 +10491,9 @@ "integrity": "sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw==" }, "@types/node": { - "version": "14.14.20", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.20.tgz", - "integrity": "sha512-Y93R97Ouif9JEOWPIUyU+eyIdyRqQR0I8Ez1dzku4hDx34NWh4HbtIc3WNzwB1Y9ULvNGeu5B8h8bVL5cAk4/A==" + "version": "14.14.35", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.35.tgz", + "integrity": "sha512-Lt+wj8NVPx0zUmUwumiVXapmaLUcAk3yPuHCFVXras9k5VT9TdhJqKqGVUQCD60OTMCl0qxJ57OiTL0Mic3Iag==" }, "@types/prop-types": { "version": "15.7.3", @@ -15162,11 +15158,11 @@ "dev": true }, "sitemap": { - "version": "6.3.5", - "resolved": "https://registry.npmjs.org/sitemap/-/sitemap-6.3.5.tgz", - "integrity": "sha512-uLz8c5nI31bd4/+nccVWhJx18JxLF+1bAKhhxMv0IYKClSK8wWtANKsl9FOluqmz37ObeBLGVVgNOpg3r+yz/g==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/sitemap/-/sitemap-6.4.0.tgz", + "integrity": "sha512-DoPKNc2/apQZTUnfiOONWctwq7s6dZVspxAZe2VPMNtoqNq7HgXRvlRnbIpKjf+8+piQdWncwcy+YhhTGY5USQ==", "requires": { - "@types/node": "^14.14.14", + "@types/node": "^14.14.28", "@types/sax": "^1.2.1", "arg": "^5.0.0", "sax": "^1.2.4" diff --git a/package.json b/package.json index 01939fd87dc..c32801a89cd 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "nprogress": "^0.2.0", "react": "^16.14.0", "react-dom": "^16.14.0", - "sitemap": "^6.3.5" + "sitemap": "^6.4.0" }, "devDependencies": { "babel-plugin-inline-react-svg": "^1.1.1", diff --git a/update.sh b/update.sh new file mode 100644 index 00000000000..decde4ab7fc --- /dev/null +++ b/update.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +# this script updates the data behind the co2birth.date site +# takes some time to build all the pages +# and may heat up your computer + +# refresh data +# https://github.com/co2birthdate/dataops +git submodule foreach git pull origin master + +# install node packages +npm i + +# generate indidvidual pages, based on date +npm run export + +# generate sitemap +npm install --save sitemap +echo "https://co2birth.date" > listofurls.txt && \ + find out/co2 -name "*.html" -maxdepth 1 -type f | \ + sed 's/out/https:\/\/co2birth.date/g' >> listofurls.txt && \ + npx sitemap --index-base-url https://co2birth.date < listofurls.txt > out/sitemap.xml && \ + rm -f listofurls.txt && gzip -f out/sitemap.xml + +# deploy site to github "pages" branch +npm run deploy \ No newline at end of file