From f9d540f44e7e32d9ad858999e01e34ab0aa4473b Mon Sep 17 00:00:00 2001 From: Matthew Persico Date: Mon, 18 May 2026 16:18:49 -0400 Subject: [PATCH 1/9] Fix wording around images. --- _posts/2026-05-16-brave-browser.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/_posts/2026-05-16-brave-browser.md b/_posts/2026-05-16-brave-browser.md index c3c2813..546a030 100644 --- a/_posts/2026-05-16-brave-browser.md +++ b/_posts/2026-05-16-brave-browser.md @@ -40,7 +40,9 @@ Chrome uses Google infrastructure (log in with your Google credentials) and Edge There is an explicit "Sync" section in the Brave Settings. On the first platform where you install Brave, you establish a new 'sync chain' and pick which pieces of data to sync with other platforms. -On subsequent platforms, you go to the same "sync" section, but chose to connect to an existing sync chain. On your original platform you chose to View Sync Code. It can be either a ![QR code]({{"/assets/images/2026-05-16-brave-browser/qr.jpg" | relative_url }}) that your phone or camera can scan to sync up or you can use a string of ![25 words]({{"/assets/images/2026-05-16-brave-browser/text.jpg" | relative_url }}) to enter on your new computer to allow permissions to sync. +On subsequent platforms, you go to the same "sync" section, but chose to connect to an existing sync chain. On your original platform you chose to View Sync Code. It can be either a QR code that your phone or camera can scan to sync up: ![QR code]({{"/assets/images/2026-05-16-brave-browser/qr.jpg" | relative_url }}) + +or you can use a string of 25 words to enter on your new computer to allow permissions to sync: ![25 words]({{"/assets/images/2026-05-16-brave-browser/text.jpg" | relative_url }}) Figure 1 shows my sync device list: From 45ba614d77e64a33046f6d1ef4fa612febb744b4 Mon Sep 17 00:00:00 2001 From: Matthew Persico Date: Mon, 18 May 2026 16:34:35 -0400 Subject: [PATCH 2/9] PRs get their own preview --- .github/workflows/deploy-site.yml | 68 ++++++++++++++++++ .github/workflows/pr-preview.yml | 116 ++++++++++++++++++++++++++++++ 2 files changed, 184 insertions(+) create mode 100644 .github/workflows/deploy-site.yml create mode 100644 .github/workflows/pr-preview.yml diff --git a/.github/workflows/deploy-site.yml b/.github/workflows/deploy-site.yml new file mode 100644 index 0000000..ff21260 --- /dev/null +++ b/.github/workflows/deploy-site.yml @@ -0,0 +1,68 @@ +name: Deploy main to gh-pages + +on: + push: + branches: [main] + workflow_dispatch: + +permissions: + contents: write + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.3' + bundler-cache: true + + - name: Build Jekyll site + shell: pwsh + env: + JEKYLL_ENV: production + JEKYLL_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + # Override baseurl so the github-pages gem does not inject the + # repository name as the baseurl, which would break asset paths. + @" + url: "https://your-domain.com" + baseurl: "" + "@ | Set-Content -Path /tmp/_config_deploy.yml + + bundle exec jekyll build --config _config.yml,/tmp/_config_deploy.yml + + # Preserve any PR preview directories that already live on gh-pages so + # that a main-site redeploy does not wipe them out. + - name: Restore previews directories from gh-pages branch (if present) + shell: pwsh + run: | + git ls-remote --exit-code --heads origin gh-pages *> $null + if ($LASTEXITCODE -ne 0) { + Write-Host "gh-pages branch does not exist yet - skipping restore." + exit 0 + } + + git fetch origin gh-pages --depth=1 + + # Copy the previews tree into the freshly built _site so the + # subsequent deploy action includes it in the push. + git checkout origin/gh-pages -- previews/ 2>$null + if ($LASTEXITCODE -eq 0) { + Copy-Item -Recurse -Force previews _site/previews + Remove-Item -Recurse -Force previews + } + else { + Write-Host "No previews directory on gh-pages yet - skipping restore." + exit 0 + } + + - name: Deploy to gh-pages branch + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./_site + cname: your-domain.com + commit_message: "Deploy main site from ${{ github.sha }}" \ No newline at end of file diff --git a/.github/workflows/pr-preview.yml b/.github/workflows/pr-preview.yml new file mode 100644 index 0000000..a295dab --- /dev/null +++ b/.github/workflows/pr-preview.yml @@ -0,0 +1,116 @@ +name: Deploy PR preview to gh-pages + +on: + pull_request: + types: [opened, synchronize, reopened, closed] + +permissions: + contents: write + pull-requests: write + +jobs: + deploy-preview: + if: github.event.action != 'closed' + runs-on: ubuntu-latest + concurrency: + group: pr-preview-deploy-${{ github.event.pull_request.number }} + cancel-in-progress: true + steps: + - uses: actions/checkout@v4 + + - uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.3' + bundler-cache: true + + - name: Build Jekyll preview site + shell: pwsh + env: + JEKYLL_ENV: production + JEKYLL_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + # Override baseurl for the preview path + @" + url: "https://your-domain.com" + baseurl: "/previews/pr-${{ github.event.pull_request.number }}" + "@ | Set-Content -Path /tmp/_config_preview.yml + + bundle exec jekyll build --config _config.yml,/tmp/_config_preview.yml --destination ./_site_preview + + - name: Deploy preview to gh-pages branch previews subdirectory + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./_site_preview + destination_dir: previews/pr-${{ github.event.pull_request.number }} + keep_files: true + commit_message: "Deploy preview for PR #${{ github.event.pull_request.number }} (${{ github.sha }})" + + - name: Post / Update preview URL comment on PR + uses: actions/github-script@v7 + with: + script: | + const prNumber = context.payload.pull_request.number; + const previewUrl = `https://your-domain.com/previews/pr-${prNumber}/`; + const marker = ''; + const body = + `${marker}\n` + + `🔍 **PR Preview deployed:** ${previewUrl}\n\n` + + `_This preview is updated on every commit and will be removed when the PR is closed._`; + + const { data: comments } = await github.rest.issues.listComments({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: prNumber, + }); + + const existing = comments.find(c => c.body.includes(marker)); + if (existing) { + await github.rest.issues.updateComment({ + owner: context.repo.owner, + repo: context.repo.repo, + comment_id: existing.id, + body, + }); + } else { + await github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: prNumber, + body, + }); + } + + cleanup-preview: + if: github.event.action == 'closed' + runs-on: ubuntu-latest + concurrency: + group: pr-preview-cleanup-${{ github.event.pull_request.number }} + cancel-in-progress: false + steps: + - uses: actions/checkout@v4 + + - name: Remove preview directory from gh-pages branch + shell: pwsh + run: | + git ls-remote --exit-code --heads origin gh-pages *> $null + if ($LASTEXITCODE -ne 0) { + Write-Host "gh-pages branch does not exist - nothing to clean up." + exit 0 + } + + git fetch origin gh-pages:gh-pages --depth=1 + git checkout gh-pages + + $prDir = "previews/pr-${{ github.event.pull_request.number }}" + if (Test-Path $prDir) { + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git rm -r -f $prDir + git commit -m "Remove preview for PR #${{ github.event.pull_request.number }}" + git push --set-upstream origin gh-pages + } + else { + Write-Host "Preview directory '$prDir' not found - nothing to clean up." + exit 0 + } \ No newline at end of file From 4bba9f22dc790e4d99f28293977c04c4fd2678e5 Mon Sep 17 00:00:00 2001 From: Matthew Persico Date: Mon, 18 May 2026 16:38:57 -0400 Subject: [PATCH 3/9] Replace generic domain with my pages domain --- .github/workflows/deploy-site.yml | 4 ++-- .github/workflows/pr-preview.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy-site.yml b/.github/workflows/deploy-site.yml index ff21260..bf7daf1 100644 --- a/.github/workflows/deploy-site.yml +++ b/.github/workflows/deploy-site.yml @@ -28,7 +28,7 @@ jobs: # Override baseurl so the github-pages gem does not inject the # repository name as the baseurl, which would break asset paths. @" - url: "https://your-domain.com" + url: "https://matthewpersico.github.io" baseurl: "" "@ | Set-Content -Path /tmp/_config_deploy.yml @@ -64,5 +64,5 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./_site - cname: your-domain.com + cname: matthewpersico.github.io commit_message: "Deploy main site from ${{ github.sha }}" \ No newline at end of file diff --git a/.github/workflows/pr-preview.yml b/.github/workflows/pr-preview.yml index a295dab..3973448 100644 --- a/.github/workflows/pr-preview.yml +++ b/.github/workflows/pr-preview.yml @@ -31,7 +31,7 @@ jobs: run: | # Override baseurl for the preview path @" - url: "https://your-domain.com" + url: "https://matthewpersico.github.io" baseurl: "/previews/pr-${{ github.event.pull_request.number }}" "@ | Set-Content -Path /tmp/_config_preview.yml @@ -51,7 +51,7 @@ jobs: with: script: | const prNumber = context.payload.pull_request.number; - const previewUrl = `https://your-domain.com/previews/pr-${prNumber}/`; + const previewUrl = `https://matthewpersico.github.io/previews/pr-${prNumber}/`; const marker = ''; const body = `${marker}\n` + From 3259e2e145bb75d4e09140a12a15b8ac0cb41dd2 Mon Sep 17 00:00:00 2001 From: Matthew Persico Date: Mon, 18 May 2026 16:46:38 -0400 Subject: [PATCH 4/9] Config name was wrong. --- .github/workflows/deploy-site.yml | 2 +- .github/workflows/pr-preview.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-site.yml b/.github/workflows/deploy-site.yml index bf7daf1..66b9c6c 100644 --- a/.github/workflows/deploy-site.yml +++ b/.github/workflows/deploy-site.yml @@ -32,7 +32,7 @@ jobs: baseurl: "" "@ | Set-Content -Path /tmp/_config_deploy.yml - bundle exec jekyll build --config _config.yml,/tmp/_config_deploy.yml + bundle exec jekyll build --config _config.yaml,/tmp/_config_deploy.yml # Preserve any PR preview directories that already live on gh-pages so # that a main-site redeploy does not wipe them out. diff --git a/.github/workflows/pr-preview.yml b/.github/workflows/pr-preview.yml index 3973448..5c8af57 100644 --- a/.github/workflows/pr-preview.yml +++ b/.github/workflows/pr-preview.yml @@ -35,7 +35,7 @@ jobs: baseurl: "/previews/pr-${{ github.event.pull_request.number }}" "@ | Set-Content -Path /tmp/_config_preview.yml - bundle exec jekyll build --config _config.yml,/tmp/_config_preview.yml --destination ./_site_preview + bundle exec jekyll build --config _config.yaml,/tmp/_config_preview.yml --destination ./_site_preview - name: Deploy preview to gh-pages branch previews subdirectory uses: peaceiris/actions-gh-pages@v4 From f8cfa5a2ab0e2f6ef62987d0a3edd25011b903d6 Mon Sep 17 00:00:00 2001 From: Matthew Persico Date: Mon, 18 May 2026 16:49:40 -0400 Subject: [PATCH 5/9] Explicit repo needed. --- _config.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/_config.yaml b/_config.yaml index ee7483c..b9c987b 100644 --- a/_config.yaml +++ b/_config.yaml @@ -24,4 +24,6 @@ plugins: - jekyll-feed - jekyll-sitemap - jekyll-seo-tag - - jekyll-remote-theme \ No newline at end of file + - jekyll-remote-theme + +repository: matthewpersico/matthewpersico.github.io From 82ac8352e3d0bc314b1aa0a8a024609d73887798 Mon Sep 17 00:00:00 2001 From: Matthew Persico Date: Mon, 18 May 2026 16:58:31 -0400 Subject: [PATCH 6/9] Adjust preview url --- .github/workflows/pr-preview.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-preview.yml b/.github/workflows/pr-preview.yml index 5c8af57..d00ffc2 100644 --- a/.github/workflows/pr-preview.yml +++ b/.github/workflows/pr-preview.yml @@ -51,7 +51,7 @@ jobs: with: script: | const prNumber = context.payload.pull_request.number; - const previewUrl = `https://matthewpersico.github.io/previews/pr-${prNumber}/`; + const previewUrl = `https://${context.repo.owner}.github.io/${context.repo.repo}/previews/pr-${prNumber}/`; const marker = ''; const body = `${marker}\n` + From 164957c558c1b2b05fa8ee1190c3baa3030bc3e0 Mon Sep 17 00:00:00 2001 From: Matthew Persico Date: Mon, 18 May 2026 17:01:23 -0400 Subject: [PATCH 7/9] Updated image spacing. --- _posts/2026-05-16-brave-browser.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/_posts/2026-05-16-brave-browser.md b/_posts/2026-05-16-brave-browser.md index 546a030..5b70532 100644 --- a/_posts/2026-05-16-brave-browser.md +++ b/_posts/2026-05-16-brave-browser.md @@ -40,9 +40,13 @@ Chrome uses Google infrastructure (log in with your Google credentials) and Edge There is an explicit "Sync" section in the Brave Settings. On the first platform where you install Brave, you establish a new 'sync chain' and pick which pieces of data to sync with other platforms. -On subsequent platforms, you go to the same "sync" section, but chose to connect to an existing sync chain. On your original platform you chose to View Sync Code. It can be either a QR code that your phone or camera can scan to sync up: ![QR code]({{"/assets/images/2026-05-16-brave-browser/qr.jpg" | relative_url }}) +On subsequent platforms, you go to the same "sync" section, but chose to connect to an existing sync chain. On your original platform you chose to View Sync Code. It can be either a QR code that your phone or camera can scan to sync up: -or you can use a string of 25 words to enter on your new computer to allow permissions to sync: ![25 words]({{"/assets/images/2026-05-16-brave-browser/text.jpg" | relative_url }}) +![QR code]({{"/assets/images/2026-05-16-brave-browser/qr.jpg" | relative_url }}) + +or you can use a string of 25 words to enter on your new computer to allow permissions to sync: + +![25 words]({{"/assets/images/2026-05-16-brave-browser/text.jpg" | relative_url }}) Figure 1 shows my sync device list: From bf3e9efbe68d1ce27f456854054561062abbf076 Mon Sep 17 00:00:00 2001 From: Matthew Persico Date: Mon, 18 May 2026 17:14:59 -0400 Subject: [PATCH 8/9] More relative url changes --- blog.html | 2 +- topics.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/blog.html b/blog.html index e2f89ce..4fa5a40 100644 --- a/blog.html +++ b/blog.html @@ -6,7 +6,7 @@

Latest Posts

    {% for post in site.posts %}
  • -

    {{ post.title }}

    +

    {{ post.title }}

    {{ post.excerpt }}
  • {% endfor %} diff --git a/topics.html b/topics.html index 0b64ca0..88c04ef 100644 --- a/topics.html +++ b/topics.html @@ -6,7 +6,7 @@

    Topics

      {% for topic in site.topics %}
    • -

      {{ topic.name }}

      +

      {{ topic.name }}

      {{ topic.content | markdownify }}

    • {% endfor %} From abd56d3de8f048ea3896b710f644cdf809508daa Mon Sep 17 00:00:00 2001 From: Matthew Persico Date: Tue, 19 May 2026 15:05:54 -0400 Subject: [PATCH 9/9] Updates to get proper PR previews, new url blog.matthewpersico.com --- .github/workflows/deploy-site.yml | 6 +++--- .github/workflows/pr-preview.yml | 8 ++++---- _config.yaml => _config.yml | 0 3 files changed, 7 insertions(+), 7 deletions(-) rename _config.yaml => _config.yml (100%) diff --git a/.github/workflows/deploy-site.yml b/.github/workflows/deploy-site.yml index 66b9c6c..5195580 100644 --- a/.github/workflows/deploy-site.yml +++ b/.github/workflows/deploy-site.yml @@ -28,11 +28,11 @@ jobs: # Override baseurl so the github-pages gem does not inject the # repository name as the baseurl, which would break asset paths. @" - url: "https://matthewpersico.github.io" + url: "https://blog.matthewpersico.com" baseurl: "" "@ | Set-Content -Path /tmp/_config_deploy.yml - bundle exec jekyll build --config _config.yaml,/tmp/_config_deploy.yml + bundle exec jekyll build --config _config.yml,/tmp/_config_deploy.yml # Preserve any PR preview directories that already live on gh-pages so # that a main-site redeploy does not wipe them out. @@ -64,5 +64,5 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./_site - cname: matthewpersico.github.io + cname: blog.matthewpersico.com commit_message: "Deploy main site from ${{ github.sha }}" \ No newline at end of file diff --git a/.github/workflows/pr-preview.yml b/.github/workflows/pr-preview.yml index d00ffc2..a42016a 100644 --- a/.github/workflows/pr-preview.yml +++ b/.github/workflows/pr-preview.yml @@ -31,11 +31,11 @@ jobs: run: | # Override baseurl for the preview path @" - url: "https://matthewpersico.github.io" + url: "https://blog.matthewpersico.com" baseurl: "/previews/pr-${{ github.event.pull_request.number }}" "@ | Set-Content -Path /tmp/_config_preview.yml - bundle exec jekyll build --config _config.yaml,/tmp/_config_preview.yml --destination ./_site_preview + bundle exec jekyll build --config _config.yml,/tmp/_config_preview.yml --destination ./_site_preview - name: Deploy preview to gh-pages branch previews subdirectory uses: peaceiris/actions-gh-pages@v4 @@ -51,7 +51,7 @@ jobs: with: script: | const prNumber = context.payload.pull_request.number; - const previewUrl = `https://${context.repo.owner}.github.io/${context.repo.repo}/previews/pr-${prNumber}/`; + const previewUrl = `https://blog.matthewpersico.com/previews/pr-${prNumber}/`; const marker = ''; const body = `${marker}\n` + @@ -113,4 +113,4 @@ jobs: else { Write-Host "Preview directory '$prDir' not found - nothing to clean up." exit 0 - } \ No newline at end of file + } diff --git a/_config.yaml b/_config.yml similarity index 100% rename from _config.yaml rename to _config.yml