From 2e934e88427eea31eee85538a721365016cd5786 Mon Sep 17 00:00:00 2001 From: Ian Date: Wed, 15 Nov 2023 12:42:33 -0800 Subject: [PATCH 01/37] Move blog file. Redirect .html pages. --- _websrc/gulp_tasks/master/build.js | 14 ++++++++++++++ assets/_src/js/master/core.js | 4 ++++ 2 files changed, 18 insertions(+) diff --git a/_websrc/gulp_tasks/master/build.js b/_websrc/gulp_tasks/master/build.js index b1d913727..09c741826 100644 --- a/_websrc/gulp_tasks/master/build.js +++ b/_websrc/gulp_tasks/master/build.js @@ -45,6 +45,7 @@ gulp.task('jekyll-build', async () => { await tools.poll(() => Global.get('prefillStatus') === 'done', { timeout: 120000 }); // Other build tasks + // This part takes a while... await tools.poll(() => areTasksCompleted(), { timeout: 1000 * 60 * 3 }); await tools.poll(() => { @@ -105,6 +106,10 @@ gulp.task('jekyll-build', async () => { // Run Jekyll Build await tools.execute(`${jekyll} build --config ${jekyllConfig} --incremental`); + + // Jekyll post-build + await postBuild(); + return Promise.resolve(); }); @@ -179,3 +184,12 @@ async function getGitInfo() { }); }); } + +function postBuild() { + return new Promise(function(resolve, reject) { + // Move _site/blog/index.html to blog.html + fs.move('_site/blog/index.html', '_site/blog.html'); + + return resolve(); + }); +} diff --git a/assets/_src/js/master/core.js b/assets/_src/js/master/core.js index b287b367a..d93d756f4 100755 --- a/assets/_src/js/master/core.js +++ b/assets/_src/js/master/core.js @@ -10,6 +10,9 @@ if (url.includes('/pricing')) { dom.loadScript({src: 'https://cdn.itwcreativeworks.com/assets/general/js/download-page-handler/index.js'}) } else if (url.includes('/browser-extension') || url.includes('/extension')) { dom.loadScript({src: 'https://cdn.itwcreativeworks.com/assets/general/js/browser-extension-page-handler/index.js'}) +} else if (window.location.pathname.endsWith('.html')) { + // Redirect and remove .html + return window.location.pathname = window.location.pathname.replace('.html', ''); } // Load Slapform @@ -40,6 +43,7 @@ if (auth && auth.uid && auth.email) { setupTracking(auth); } +// Save user auth data Manager.auth().ready(function (user) { setupTracking(user); From d073dd81d41f2ebc1dac46e62082692bd18840ea Mon Sep 17 00:00:00 2001 From: Ian Date: Wed, 15 Nov 2023 12:53:47 -0800 Subject: [PATCH 02/37] Remove pst timestamp --- .github/workflows/build.yml | 12 ++++-------- _websrc/gulp_tasks/master/build.js | 3 +-- _websrc/templates/master/output/build/build.json | 6 ++---- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 74aa1bb18..a955373a1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -53,20 +53,16 @@ jobs: - name: Create build.json run: | export TZ=UTC date - timestamp_utc=$(date +%FT%TZ) - export TZ=America/Los_Angeles date - timestamp_pst=$(date +%FT%TZ) + timestamp=$(date +%FT%TZ) temp_build_json=$(cat @output/build/build.json) echo account: $GITHUB_ACTOR echo repo: $GITHUB_REPOSITORY - echo timestamp_utc: $timestamp_utc - echo timestamp_pst: $timestamp_pst + echo timestamp: $timestamp echo build.json: $temp_build_json build_log_path="@output/build/build.json" - sed "s/%TIMESTAMP_UTC_GHP%/$timestamp_utc/g" $build_log_path > "$build_log_path"-temp && mv "$build_log_path"-temp $build_log_path - sed "s/%TIMESTAMP_PST_GHP%/$timestamp_pst/g" $build_log_path > "$build_log_path"-temp && mv "$build_log_path"-temp $build_log_path + sed "s/%GHP_TIMESTAMP%/$timestamp/g" $build_log_path > "$build_log_path"-temp && mv "$build_log_path"-temp $build_log_path sed -n '1h;1!H;${;g;s/GEN>>>.*<</g;p;}' .gitignore > .gitignore - name: Build Jekyll @@ -79,4 +75,4 @@ jobs: uses: kolpav/purge-artifacts-action@v1 with: token: ${{ secrets.GH_TOKEN }} - expire-in: 0 # Set this to 0 to delete all artifacts + expire-in: 0 # Set this to 0 to delete all artifacts diff --git a/_websrc/gulp_tasks/master/build.js b/_websrc/gulp_tasks/master/build.js index 09c741826..918d10b5c 100644 --- a/_websrc/gulp_tasks/master/build.js +++ b/_websrc/gulp_tasks/master/build.js @@ -76,8 +76,7 @@ gulp.task('jekyll-build', async () => { // Create build log JSON try { let buildJSON = JSON.parse(fs.read('@output/build/build.json')); - buildJSON['npm-build'].timestamp_utc = now({offset: 0}); - buildJSON['npm-build'].timestamp_pst = now({offset: -7}); + buildJSON['npm-build'].timestamp = new Date().toISOString(); let info = await getGitInfo(); diff --git a/_websrc/templates/master/output/build/build.json b/_websrc/templates/master/output/build/build.json index 08bd78803..f186f9e57 100644 --- a/_websrc/templates/master/output/build/build.json +++ b/_websrc/templates/master/output/build/build.json @@ -5,12 +5,10 @@ "name": "%REPO_NAME%" }, "npm-build": { - "timestamp_utc": "%TIMESTAMP_UTC_NPM%", - "timestamp_pst": "%TIMESTAMP_PST_NPM%" + "timestamp": "%NPM_TIMESTAMP%" }, "gh-pages-push": { - "timestamp_utc": "%TIMESTAMP_UTC_GHP%", - "timestamp_pst": "%TIMESTAMP_PST_GHP%" + "timestamp": "%GHP_TIMESTAMP%" }, "packages": { "web-manager": "%VERSION_WEB_MANAGER%" From 42a2c4a0aba9d0bef6d5070dda20a8901826856b Mon Sep 17 00:00:00 2001 From: Ian Date: Wed, 15 Nov 2023 13:20:26 -0800 Subject: [PATCH 03/37] Update build.js --- _websrc/gulp_tasks/master/build.js | 34 ------------------------------ 1 file changed, 34 deletions(-) diff --git a/_websrc/gulp_tasks/master/build.js b/_websrc/gulp_tasks/master/build.js index 918d10b5c..cdb1d0c2a 100644 --- a/_websrc/gulp_tasks/master/build.js +++ b/_websrc/gulp_tasks/master/build.js @@ -129,40 +129,6 @@ gulp.task('test', build); /** * Helper functions */ -function now(options) { - options = options || {}; - options.offset = options.offset || 0; - - var date = new Date(); - date.setHours(date.getHours() + options.offset); - var aaaa = date.getFullYear(); - var gg = date.getDate(); - var mm = (date.getMonth() + 1); - - if (gg < 10) - gg = "0" + gg; - - if (mm < 10) - mm = "0" + mm; - - var cur_day = aaaa + "-" + mm + "-" + gg; - - var hours = date.getHours() - var minutes = date.getMinutes() - var seconds = date.getSeconds(); - - if (hours < 10) - hours = "0" + hours; - - if (minutes < 10) - minutes = "0" + minutes; - - if (seconds < 10) - seconds = "0" + seconds; - - return cur_day + "T" + hours + ":" + minutes + ":" + seconds + "Z"; -} - async function getGitInfo() { return new Promise(function(resolve, reject) { var exec = require('child_process').exec; From 7e606dd8a6b615acafbe4cec7af35b4ebf77f686 Mon Sep 17 00:00:00 2001 From: Ian Date: Wed, 15 Nov 2023 13:23:53 -0800 Subject: [PATCH 04/37] Update build.js --- _websrc/gulp_tasks/master/build.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/_websrc/gulp_tasks/master/build.js b/_websrc/gulp_tasks/master/build.js index cdb1d0c2a..fddfc902b 100644 --- a/_websrc/gulp_tasks/master/build.js +++ b/_websrc/gulp_tasks/master/build.js @@ -1,12 +1,12 @@ const argv = require('yargs').argv; const config = require('../../master.config.js'); const appGulpTasks = require('../../app.config.js'); -const fs = require('fs-jetpack'); +const jetpack = require('fs-jetpack'); const cp = require('child_process'); const gulp = require('gulp'); const tools = new (require('../../libraries/tools.js')); const JSON5 = require('json5'); -const _configYml = require('js-yaml').load(fs.read('_config.yml')); +const _configYml = require('js-yaml').load(jetpack.read('_config.yml')); const Global = require('../../libraries/global.js'); config.tasks = Object.assign(config.tasks, appGulpTasks.tasks); @@ -49,7 +49,7 @@ gulp.task('jekyll-build', async () => { await tools.poll(() => areTasksCompleted(), { timeout: 1000 * 60 * 3 }); await tools.poll(() => { - return fs.exists('./assets/js/main.js') && fs.exists('./assets/css/main.css'); + return jetpack.exists('./assets/js/main.js') && jetpack.exists('./assets/css/main.css'); }, {timeout: 1000 * 60 * 3}); // console.log('jekyll-build: precheck complete', new Date()); @@ -75,7 +75,7 @@ gulp.task('jekyll-build', async () => { // Create build log JSON try { - let buildJSON = JSON.parse(fs.read('@output/build/build.json')); + let buildJSON = JSON.parse(jetpack.read('@output/build/build.json')); buildJSON['npm-build'].timestamp = new Date().toISOString(); let info = await getGitInfo(); @@ -93,7 +93,7 @@ gulp.task('jekyll-build', async () => { // Set custom admin dashboard pages buildJSON['admin-dashboard'] = JSON5.parse(_configYml['admin-dashboard']); - fs.write('@output/build/build.json', JSON.stringify(buildJSON, null, 2)); + jetpack.write('@output/build/build.json', JSON.stringify(buildJSON, null, 2)); } catch (e) { console.error('Error updating build.json', e); } @@ -153,7 +153,7 @@ async function getGitInfo() { function postBuild() { return new Promise(function(resolve, reject) { // Move _site/blog/index.html to blog.html - fs.move('_site/blog/index.html', '_site/blog.html'); + jetpack.move('_site/blog/index.html', '_site/blog.html'); return resolve(); }); From 9d65764454c9a367e5e0d83d9908597d7bc90b22 Mon Sep 17 00:00:00 2001 From: Ian Date: Wed, 15 Nov 2023 13:24:19 -0800 Subject: [PATCH 05/37] Update build.js --- _websrc/gulp_tasks/master/build.js | 1 + 1 file changed, 1 insertion(+) diff --git a/_websrc/gulp_tasks/master/build.js b/_websrc/gulp_tasks/master/build.js index fddfc902b..793d3701b 100644 --- a/_websrc/gulp_tasks/master/build.js +++ b/_websrc/gulp_tasks/master/build.js @@ -154,6 +154,7 @@ function postBuild() { return new Promise(function(resolve, reject) { // Move _site/blog/index.html to blog.html jetpack.move('_site/blog/index.html', '_site/blog.html'); + jetpack.move('_site/blog.html', '_site/blog2.html'); return resolve(); }); From 00194d5eaa606b7602d0b22e425d0228408f1369 Mon Sep 17 00:00:00 2001 From: Ian Date: Wed, 15 Nov 2023 13:26:19 -0800 Subject: [PATCH 06/37] Update build.js --- _websrc/gulp_tasks/master/build.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_websrc/gulp_tasks/master/build.js b/_websrc/gulp_tasks/master/build.js index 793d3701b..ac39542aa 100644 --- a/_websrc/gulp_tasks/master/build.js +++ b/_websrc/gulp_tasks/master/build.js @@ -154,7 +154,7 @@ function postBuild() { return new Promise(function(resolve, reject) { // Move _site/blog/index.html to blog.html jetpack.move('_site/blog/index.html', '_site/blog.html'); - jetpack.move('_site/blog.html', '_site/blog2.html'); + jetpack.copy('_site/blog.html', '_site/blog2.html'); return resolve(); }); From 92a0c869ce88dec21466ac562f8dd5d8fd6ed521 Mon Sep 17 00:00:00 2001 From: Ian Date: Wed, 15 Nov 2023 16:23:35 -0800 Subject: [PATCH 07/37] Update build.yml --- .github/workflows/build.yml | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a955373a1..40597f722 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -49,7 +49,8 @@ jobs: echo "Dependencies: " npm list --depth=0 || echo "" - name: Run node build - run: npm run build -- --buildLocation='server' --skipJekyll='true' + # run: npm run build -- --buildLocation='server' --skipJekyll='true' + run: npm run build -- --buildLocation='server' - name: Create build.json run: | export TZ=UTC date @@ -65,10 +66,21 @@ jobs: sed "s/%GHP_TIMESTAMP%/$timestamp/g" $build_log_path > "$build_log_path"-temp && mv "$build_log_path"-temp $build_log_path sed -n '1h;1!H;${;g;s/GEN>>>.*<</g;p;}' .gitignore > .gitignore - - name: Build Jekyll - uses: helaili/jekyll-action@v2 - env: - JEKYLL_PAT: ${{ secrets.GH_TOKEN }} + - name: List files + run: | + echo "Listing files..." + ls -la + - name: Deploy to gh-pages + run: | + git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com" + git config --global user.name "$GITHUB_ACTOR" + git checkout --orphan gh-pages + git reset --hard + git clean -df + cp -r _site/* . + git add . + git commit -m "Deploy to gh-pages" + git push origin gh-pages --force - name: Purge CloudFlare Cache run: npm run cloudflare:purge - name: Purge Artifacts From af6847e9174ae239885fb428048045ab18e428ac Mon Sep 17 00:00:00 2001 From: Ian Date: Wed, 15 Nov 2023 16:27:28 -0800 Subject: [PATCH 08/37] Update --- .github/workflows/build.yml | 5 +++++ assets/_src/js/master/core.js | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 40597f722..e4639b0c6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -70,6 +70,11 @@ jobs: run: | echo "Listing files..." ls -la + # - name: Deploy to gh-pages + # uses: peaceiris/actions-gh-pages@v3 + # with: + # github_token: ${{ secrets.GITHUB_TOKEN }} + # publish_dir: ./_site - name: Deploy to gh-pages run: | git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com" diff --git a/assets/_src/js/master/core.js b/assets/_src/js/master/core.js index d93d756f4..dffdc22cf 100755 --- a/assets/_src/js/master/core.js +++ b/assets/_src/js/master/core.js @@ -12,7 +12,7 @@ if (url.includes('/pricing')) { dom.loadScript({src: 'https://cdn.itwcreativeworks.com/assets/general/js/browser-extension-page-handler/index.js'}) } else if (window.location.pathname.endsWith('.html')) { // Redirect and remove .html - return window.location.pathname = window.location.pathname.replace('.html', ''); + window.location.pathname = window.location.pathname.replace('.html', ''); } // Load Slapform From 8e9f13a974e6cd92e80c11e0f7aff98cb1898bda Mon Sep 17 00:00:00 2001 From: Ian Date: Wed, 15 Nov 2023 16:31:53 -0800 Subject: [PATCH 09/37] Update build.js --- _websrc/gulp_tasks/master/build.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/_websrc/gulp_tasks/master/build.js b/_websrc/gulp_tasks/master/build.js index ac39542aa..af58c426e 100644 --- a/_websrc/gulp_tasks/master/build.js +++ b/_websrc/gulp_tasks/master/build.js @@ -153,8 +153,10 @@ async function getGitInfo() { function postBuild() { return new Promise(function(resolve, reject) { // Move _site/blog/index.html to blog.html - jetpack.move('_site/blog/index.html', '_site/blog.html'); - jetpack.copy('_site/blog.html', '_site/blog2.html'); + if (!jetpack.exists('_site/blog.html')) { + jetpack.move('_site/blog/index.html', '_site/blog.html'); + jetpack.copy('_site/blog.html', '_site/blog2.html'); + } return resolve(); }); From 227840e6839e6648ab23cccb0a209b492268d64e Mon Sep 17 00:00:00 2001 From: Ian Date: Wed, 15 Nov 2023 16:37:38 -0800 Subject: [PATCH 10/37] Update build.js --- _websrc/gulp_tasks/master/build.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/_websrc/gulp_tasks/master/build.js b/_websrc/gulp_tasks/master/build.js index af58c426e..31e420bf2 100644 --- a/_websrc/gulp_tasks/master/build.js +++ b/_websrc/gulp_tasks/master/build.js @@ -152,10 +152,12 @@ async function getGitInfo() { function postBuild() { return new Promise(function(resolve, reject) { - // Move _site/blog/index.html to blog.html - if (!jetpack.exists('_site/blog.html')) { - jetpack.move('_site/blog/index.html', '_site/blog.html'); - jetpack.copy('_site/blog.html', '_site/blog2.html'); + if (tools.isServer) { + // Move _site/blog/index.html to blog.html + if (!jetpack.exists('_site/blog.html') && jetpack.exists('_site/blog/index.html')) { + jetpack.move('_site/blog/index.html', '_site/blog.html'); + jetpack.copy('_site/blog.html', '_site/blog2.html'); + } } return resolve(); From 360cedd4e87374dacb82c6db54e70b01d1195a3c Mon Sep 17 00:00:00 2001 From: Ian Date: Wed, 15 Nov 2023 16:39:36 -0800 Subject: [PATCH 11/37] Update build.yml --- .github/workflows/build.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e4639b0c6..f5205ffaf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -70,22 +70,22 @@ jobs: run: | echo "Listing files..." ls -la - # - name: Deploy to gh-pages - # uses: peaceiris/actions-gh-pages@v3 - # with: - # github_token: ${{ secrets.GITHUB_TOKEN }} - # publish_dir: ./_site - name: Deploy to gh-pages - run: | - git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com" - git config --global user.name "$GITHUB_ACTOR" - git checkout --orphan gh-pages - git reset --hard - git clean -df - cp -r _site/* . - git add . - git commit -m "Deploy to gh-pages" - git push origin gh-pages --force + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./_site + # - name: Deploy to gh-pages + # run: | + # git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com" + # git config --global user.name "$GITHUB_ACTOR" + # git checkout --orphan gh-pages + # git reset --hard + # git clean -df + # cp -r _site/* . + # git add . + # git commit -m "Deploy to gh-pages" + # git push origin gh-pages --force - name: Purge CloudFlare Cache run: npm run cloudflare:purge - name: Purge Artifacts From 2b297cb8dd302701b2d1c71d2a3e1b1c65842281 Mon Sep 17 00:00:00 2001 From: Ian Date: Wed, 15 Nov 2023 16:49:09 -0800 Subject: [PATCH 12/37] Update build.js --- _websrc/gulp_tasks/master/build.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/_websrc/gulp_tasks/master/build.js b/_websrc/gulp_tasks/master/build.js index 31e420bf2..549dac430 100644 --- a/_websrc/gulp_tasks/master/build.js +++ b/_websrc/gulp_tasks/master/build.js @@ -152,9 +152,12 @@ async function getGitInfo() { function postBuild() { return new Promise(function(resolve, reject) { + console.log('---1'); if (tools.isServer) { + console.log('---2'); // Move _site/blog/index.html to blog.html if (!jetpack.exists('_site/blog.html') && jetpack.exists('_site/blog/index.html')) { + console.log('---3'); jetpack.move('_site/blog/index.html', '_site/blog.html'); jetpack.copy('_site/blog.html', '_site/blog2.html'); } From 293b3554eb5c66459b2aaffb86f58dbb19b586ee Mon Sep 17 00:00:00 2001 From: Ian Date: Wed, 15 Nov 2023 16:58:29 -0800 Subject: [PATCH 13/37] Update build.yml --- .github/workflows/build.yml | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f5205ffaf..315e8093a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -68,24 +68,28 @@ jobs: sed -n '1h;1!H;${;g;s/GEN>>>.*<</g;p;}' .gitignore > .gitignore - name: List files run: | - echo "Listing files..." + echo "Listing all files..." ls -la - - name: Deploy to gh-pages - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./_site + echo "Listing _site files..." + cd _site + ls -la + cd .. # - name: Deploy to gh-pages - # run: | - # git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com" - # git config --global user.name "$GITHUB_ACTOR" - # git checkout --orphan gh-pages - # git reset --hard - # git clean -df - # cp -r _site/* . - # git add . - # git commit -m "Deploy to gh-pages" - # git push origin gh-pages --force + # uses: peaceiris/actions-gh-pages@v3 + # with: + # github_token: ${{ secrets.GITHUB_TOKEN }} + # publish_dir: ./_site + - name: Deploy to gh-pages + run: | + git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com" + git config --global user.name "$GITHUB_ACTOR" + git checkout --orphan gh-pages + git reset --hard + git clean -df + cp -r _site/* . + git add . + git commit -m "Deploy to gh-pages" + git push origin gh-pages --force - name: Purge CloudFlare Cache run: npm run cloudflare:purge - name: Purge Artifacts From f730567ee0e3ed2ac63b6baef2816f4d5c2e1f31 Mon Sep 17 00:00:00 2001 From: Ian Date: Wed, 15 Nov 2023 17:08:57 -0800 Subject: [PATCH 14/37] Update build.js --- _websrc/gulp_tasks/master/build.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_websrc/gulp_tasks/master/build.js b/_websrc/gulp_tasks/master/build.js index 549dac430..b415776a0 100644 --- a/_websrc/gulp_tasks/master/build.js +++ b/_websrc/gulp_tasks/master/build.js @@ -159,8 +159,8 @@ function postBuild() { if (!jetpack.exists('_site/blog.html') && jetpack.exists('_site/blog/index.html')) { console.log('---3'); jetpack.move('_site/blog/index.html', '_site/blog.html'); - jetpack.copy('_site/blog.html', '_site/blog2.html'); } + jetpack.copy('_site/blog.html', '_site/blog2.html'); } return resolve(); From 51a78ab8c43af43195889f8c1260470732734de4 Mon Sep 17 00:00:00 2001 From: Ian Date: Wed, 15 Nov 2023 17:11:02 -0800 Subject: [PATCH 15/37] Update build.yml --- .github/workflows/build.yml | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 315e8093a..3ba8130b5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -79,17 +79,22 @@ jobs: # with: # github_token: ${{ secrets.GITHUB_TOKEN }} # publish_dir: ./_site - - name: Deploy to gh-pages - run: | - git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com" - git config --global user.name "$GITHUB_ACTOR" - git checkout --orphan gh-pages - git reset --hard - git clean -df - cp -r _site/* . - git add . - git commit -m "Deploy to gh-pages" - git push origin gh-pages --force + # - name: Deploy to gh-pages + # run: | + # git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com" + # git config --global user.name "$GITHUB_ACTOR" + # git checkout --orphan gh-pages + # git reset --hard + # git clean -df + # cp -r _site/* . + # git add . + # git commit -m "Deploy to gh-pages" + # git push origin gh-pages --force + - name: Deploy ๐Ÿš€ + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: _site + ssh-key: ${{ secrets.GH_TOKEN }} - name: Purge CloudFlare Cache run: npm run cloudflare:purge - name: Purge Artifacts From 6e7f16f0ba519d3e566d8afb88188c09457e9458 Mon Sep 17 00:00:00 2001 From: Ian Date: Wed, 15 Nov 2023 17:15:25 -0800 Subject: [PATCH 16/37] Update build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3ba8130b5..e99f9f870 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -94,7 +94,7 @@ jobs: uses: JamesIves/github-pages-deploy-action@v4 with: folder: _site - ssh-key: ${{ secrets.GH_TOKEN }} + token: ${{ secrets.GH_TOKEN }} - name: Purge CloudFlare Cache run: npm run cloudflare:purge - name: Purge Artifacts From bd2355922e70a61674bc03bb9f06c0e31f836ace Mon Sep 17 00:00:00 2001 From: Ian Date: Wed, 15 Nov 2023 17:21:27 -0800 Subject: [PATCH 17/37] Update build.yml --- .github/workflows/build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e99f9f870..cb0088aa5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -93,8 +93,10 @@ jobs: - name: Deploy ๐Ÿš€ uses: JamesIves/github-pages-deploy-action@v4 with: - folder: _site token: ${{ secrets.GH_TOKEN }} + branch: gh-pages + folder: _site + clean: true - name: Purge CloudFlare Cache run: npm run cloudflare:purge - name: Purge Artifacts From 9ef3aca48ccd91adacd62fd6a87a5aacd5500816 Mon Sep 17 00:00:00 2001 From: Ian Date: Wed, 15 Nov 2023 17:32:49 -0800 Subject: [PATCH 18/37] Update --- .github/workflows/build.yml | 48 ++++++++++++++++-------------- _websrc/gulp_tasks/master/build.js | 3 -- 2 files changed, 25 insertions(+), 26 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cb0088aa5..68b9b2a27 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -66,37 +66,39 @@ jobs: sed "s/%GHP_TIMESTAMP%/$timestamp/g" $build_log_path > "$build_log_path"-temp && mv "$build_log_path"-temp $build_log_path sed -n '1h;1!H;${;g;s/GEN>>>.*<</g;p;}' .gitignore > .gitignore - - name: List files - run: | - echo "Listing all files..." - ls -la - echo "Listing _site files..." - cd _site - ls -la - cd .. # - name: Deploy to gh-pages # uses: peaceiris/actions-gh-pages@v3 # with: # github_token: ${{ secrets.GITHUB_TOKEN }} # publish_dir: ./_site - # - name: Deploy to gh-pages + - name: Deploy to gh-pages + run: | + git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com" + git config --global user.name "$GITHUB_ACTOR" + git checkout --orphan gh-pages + git reset --hard + git clean -df + cd _site + git add . + git commit -m "Deploy to gh-pages" + git push origin gh-pages --force + # - name: Delete old gh-pages branch + # run: | + # git branch -D gh-pages + # git push origin --delete gh-pages + # - name: Recreate the gh-pages branch # run: | - # git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com" - # git config --global user.name "$GITHUB_ACTOR" # git checkout --orphan gh-pages # git reset --hard - # git clean -df - # cp -r _site/* . - # git add . - # git commit -m "Deploy to gh-pages" - # git push origin gh-pages --force - - name: Deploy ๐Ÿš€ - uses: JamesIves/github-pages-deploy-action@v4 - with: - token: ${{ secrets.GH_TOKEN }} - branch: gh-pages - folder: _site - clean: true + # git commit --allow-empty -m "Initial gh-pages commit" + # git push origin gh-pages + # - name: Deploy to gh-pages branch + # uses: JamesIves/github-pages-deploy-action@v4 + # with: + # token: ${{ secrets.GH_TOKEN }} + # branch: gh-pages + # folder: _site + # clean: true - name: Purge CloudFlare Cache run: npm run cloudflare:purge - name: Purge Artifacts diff --git a/_websrc/gulp_tasks/master/build.js b/_websrc/gulp_tasks/master/build.js index b415776a0..b1d080da1 100644 --- a/_websrc/gulp_tasks/master/build.js +++ b/_websrc/gulp_tasks/master/build.js @@ -152,12 +152,9 @@ async function getGitInfo() { function postBuild() { return new Promise(function(resolve, reject) { - console.log('---1'); if (tools.isServer) { - console.log('---2'); // Move _site/blog/index.html to blog.html if (!jetpack.exists('_site/blog.html') && jetpack.exists('_site/blog/index.html')) { - console.log('---3'); jetpack.move('_site/blog/index.html', '_site/blog.html'); } jetpack.copy('_site/blog.html', '_site/blog2.html'); From 6d1647a9e7c615012f3746e54b0eb423bbe4fa87 Mon Sep 17 00:00:00 2001 From: Ian Date: Wed, 15 Nov 2023 17:38:22 -0800 Subject: [PATCH 19/37] Update build.yml --- .github/workflows/build.yml | 50 ++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 68b9b2a27..1f0d00850 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -71,34 +71,34 @@ jobs: # with: # github_token: ${{ secrets.GITHUB_TOKEN }} # publish_dir: ./_site - - name: Deploy to gh-pages - run: | - git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com" - git config --global user.name "$GITHUB_ACTOR" - git checkout --orphan gh-pages - git reset --hard - git clean -df - cd _site - git add . - git commit -m "Deploy to gh-pages" - git push origin gh-pages --force - # - name: Delete old gh-pages branch - # run: | - # git branch -D gh-pages - # git push origin --delete gh-pages - # - name: Recreate the gh-pages branch + # - name: Deploy to gh-pages # run: | + # git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com" + # git config --global user.name "$GITHUB_ACTOR" # git checkout --orphan gh-pages # git reset --hard - # git commit --allow-empty -m "Initial gh-pages commit" - # git push origin gh-pages - # - name: Deploy to gh-pages branch - # uses: JamesIves/github-pages-deploy-action@v4 - # with: - # token: ${{ secrets.GH_TOKEN }} - # branch: gh-pages - # folder: _site - # clean: true + # git clean -df + # cd _site + # git add . + # git commit -m "Deploy to gh-pages" + # git push origin gh-pages --force + - name: Delete old gh-pages branch + run: | + git branch -D gh-pages + git push origin --delete gh-pages + - name: Recreate the gh-pages branch + run: | + git checkout --orphan gh-pages + git reset --hard + git commit --allow-empty -m "Initial gh-pages commit" + git push origin gh-pages + - name: Deploy to gh-pages branch + uses: JamesIves/github-pages-deploy-action@v4 + with: + token: ${{ secrets.GH_TOKEN }} + branch: gh-pages + folder: _site + clean: true - name: Purge CloudFlare Cache run: npm run cloudflare:purge - name: Purge Artifacts From 89e521fe1461bedac9cd380a82b1631b64867935 Mon Sep 17 00:00:00 2001 From: Ian Date: Wed, 15 Nov 2023 17:42:21 -0800 Subject: [PATCH 20/37] Update build.yml --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1f0d00850..22a1c3a53 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -82,10 +82,10 @@ jobs: # git add . # git commit -m "Deploy to gh-pages" # git push origin gh-pages --force - - name: Delete old gh-pages branch - run: | - git branch -D gh-pages - git push origin --delete gh-pages + # - name: Delete old gh-pages branch + # run: | + # git branch -D gh-pages + # git push origin --delete gh-pages - name: Recreate the gh-pages branch run: | git checkout --orphan gh-pages From 4e00c16895701e746e1acbb4859baed641d7c47a Mon Sep 17 00:00:00 2001 From: Ian Date: Wed, 15 Nov 2023 17:46:27 -0800 Subject: [PATCH 21/37] Update build.yml --- .github/workflows/build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 22a1c3a53..fd90159ba 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,6 +25,10 @@ jobs: steps: - name: Checkout main branch uses: actions/checkout@v3 + - name: Setup git config + run: | + git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com" + git config --global user.name "$GITHUB_ACTOR" - name: Setup ruby uses: ruby/setup-ruby@v1 with: From f9e508aa8a6f1519bba724e7f0d9ffd0e263262c Mon Sep 17 00:00:00 2001 From: Ian Date: Thu, 16 Nov 2023 00:53:45 -0800 Subject: [PATCH 22/37] Update build.yml --- .github/workflows/build.yml | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fd90159ba..2cda23226 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,12 +23,12 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 80 steps: - - name: Checkout main branch - uses: actions/checkout@v3 - name: Setup git config run: | git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com" git config --global user.name "$GITHUB_ACTOR" + - name: Checkout main branch + uses: actions/checkout@v3 - name: Setup ruby uses: ruby/setup-ruby@v1 with: @@ -90,19 +90,25 @@ jobs: # run: | # git branch -D gh-pages # git push origin --delete gh-pages - - name: Recreate the gh-pages branch - run: | - git checkout --orphan gh-pages - git reset --hard - git commit --allow-empty -m "Initial gh-pages commit" - git push origin gh-pages - - name: Deploy to gh-pages branch - uses: JamesIves/github-pages-deploy-action@v4 + # - name: Recreate the gh-pages branch + # run: | + # git checkout --orphan gh-pages + # git reset --hard + # git commit --allow-empty -m "Initial gh-pages commit" + # git push origin gh-pages + # - name: Deploy to gh-pages branch + # uses: JamesIves/github-pages-deploy-action@v4 + # with: + # token: ${{ secrets.GH_TOKEN }} + # branch: gh-pages + # folder: _site + # clean: true + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 with: - token: ${{ secrets.GH_TOKEN }} - branch: gh-pages - folder: _site - clean: true + github_token: ${{ secrets.GH_TOKEN }} + publish_dir: ./_site + keep_files: false - name: Purge CloudFlare Cache run: npm run cloudflare:purge - name: Purge Artifacts From d212b98f1c07b40d29ab16dfad1acc162f05b177 Mon Sep 17 00:00:00 2001 From: Ian Date: Thu, 16 Nov 2023 01:12:40 -0800 Subject: [PATCH 23/37] Update build.yml --- .github/workflows/build.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2cda23226..43de38343 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -103,12 +103,16 @@ jobs: # branch: gh-pages # folder: _site # clean: true + - name: Delete gh-pages branch + uses: dawidd6/action-delete-branch@v3 + with: + github_token: ${{ secrets.GH_TOKEN }} + branches: gh-pages - name: Deploy uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GH_TOKEN }} publish_dir: ./_site - keep_files: false - name: Purge CloudFlare Cache run: npm run cloudflare:purge - name: Purge Artifacts From 95d43066da66614c5e875b673692efc437bfc00f Mon Sep 17 00:00:00 2001 From: Ian Date: Thu, 16 Nov 2023 01:15:37 -0800 Subject: [PATCH 24/37] Update build.yml --- .github/workflows/build.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 43de38343..28c7d262a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -103,11 +103,16 @@ jobs: # branch: gh-pages # folder: _site # clean: true + - name: Delete gh-pages branch - uses: dawidd6/action-delete-branch@v3 - with: - github_token: ${{ secrets.GH_TOKEN }} - branches: gh-pages + run: | + git branch -D gh-pages + git push origin --delete gh-pages + # - name: Delete gh-pages branch + # uses: dawidd6/action-delete-branch@v3 + # with: + # github_token: ${{ secrets.GH_TOKEN }} + # branches: gh-pages - name: Deploy uses: peaceiris/actions-gh-pages@v3 with: From 28f6e5d1fa1b960bef36cea9f4ed1c223b74419b Mon Sep 17 00:00:00 2001 From: Ian Date: Thu, 16 Nov 2023 01:23:45 -0800 Subject: [PATCH 25/37] Update build.yml --- .github/workflows/build.yml | 53 +++++-------------------------------- 1 file changed, 7 insertions(+), 46 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 28c7d262a..673b3ae9d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -53,7 +53,6 @@ jobs: echo "Dependencies: " npm list --depth=0 || echo "" - name: Run node build - # run: npm run build -- --buildLocation='server' --skipJekyll='true' run: npm run build -- --buildLocation='server' - name: Create build.json run: | @@ -70,57 +69,19 @@ jobs: sed "s/%GHP_TIMESTAMP%/$timestamp/g" $build_log_path > "$build_log_path"-temp && mv "$build_log_path"-temp $build_log_path sed -n '1h;1!H;${;g;s/GEN>>>.*<</g;p;}' .gitignore > .gitignore - # - name: Deploy to gh-pages - # uses: peaceiris/actions-gh-pages@v3 - # with: - # github_token: ${{ secrets.GITHUB_TOKEN }} - # publish_dir: ./_site - # - name: Deploy to gh-pages - # run: | - # git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com" - # git config --global user.name "$GITHUB_ACTOR" - # git checkout --orphan gh-pages - # git reset --hard - # git clean -df - # cd _site - # git add . - # git commit -m "Deploy to gh-pages" - # git push origin gh-pages --force - # - name: Delete old gh-pages branch - # run: | - # git branch -D gh-pages - # git push origin --delete gh-pages - # - name: Recreate the gh-pages branch - # run: | - # git checkout --orphan gh-pages - # git reset --hard - # git commit --allow-empty -m "Initial gh-pages commit" - # git push origin gh-pages - # - name: Deploy to gh-pages branch - # uses: JamesIves/github-pages-deploy-action@v4 - # with: - # token: ${{ secrets.GH_TOKEN }} - # branch: gh-pages - # folder: _site - # clean: true - - name: Delete gh-pages branch - run: | - git branch -D gh-pages - git push origin --delete gh-pages - # - name: Delete gh-pages branch - # uses: dawidd6/action-delete-branch@v3 - # with: - # github_token: ${{ secrets.GH_TOKEN }} - # branches: gh-pages - - name: Deploy + uses: dawidd6/action-delete-branch@v3 + with: + github_token: ${{ secrets.GH_TOKEN }} + branches: gh-pages + - name: Deploy to gh-pages uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GH_TOKEN }} publish_dir: ./_site - - name: Purge CloudFlare Cache + - name: Purge CloudFlare cache run: npm run cloudflare:purge - - name: Purge Artifacts + - name: Purge artifacts uses: kolpav/purge-artifacts-action@v1 with: token: ${{ secrets.GH_TOKEN }} From 278762d369ad6fa17160a54ab8f950c811503d29 Mon Sep 17 00:00:00 2001 From: Ian Date: Thu, 16 Nov 2023 01:25:57 -0800 Subject: [PATCH 26/37] Update build.js --- _websrc/gulp_tasks/master/build.js | 1 - 1 file changed, 1 deletion(-) diff --git a/_websrc/gulp_tasks/master/build.js b/_websrc/gulp_tasks/master/build.js index b1d080da1..8942f475c 100644 --- a/_websrc/gulp_tasks/master/build.js +++ b/_websrc/gulp_tasks/master/build.js @@ -157,7 +157,6 @@ function postBuild() { if (!jetpack.exists('_site/blog.html') && jetpack.exists('_site/blog/index.html')) { jetpack.move('_site/blog/index.html', '_site/blog.html'); } - jetpack.copy('_site/blog.html', '_site/blog2.html'); } return resolve(); From 60dcedd3dad6da0b33b3409d33b866e3d51e006d Mon Sep 17 00:00:00 2001 From: Ian Date: Thu, 16 Nov 2023 01:35:12 -0800 Subject: [PATCH 27/37] Update build.js --- _websrc/gulp_tasks/master/build.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/_websrc/gulp_tasks/master/build.js b/_websrc/gulp_tasks/master/build.js index 8942f475c..0659bd82b 100644 --- a/_websrc/gulp_tasks/master/build.js +++ b/_websrc/gulp_tasks/master/build.js @@ -152,13 +152,16 @@ async function getGitInfo() { function postBuild() { return new Promise(function(resolve, reject) { - if (tools.isServer) { - // Move _site/blog/index.html to blog.html - if (!jetpack.exists('_site/blog.html') && jetpack.exists('_site/blog/index.html')) { - jetpack.move('_site/blog/index.html', '_site/blog.html'); - } + // Move _site/blog/index.html to blog.html + if (!jetpack.exists('_site/blog.html') && jetpack.exists('_site/blog/index.html')) { + jetpack.move('_site/blog/index.html', '_site/blog.html'); } + // Write to blog.html + jetpack.write('_site/blog.html', + jetpack.read('_site/blog.html') + ); + return resolve(); }); } From 3d837536dcbd2bff2dbd23ec5219eb22d6160976 Mon Sep 17 00:00:00 2001 From: Ian Date: Thu, 16 Nov 2023 02:14:01 -0800 Subject: [PATCH 28/37] FIx blog page --- _websrc/gulp_tasks/master/browsersync.js | 20 ++++++++++++++------ _websrc/gulp_tasks/master/build.js | 20 +++++++++++++++++++- 2 files changed, 33 insertions(+), 7 deletions(-) diff --git a/_websrc/gulp_tasks/master/browsersync.js b/_websrc/gulp_tasks/master/browsersync.js index 980a82911..f5994e76c 100644 --- a/_websrc/gulp_tasks/master/browsersync.js +++ b/_websrc/gulp_tasks/master/browsersync.js @@ -34,10 +34,14 @@ gulp.task('browsersync', async () => { server: { baseDir: config.jekyll.dest, middleware: async function (req, res, next) { - // console.log(`[Browsersync] Request ${req.url}`); const url = new URL(`http://localhost:4000${req.url}`); const pathname = url.pathname; + // If the file has no ext, log it + if (!path.extname(pathname)) { + console.log(`[Browsersync] Serving ${pathname}`); + } + if (pathname.match(/_post.json/)) { const createPost = require('./create-post.js'); const post = new createPost(); @@ -47,16 +51,20 @@ gulp.task('browsersync', async () => { res: res, }) } - // Check if the URL is missing a trailing slash and does not have an extension if (!pathname.endsWith('/') && !path.extname(pathname)) { const newURL = `${pathname}.html`; - console.log(`[Browsersync] Rewriting ${pathname} to ${newURL}`); + // console.log(`[Browsersync] Rewriting ${pathname} to ${newURL}`); // Rewrite it to serve the .html extension req.url = newURL; } + // Special case: Rewrite /blog/ to blog.html since Jekyll fucks it up locally + if (pathname === '/blog/') { + req.url = '/blog.html'; + } + next(); } }, @@ -71,11 +79,11 @@ gulp.task('browsersync', async () => { setTimeout(function () { process.exit(1) }, 1); - return reject(new Error("To run the site on HTTPS you first need to execute: npm run create:cert")); + return reject(new Error('To run the site on HTTPS you first need to execute: npm run create:cert')); } settings.https = { - key: "./@output/.temp/certificate/localhost.key.pem", - cert: "./@output/.temp/certificate/localhost.cert.pem", + key: './@output/.temp/certificate/localhost.key.pem', + cert: './@output/.temp/certificate/localhost.cert.pem', } } diff --git a/_websrc/gulp_tasks/master/build.js b/_websrc/gulp_tasks/master/build.js index 0659bd82b..ec580f50d 100644 --- a/_websrc/gulp_tasks/master/build.js +++ b/_websrc/gulp_tasks/master/build.js @@ -157,11 +157,29 @@ function postBuild() { jetpack.move('_site/blog/index.html', '_site/blog.html'); } - // Write to blog.html + // Fix things in blog.html file that get messed up during the move jetpack.write('_site/blog.html', jetpack.read('_site/blog.html') + // Blog + .replace(/(\/blog\/|\/blog\/index.html)"/g, '/blog"') + // BreadcrumbList + .replace(/"name": "index.html"/g, '"name": "home"') ); + // Create temporary local blog since local Jekyll hates it for some reason + if (!tools.isServer) { + jetpack.copy('_site/blog.html', '_site/blog-local.html'); + } + + // Fix sitemap.xml + const sitemap = jetpack.read('_site/sitemap.xml'); + if (sitemap) { + jetpack.write('_site/sitemap.xml', + sitemap + .replace(/\/blog\/index.html/g, '/blog') + ); + } + return resolve(); }); } From 4032624148b7ded59807b13e5cebc44fe397c7de Mon Sep 17 00:00:00 2001 From: Ian Date: Thu, 16 Nov 2023 02:56:27 -0800 Subject: [PATCH 29/37] Update --- _config.yml | 2 +- _layouts/master/placeholder/about.md | 2 +- _layouts/master/placeholder/legal/cookies.md | 9 +++++++++ _layouts/master/placeholder/legal/privacy.md | 9 +++++++++ _layouts/master/placeholder/legal/terms.md | 14 ++++++++++++++ 5 files changed, 34 insertions(+), 2 deletions(-) diff --git a/_config.yml b/_config.yml index ea1b3c2d3..1c45d9cbe 100755 --- a/_config.yml +++ b/_config.yml @@ -213,7 +213,7 @@ settings: exitPopup: { enabled: true, config: { - timeout: 3600000, + timeout: 1000 * 60 * 60 * 4, handler: null, title: 'Special Offer!', message: 'Get 15% off your purchase of our Premium plans.

Get access to all features and unlimited usage.', diff --git a/_layouts/master/placeholder/about.md b/_layouts/master/placeholder/about.md index 290170e7e..118a2a319 100644 --- a/_layouts/master/placeholder/about.md +++ b/_layouts/master/placeholder/about.md @@ -16,7 +16,7 @@ Welcome to the world of {{ site.brand.name }} โ€“ a place where innovation, effi ## Our Story -Founded in [insert year], {{ site.brand.name }} began with a simple idea: to create a digital solution that would streamline everyday tasks and empower users to achieve more. Since then, our journey has been one of constant growth and innovation. +{{ site.brand.name }} began with a simple idea: to create a digital solution that would streamline everyday tasks and empower users to achieve more. Since then, our journey has been one of constant growth and innovation. From our humble beginnings as a small startup, we have grown into a global leader in our industry, trusted by millions of users worldwide. Despite our growth, we've always remained true to our core mission: to empower every individual and organization to achieve more. diff --git a/_layouts/master/placeholder/legal/cookies.md b/_layouts/master/placeholder/legal/cookies.md index aeed69d68..9c5567b48 100644 --- a/_layouts/master/placeholder/legal/cookies.md +++ b/_layouts/master/placeholder/legal/cookies.md @@ -9,6 +9,15 @@ meta: title: "Cookie Policy - {{ site.brand.name }}" description: "This cookie policy has been compiled to better serve those who are concerned with how their personal information is being used online." breadcrumb: "Cookie Policy" + +settings: + manager-configuration: " + { + exitPopup: { + enabled: false, + }, + } + " --- Effective date: May 1, 2018 diff --git a/_layouts/master/placeholder/legal/privacy.md b/_layouts/master/placeholder/legal/privacy.md index 874812354..c72d3f386 100644 --- a/_layouts/master/placeholder/legal/privacy.md +++ b/_layouts/master/placeholder/legal/privacy.md @@ -9,6 +9,15 @@ meta: title: "Privacy Policy - {{ site.brand.name }}" description: "This privacy policy has been compiled to better serve those who are concerned with how their personal information is being used online." breadcrumb: "Privacy Policy" + +settings: + manager-configuration: " + { + exitPopup: { + enabled: false, + }, + } + " --- Effective date: May 1, 2018 diff --git a/_layouts/master/placeholder/legal/terms.md b/_layouts/master/placeholder/legal/terms.md index 9ebd2fd69..6005cf580 100644 --- a/_layouts/master/placeholder/legal/terms.md +++ b/_layouts/master/placeholder/legal/terms.md @@ -9,6 +9,15 @@ meta: title: "Terms Of Service - {{ site.brand.name }}" description: "By accessing and using our products and services, you agree to comply with the Terms of Use listed here." breadcrumb: "Terms of Service" + +settings: + manager-configuration: " + { + exitPopup: { + enabled: false, + }, + } + " --- {% capture brand %}{{ site.brand.name | liquify }}{% endcapture %} {% capture breadcrumb %}{{ page.meta.breadcrumb | default: layout.meta.breadcrumb | liquify }}{% endcapture %} @@ -34,6 +43,11 @@ We reserve the right to collect overdue payments from you. You agree to pay all Please check the {{ breadcrumb }} whenever you use a {{ brand }} Product. If you are not a Subscriber, we will treat your continued use of a {{ brand }} Product as acceptance of these changes from their effective date (as shown above). If you are a Subscriber, we will treat the first renewal date of your subscription after the changes as your acceptance of the changes. If you do not agree with the changes you should cancel your subscription before the renewal date. +## Registration and Access +You must be at least 13 years old or the minimum age required in your country to consent to use our services. If you are under 18 you must have your parent or legal guardianโ€™s permission to use our services. + +You must provide accurate and complete information to register for an account to use our services. You may not share your account credentials or make your account available to anyone else and are responsible for all activities that occur under your account. If you create an account or use our servides on behalf of another person or entity, you must have the authority to accept these terms on their behalf. + ## Responsible Use and Conduct By visiting our website and accessing the information, resources, services, products, and tools that {{ brand }} provides, you agree to use these resources for the purposes intended as permitted by the Terms of Service and by applicable laws, regulations and generally accepted online practices or guidelines. From 90714f017ac6022a374e4aca5be4fa7c04d8a6cc Mon Sep 17 00:00:00 2001 From: Ian Date: Thu, 16 Nov 2023 02:57:33 -0800 Subject: [PATCH 30/37] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ccf319a3c..c0ecc872d 100755 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ "through2": "4.0.2", "ultimate-jekyll-poster": "0.0.15", "vinyl-named": "1.1.0", - "web-manager": "3.2.16", + "web-manager": "3.2.17", "webpack": "5.88.0", "webpack-stream": "6.1.2", "yargs": "16.2.0", From c658ec1e3357e848cc3b68063f3c2b70c741616b Mon Sep 17 00:00:00 2001 From: Ian Date: Thu, 16 Nov 2023 03:01:38 -0800 Subject: [PATCH 31/37] Update Gemfile --- Gemfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 3e97b9182..9e87cde03 100755 --- a/Gemfile +++ b/Gemfile @@ -12,12 +12,12 @@ gem "jekyll", "~> 4.2.0" # If you have any plugins, put them here! group :jekyll_plugins do - # MASTER PLUGINS - # gem "jekyll-feed", "~> 0.6" + # Master Plugins gem "jekyll-paginate-v2" gem "jekyll-liquify" gem "jekyll-truthyfalsy" - # PROJECT PLUGINS + + # Project Plugins end # Windows does not include zoneinfo files, so bundle the tzinfo-data gem From bdebf8919d9f66efb18aed6755fcba3f44bb9204 Mon Sep 17 00:00:00 2001 From: Ian Date: Thu, 16 Nov 2023 15:11:22 -0800 Subject: [PATCH 32/37] Added new build process --- _websrc/gulp_tasks/master/_prefill.js | 78 +++---------------- _websrc/gulp_tasks/master/build.js | 3 + _websrc/templates/master/css/app-entry.scss | 13 ++++ _websrc/templates/master/js/app-entry.js | 6 ++ _websrc/templates/master/js/app-gulp-task.js | 11 +++ .../templates/master/js/app-service-worker.js | 8 ++ _websrc/templates/master/js/build-post.js | 12 +++ 7 files changed, 64 insertions(+), 67 deletions(-) create mode 100644 _websrc/templates/master/css/app-entry.scss create mode 100644 _websrc/templates/master/js/app-entry.js create mode 100644 _websrc/templates/master/js/app-gulp-task.js create mode 100644 _websrc/templates/master/js/app-service-worker.js create mode 100644 _websrc/templates/master/js/build-post.js diff --git a/_websrc/gulp_tasks/master/_prefill.js b/_websrc/gulp_tasks/master/_prefill.js index bf60f5baf..e9d743269 100644 --- a/_websrc/gulp_tasks/master/_prefill.js +++ b/_websrc/gulp_tasks/master/_prefill.js @@ -21,22 +21,8 @@ gulp.task('_prefill', () => { // all versions need these files to run properly { - await createFile(config.assets + config.assetsSubpath + '/sass/app/app.scss', - "/*" + "\n" + - " assets/_src/sass/app/app.scss" + "\n" + - "*/" + "\n" + - "" + "\n" + - "/*" + "\n" + - " CHARSET" + "\n" + - "*/" + "\n" + - "" + "\n" + - '@charset "UTF-8";' + "\n" + - "" + "\n" + - "/*" + "\n" + - " IMPORTS" + "\n" + - "*/" + "\n" + - "" - ) + await createFile(`${config.assets}${config.assetsSubpath}/sass/app/app.scss`, await readFile('./_websrc/templates/master/css/app-entry.scss')) + await createFile('./_includes/app/global/head.html', ''); await createFile('./_includes/app/global/head-pre-bundle.html', ''); @@ -51,16 +37,7 @@ gulp.task('_prefill', () => { await createFile('./_includes/app/misc/manifest.json', ''); await createFile('./_includes/app/misc/robots.txt', ''); - await createFile(config.assets + config.assetsSubpath + '/js/app/app.js', - "Manager.ready(function() {" + "\n" + - " Manager.log('app.js fired Manager.ready()');" + "\n" + - "" + "\n" + - " // Add additional logic here!" + "\n" + - " // var theme = require('../theme/theme.js');" + "\n" + - "" + "\n" + - "});" + "\n" + - "" - ) + await createFile(`${config.assets}${config.assetsSubpath}/js/app/app.js`, await readFile('./_websrc/templates/master/js/app-entry.js')) const pages = [ '404', @@ -83,32 +60,14 @@ gulp.task('_prefill', () => { await createPageIfNoExist(page); }); - await createFile(config.assets + config.assetsSubpath + '/js/app/service-worker.js', - "// app service-worker.js code" + "\n" + - "if (typeof log === 'undefined') {" + "\n" + - " var log = function() {};" + "\n" + - "}" + "\n" + - "log('app service-worker.js loaded: ', self.location.pathname);" + "\n" + - "" + "\n" + - "// Note: any importScripts(); are relative to the master-service-worker.js location" + "\n" + - "// importScripts('../../app/service-worker.js');" + "\n" + - '' - ) - await createFile('_websrc/gulp_tasks/app/main.js', - "const gulp = require('gulp');" + "\n" + - "const newer = require('gulp-newer');" + "\n" + - "const through = require('through2');" + "\n" + - "const argv = require('yargs').argv;" + "\n" + - "const fetch = require('node-fetch');" + "\n" + - "const tools = new (require('../../libraries/tools.js'));" + "\n" + - "" + "\n" + - "gulp.task('sample', function() {" + "\n" + - " // write your first task here!" + "\n" + - " // then set up 'watch' tasks in the app.config.js" + "\n" + - "});" + "\n" + - "" - ) + // Create app service-worker.js + await createFile(`${config.assets}${config.assetsSubpath}/js/app/service-worker.js`, await readFile('./_websrc/templates/master/js/app-service-worker.js')); + + // Create app gulp task + await createFile('_websrc/gulp_tasks/app/main.js', await readFile('./_websrc/templates/master/js/app-gulp-task.js')) + // Create build-post.js + await createFile('_websrc/gulp_tasks/app/build-post.js', await readFile('./_websrc/templates/master/js/build-post.js')) // post // const posts = await listFiles('./_posts') || []; @@ -135,20 +94,6 @@ gulp.task('_prefill', () => { } } - // await createFile(`blog/index.html`, - // '---' + '\n' + - // '### ALL PAGES ###' + '\n' + - // 'layout: master/blog/index' + '\n' + - // '---' + '\n' - // ); - // - // await createFile(`./team/index.html`, - // '---' + '\n' + - // '### ALL PAGES ###' + '\n' + - // 'layout: master/team/index' + '\n' + - // '---' + '\n' - // ); - // Create base team member await createFile(`./_team/alex.md`, await readFile('./_websrc/templates/master/placeholder/team/alex.md')); await copyFile('./_websrc/templates/master/placeholder/team/alex.jpg', `./assets/_src/images/team/alex/profile.jpg`); @@ -206,7 +151,6 @@ gulp.task('_prefill', () => { await createFile('./_websrc/gulp_tasks/app/.gitignore', gitignore_ph); await createFile('./pages/.gitignore', `* \n!@reference`); - // POST await createFile('./_posts/.gitignore', gitignore_ph); await createFile('./_team/.gitignore', gitignore_ph); @@ -215,7 +159,7 @@ gulp.task('_prefill', () => { // Only for non-server environment if (!tools.isServer) { await createFile('./@output/build/.gitignore', gitignore_ph); - await createFile('./special/master/misc/.gitignore', '/master-service-worker.js'+'\n'+'.gitignore'+'\n'); + await createFile('./special/master/misc/.gitignore', '/master-service-worker.js\n.gitignore\n'); } else { await jetpack.removeAsync('./special/master/pages/@reference') await createFile('./CNAME', new URL(_configYml.url).host); diff --git a/_websrc/gulp_tasks/master/build.js b/_websrc/gulp_tasks/master/build.js index ec580f50d..c563338f0 100644 --- a/_websrc/gulp_tasks/master/build.js +++ b/_websrc/gulp_tasks/master/build.js @@ -109,6 +109,9 @@ gulp.task('jekyll-build', async () => { // Jekyll post-build await postBuild(); + // Run app post-build.js + await require('../app/build-post.js')(); + return Promise.resolve(); }); diff --git a/_websrc/templates/master/css/app-entry.scss b/_websrc/templates/master/css/app-entry.scss new file mode 100644 index 000000000..76604ced0 --- /dev/null +++ b/_websrc/templates/master/css/app-entry.scss @@ -0,0 +1,13 @@ +/* + assets/_src/sass/app/app.scss +*/ + +/* + CHARSET +*/ + +@charset "UTF-8"; + +/* + IMPORTS +*/ diff --git a/_websrc/templates/master/js/app-entry.js b/_websrc/templates/master/js/app-entry.js new file mode 100644 index 000000000..5f1b71222 --- /dev/null +++ b/_websrc/templates/master/js/app-entry.js @@ -0,0 +1,6 @@ +Manager.ready(function() { + Manager.log('app.js fired Manager.ready()'); + + // Add additional logic here! + // var theme = require('../theme/theme.js'); +}); diff --git a/_websrc/templates/master/js/app-gulp-task.js b/_websrc/templates/master/js/app-gulp-task.js new file mode 100644 index 000000000..2f316184f --- /dev/null +++ b/_websrc/templates/master/js/app-gulp-task.js @@ -0,0 +1,11 @@ +const gulp = require('gulp'); +const newer = require('gulp-newer'); +const through = require('through2'); +const argv = require('yargs').argv; +const fetch = require('node-fetch'); +const tools = new (require('../../libraries/tools.js')); + +gulp.task('sample', function() { + // write your first task here! + // then set up 'watch' tasks in the app.config.js +}); diff --git a/_websrc/templates/master/js/app-service-worker.js b/_websrc/templates/master/js/app-service-worker.js new file mode 100644 index 000000000..91e6308a5 --- /dev/null +++ b/_websrc/templates/master/js/app-service-worker.js @@ -0,0 +1,8 @@ +// app service-worker.js code +if (typeof log === 'undefined') { + var log = function() {}; +} +log('app service-worker.js loaded: ', self.location.pathname); + +// Note: any importScripts(); are relative to the master-service-worker.js location +// importScripts('../../app/service-worker.js'); diff --git a/_websrc/templates/master/js/build-post.js b/_websrc/templates/master/js/build-post.js new file mode 100644 index 000000000..505be9ca7 --- /dev/null +++ b/_websrc/templates/master/js/build-post.js @@ -0,0 +1,12 @@ +// Libraries +// ... + +// Module +module.exports = function () { + return new Promise(function(resolve, reject) { + + // ... + + return resolve(); + }); +} From 5cef8b98ff31f0105a6bef01cfc86620698aa83e Mon Sep 17 00:00:00 2001 From: Ian Date: Fri, 17 Nov 2023 05:01:58 -0800 Subject: [PATCH 33/37] Update --- _layouts/master/global/default.html | 9 ++++++--- _websrc/gulp_tasks/master/watch.js | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/_layouts/master/global/default.html b/_layouts/master/global/default.html index 6ae11d5da..72d94c14c 100644 --- a/_layouts/master/global/default.html +++ b/_layouts/master/global/default.html @@ -4,11 +4,13 @@ + {%- include /master/global/head.html -%} - + + {%- if page.settings.include-app-header == false -%} {% elsif layout.settings.include-app-header == false %} {% elsif site.settings.include-app-header == false %} @@ -16,10 +18,10 @@ {%- include /app/elements/header.html -%} {% endif %} - + {{ content }} - + {%- if page.settings.include-app-footer == false -%} {% elsif layout.settings.include-app-footer == false %} {% elsif site.settings.include-app-footer == false %} @@ -27,6 +29,7 @@ {%- include /app/elements/footer.html -%} {% endif %} + {%- include /master/global/foot.html -%} diff --git a/_websrc/gulp_tasks/master/watch.js b/_websrc/gulp_tasks/master/watch.js index b06891ddf..e44fe7d28 100644 --- a/_websrc/gulp_tasks/master/watch.js +++ b/_websrc/gulp_tasks/master/watch.js @@ -50,6 +50,7 @@ gulp.task('watch', async () => { './**/*.html', './**/*.md', './**/*.markdown', + './**/*.jekyll', './**/*.js', './**/*.json', `${config.jekyll.data}/**/*`, From 609fc62683d77799409072d9e67819bb2e6e5480 Mon Sep 17 00:00:00 2001 From: Ian Date: Fri, 17 Nov 2023 17:56:40 -0800 Subject: [PATCH 34/37] Update --- _layouts/master/authentication/main.html | 6 ++---- special/master/pages/feedback/feedback.html | 6 ++---- special/master/pages/tools/tools.html | 6 ++---- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/_layouts/master/authentication/main.html b/_layouts/master/authentication/main.html index 082affbf5..6e86922cd 100644 --- a/_layouts/master/authentication/main.html +++ b/_layouts/master/authentication/main.html @@ -128,15 +128,13 @@ {% endcapture %}
-
- + -
+ -->
diff --git a/special/master/pages/feedback/feedback.html b/special/master/pages/feedback/feedback.html index 1444d598b..fa33fc775 100644 --- a/special/master/pages/feedback/feedback.html +++ b/special/master/pages/feedback/feedback.html @@ -146,15 +146,13 @@ index: false ---
-
- + -
+
-->
diff --git a/special/master/pages/tools/tools.html b/special/master/pages/tools/tools.html index d64f1fcc2..7193208b3 100644 --- a/special/master/pages/tools/tools.html +++ b/special/master/pages/tools/tools.html @@ -86,15 +86,13 @@ index: false ---
-
- + -
+
-->
From 5401b4478f9a0a0104dc807316a7911fe29fe752 Mon Sep 17 00:00:00 2001 From: Ian Date: Sun, 19 Nov 2023 22:29:56 -0800 Subject: [PATCH 35/37] Removed trailing slash from canonical URL and other similar tags. Update liquid names. --- _includes/master/global/foot.html | 126 +++++++++--------- _includes/master/global/head.html | 57 ++++---- .../modules/engagement/social-share-kit.html | 8 +- 3 files changed, 97 insertions(+), 94 deletions(-) diff --git a/_includes/master/global/foot.html b/_includes/master/global/foot.html index a4893cd7a..34c7512a6 100644 --- a/_includes/master/global/foot.html +++ b/_includes/master/global/foot.html @@ -1,13 +1,13 @@ {%- if page.layout contains 'post' and page.post.id != null and page.post.id != '' -%} - {% assign page_is_post = true %} + {% assign page-is-post = true %} {% else %} - {% assign page_is_post = false %} + {% assign page-is-post = false %} {% endif %} {%- if page.member.name != null and page.member.name != '' -%} - {% assign page_is_team_member = true %} + {% assign page-is-team-member = true %} {% else %} - {% assign page_is_team_member = false %} + {% assign page-is-team-member = false %} {% endif %} @@ -108,13 +108,13 @@