1
0
Fork 0
mirror of https://github.com/dilllxd/gitfolio.git synced 2024-08-14 22:28:09 +00:00
gitfolio/update.js
imfunny 14fdafebe4
added commits by @DonIsaac & @Chargnn
* Created site files are now placed in an output directory `dist`
* Added a ton of comments in build.js
* Made functions in build.js use bluebird promises
* Themes are now in the assets/templates folder instead as magic
strings in the source code
* Any number of custom themes (not just light and dark) can be used by creating
a [theme].css file and putting it in assets/themes
* CSS themes are rendered with Handlebars
* CSS themes now rely on Handlebars for specifying the background 
* Restored config.json to template file
* Changes to the blogging 
* Moved blog templates and config files to assets/blog
* Created blog pages now go to dist/blog/
* Updated blogTemplate
* Updated the README to reflect the changes made by this pull request
* Added link to demo site in README
* Added sorting and ordering
2019-05-20 14:47:39 +05:30

13 lines
No EOL
425 B
JavaScript

const fs = require('fs');
const {updateHTML} = require('./populate');
fs.readFile("./dist/config.json", function (err , data) {
if (err) throw err;
data = JSON.parse(data);
var username = data[0].username;
if(!username || username == null){
console.log("username not found in config.json, please run build command before using update");
return;
}
updateHTML(username);
});