Skip to content

Deploy the demo site from master - #561

Merged
CodeByZach merged 6 commits into
masterfrom
site
Nov 5, 2026
Merged

CodeByZach merged 6 commits into
masterfrom
site

Conversation

@CodeByZach

Copy link
Copy Markdown
Owner

Moves the demo site (codebyzach.github.io/pace) from the gh-pages branch into site/ and deploys it with GitHub Actions.

  • Copy: the homepage, its stylesheet and its theme loader from gh-pages, re-indented to 2 spaces (git diff -w against gh-pages is empty).
  • Fixes: the snippet uses pace-js@1; previews and downloads are compiled with the repo's own color code and the picker's color, so they match the committed theme files; the material theme is listed; previews render in standards mode; zoom is allowed; jQuery 3.7.1; old Internet Explorer code removed; several small bugs fixed (listed in the commit). The page's own progress bar also gets its color back: the old site loaded an uncompiled template for it.
  • Docs: the old docs page becomes a redirect to the README, keeping section links working, and the README drops its link to it.
  • Deploy: the Deploy site workflow (GitHub's Pages actions, github-pages environment, pinned in actions.lock). At deploy time it copies in the repo's pace.min.js, theme templates and color code.

How to verify: assemble the site the way the workflow does, serve it at /pace/, and open it. All 15 previews match the committed themes/blue/ files (and themes/red/ after picking that color), downloads match the committed files, the color picker works, and the console is clean.

After merging: the workflow deploys from master (allowed because the github-pages environment only accepts master). Then switch the Pages source to "GitHub Actions", run the workflow once by hand, and retire gh-pages once the new site is confirmed live.

Bring the homepage, its stylesheet and its theme loader over from the
gh-pages branch (8bf9b5c), re-indented to 2 spaces and otherwise
unchanged (`git diff -w` against gh-pages is empty), so the site can be
deployed from master.

Not copied: the docs page and its assets (the README is the
documentation), the old `color` library build (the repo's
scripts/color.mjs replaces it) and Modernizr (no longer needed). The
next commits update the page accordingly.
- Point the getting-started snippet at pace-js@1 instead of @latest.
- Load the repo's own color code (scripts/color.mjs, copied in at deploy
  time) instead of an old build of the `color` library, and compile the
  previews with the picker's color, so each preview and download matches
  the committed theme files.
- Add the material theme to the theme list.
- Render the previews in standards mode (they had no doctype).
- Allow zooming, update jQuery to 3.7.1, link the Documentation button
  to the README, and stop the browser from requesting a missing favicon.
- Save downloads with a local helper instead of patching `console`.
- Remove code for old Internet Explorer and Chrome Frame, Modernizr,
  the theme loader's unused Node.js branch and a 3D-acceleration hack.
- Fix small bugs: an accidental global, a stray </h4>, an end tag on
  <input>, deprecated jQuery bind/unbind, the page replacing pace's own
  <body> classes, and the color button's label sitting off-center.
- Replace "Submit a theme" with a link to the repo.
The docs page on the site was an old copy of the README. Replace it with
a redirect to the README, keeping links to its sections (#events, ...)
working.
Deploy site/ to GitHub Pages from master with GitHub's Pages actions,
through the github-pages environment. The site gets the repo's
pace.min.js, theme templates and color code at deploy time, so it
always shows the current version. It runs when those files change, or
by hand. Its actions are pinned in actions.lock.
- Keep a downloaded theme's object URL for a minute instead of releasing
  it right after the click, which can make the download fail in Safari.
- Ignore download clicks until the theme's preview has been compiled,
  instead of saving a file containing "undefined".
- Give the deploy job more time than deploy-pages' own 10-minute timeout.
- End the site's HTML and CSS files with a newline, per .editorconfig.
The docs page now redirects to the README, so the link only led back to
the page it was on.
@CodeByZach
CodeByZach merged commit 9f4f237 into master Nov 5, 2026
3 of 4 checks passed
@CodeByZach
CodeByZach deleted the site branch November 5, 2026 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant