Skip to content

Commit

Permalink
fix: persist DNS between push
Browse files Browse the repository at this point in the history
  • Loading branch information
blackheaven committed Jan 15, 2024
1 parent 5a08316 commit 9501790
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,15 @@ exports.watchHandlebarTemplates = () =>
exports.buildPages = async () => {
const withTemplate = (src) => handlebars.compile(fsExtra.readFileSync('templates/' + src, 'utf8'));
const baseOf = withTemplate("baseof.html");
const withBody = (target, body) => {
const writeRaw = (target, body) => {
const dest = destDir + target;
fsExtra.ensureDirSync(path.dirname(dest));
fsExtra.writeFileSync(dest, baseOf({content: body}));
fsExtra.writeFileSync(dest, body);
};
const page = (src, target, args) => withBody(target, withTemplate(src)(args));
const writeWithBody = (target, body) => {
writeRaw(target, baseOf({content: body}));
};
const page = (src, target, args) => writeWithBody(target, withTemplate(src)(args));
const defaultImage = (x) => {
if (!x.image) {
x.image = x.key + ".png";
Expand All @@ -87,6 +90,7 @@ exports.buildPages = async () => {
.map(addDetailKey)
;

writeRaw('CNAME', 'www.lyontechhub.org');
page('index.html', 'index.html', {});
page('about.html', 'about/index.html', {});
page('calendar.html', 'calendar/index.html', {});
Expand Down

0 comments on commit 9501790

Please sign in to comment.