General thoughts on today
Task List Main drive today has been getting the notes set up on GitHub Pages and linked to a subdomain (details below). Also a bit of inspiration for the next phase (Style, Look & Feel):
Faith
Prayed for Biff and Ginny this morning following a post I saw from Dave on Facebook. He needs dialysis and a kidney transplant, she has degenerate MS. They have a son and it just struck me that there is always someone worse off in life. Prayer List
Exercise
Push-ups:: 75 Free Squats:: 50 Kettle Bell Swings:: 50 DB Curl into Shoulder Press:: 20
Computer
Today’s Progress: Refining Quartz Workflow for GitHub Pages
- Edited the Quartz Config File:
- Attempted to update the Quartz configuration (
config.ts
) to adjust the output directory. This change did not resolve the deployment issue.
- Attempted to update the Quartz configuration (
- Shifted Deployment Strategy:
- Changed the approach to generate HTML files in a dedicated folder (
../published-notes
) outside of the Quartz directory. - This folder is then manually uploaded to the
galiquis.github.io
repository, bypassing previous automation issues.
- Changed the approach to generate HTML files in a dedicated folder (
- Refined Build and Deployment Workflow:
Established a new process for making updates:
- When changes are made to the Obsidian notes folder, run the Quartz build command to generate the static site:
npx quartz build -d ../notes -o ../published-notes
- Navigate to the
published-notes
directory and use Git to manage changes: - Add new or updated files:
git add .
- Commit the changes:
git commit -m "Update site content"
- Push the updated files to the
galiquis.github.io
repository:git push origin main
Now I need a mechanism to run the build command each evening, then commit changes to the published-notes folder.
- When changes are made to the Obsidian notes folder, run the Quartz build command to generate the static site:
Approach: PowerShell Script
I’ve created a PowerShell script to handle these tasks. Here’s how it works:
- Quartz Build Command:
The script navigates to the
quartz
directory and runs:
npx quartz build -d ..\notes -o ..\published-notes
- Commit and Push Changes:
It then navigates to the
published-notes
directory and executes:git add . git commit -m "Update site content" git push origin main
- Return to Original Directory: Finally, the script returns to the original directory to keep the environment tidy.
Here’s the script in full:
# Save the original directory
$originalPath = Get-Location
# Navigate to Quartz directory and build the site
Set-Location -Path "C:\Users\galiq\Documents\Journal\quartz"
Write-Host "Building site with Quartz..."
npx quartz build -d ..\notes -o ..\published-notes
# Navigate to published-notes directory, commit, and push
Set-Location -Path "C:\Users\galiq\Documents\Journal\published-notes"
Write-Host "Adding, committing, and pushing changes to Git..."
git add .
git commit -m "Update site content"
git push origin main
# Return to the original directory and print a completion message
Set-Location -Path $originalPath
Write-Host "Deployment completed! Returned to original directory: $originalPath"
To run the script manually:
.\deploy.ps1
Automate Execution: I need to automate this process to run each evening. The plan is to:
- Use Task Scheduler in Windows to execute the PowerShell script at a set time.
- Schedule the script to ensure nightly builds and deployments happen without manual intervention.
Reflection
This mechanism will ensure that changes in the notes
folder are processed and published consistently. Automating the process reduces manual effort and ensures the live site remains up to date with minimal intervention.
And then themes and DNS changes to integrate it into g-mac.uk
TV
Food
Life
========