Skip to content

chore: modernize the docs site and refresh the README - #639

Merged
mxschmitt merged 1 commit into
mainfrom
chore/modernize-docs-site
Aug 17, 2026
Merged

chore: modernize the docs site and refresh the README#639
mxschmitt merged 1 commit into
mainfrom
chore/modernize-docs-site

Conversation

@mxschmitt

Copy link
Copy Markdown
Owner

Updates the Jekyll toolchain behind https://mxschmitt.github.io/playwright-go/, fixes a few things that were quietly broken on the published site, and brings the README up to par with the python/java/dotnet ones.

Verified with a real Jekyll 4.4.1 build (Ruby 3.4, Docker) against a copy of this tree.

Important

This needs Settings → Pages → Build and deployment → Source switched from "Deploy from a branch" to GitHub Actions before it can deploy. Until then the deploy job will fail. The gh-pages branch becomes unused afterwards.

Dependencies

  • Jekyll ~> 4.3.0~> 4.4 (4.3.4 → 4.4.1), lockfile regenerated from scratch under Ruby 3.4 for arm64-darwin / x86_64-darwin / x86_64-linux.
  • jekyll-remote-theme 0.4.3 → 0.5.2, jekyll-readme-index 0.3.0 → 0.4.0, jekyll-seo-tag 2.8.0 → 2.9.0, kramdown 2.4 → 2.5.2, rouge 4.4 → 4.7, sass-embedded 1.80 → 1.102.
  • Added jekyll-sitemap — the site had no sitemap.xml or robots.txt (/sitemap.xml is a 404 today).
  • Added jemoji, see below.
  • All plugins now declared in the :jekyll_plugins group and listed in _config.yml.

:white_check_mark: was rendering as literal text

The browser support table shows the raw shortcode on the website:

$ curl -s https://mxschmitt.github.io/playwright-go/ | grep white_check_mark
  <td style="text-align: center">:white_check_mark:</td>

With jemoji the same build emits <img class="emoji" … unicode/2705.png>, and 0 raw shortcodes remain.

Alternative worth considering

jemoji pulls in html-pipelinenokogiri + activesupport (native compile in CI) and renders emoji as remote images from githubassets.com. playwright-python and playwright-dotnet instead just put the literal in their README — cheaper, no dependency, no external requests. Happy to switch if preferred.

Site bugs fixed

The entire Go source tree was being published. exclude only listed playwright/, so every .go file plus cmd/, tests/, internal/, scripts/, patches/, examples/ and go.mod was copied into _site and pushed to gh-pages:

$ curl -so /dev/null -w '%{http_code}' https://mxschmitt.github.io/playwright-go/run.go
200

After this change the site is exactly the 10 files it should be: index.html, 404.html, README.md, CONTRIBUTING.md, LICENSE, sitemap.xml, robots.txt, assets/css/*.

Canonical URLs had a double slash. url was https://mxschmitt.github.io/ with a trailing slash on top of baseurl, so every page emitted <link rel="canonical" href="https://mxschmitt.github.io//playwright-go/">.

<meta name="description"> said "Playwright is a Node.js library" on our own Go site. Also added an explicit lang: en-US.

Deployment

Moves to the official GitHub Pages actions — actions/configure-pages@v6actions/upload-pages-artifact@v5actions/deploy-pages@v5 — with workflow_dispatch, a pages concurrency group and least-privilege permissions.

Deliberately not using actions/jekyll-build-pages: it builds with the github-pages gem, which pins Jekyll 3.10 and the GitHub-whitelisted plugin set, and ignores docs/Gemfile entirely. Keeping our own Bundler build is what lets the site stay on 4.4.

The build step was also broken in a quiet way — it ran bundler install inside docs/ and then a bare jekyll build from the repo root, so Gemfile.lock was never actually enforced. Now BUNDLE_GEMFILE is set job-wide and it runs bundle exec jekyll build. Ruby 3.3 → 3.4, plus bundler-cache: true.

README

  • Removes the Go Report Card badge (retired).
  • Adds Documentation, API Reference and Other languages sections — all three sibling READMEs have them, we had none.
  • Adds the #### [Website] | [API reference] | [Example recipes] nav line, matching playwright-java.
  • Header links to playwright.dev instead of microsoft/playwright#readme; adds the missing alt on the gopher image.
  • Rewrites Capabilities around what Playwright actually leads with today, in Go terms and checked against our API: resilient locators (GetByRole/GetByLabel/GetByPlaceholder/GetByText/GetByTestId), auto-wait plus web-first assertions via NewPlaywrightAssertions(), isolation through BrowserContext + StorageState(), Trace Viewer via context.Tracing() and playwright show-trace, and network interception with page.Route(). The old list predated locators, assertions and tracing entirely.
  • Drops the "Is Playwright for Go ready?" section — it read as alpha-stage for a project this mature, and no sibling has an equivalent. Easy to restore.
  • Adds the missing use-local-chrome example, sorts the list, "Headless" → "Headless and headed", one badge per line.
  • All <!-- GEN: --> markers preserved; scripts/update-readme-versions still matches.

Follow-up, not in this PR

There's no .github/dependabot.yml. The last Gemfile touch (#506) was "update jekyll and ruby to solve security alerts" — a bundler entry scoped to /docs would stop that from recurring. Left out to avoid unrequested PR noise.

🤖 Generated with Claude Code

https://claude.ai/code/session_01BJLQbgGSvJhdge6fpNKWst

Jekyll 4.3 -> 4.4 with a regenerated lockfile, plus jemoji so the
`:white_check_mark:` shortcodes in the browser support table actually
render (they are served as literal text today) and jekyll-sitemap for
sitemap.xml/robots.txt.

Fixes two long-standing site bugs: `url` had a trailing slash, so every
canonical URL was emitted with a double slash, and `exclude` only covered
`playwright/`, so the whole Go source tree was published to gh-pages
(https://mxschmitt.github.io/playwright-go/run.go returns 200).

Deployment moves to the official GitHub Pages actions
(configure-pages/upload-pages-artifact/deploy-pages). Keeps our own
Bundler build rather than actions/jekyll-build-pages, which would pin the
site to the github-pages gem set and Jekyll 3.10. The build now runs
`bundle exec jekyll build` with BUNDLE_GEMFILE set, so the lockfile is
actually enforced.

NOTE: needs Settings -> Pages -> Source switched to "GitHub Actions"
before this can deploy.

README gets the Documentation, API Reference and Other languages sections
the python/java/dotnet READMEs have, a Capabilities list rewritten around
locators, auto-wait, assertions and Trace Viewer, and drops the retired
Go Report Card badge.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BJLQbgGSvJhdge6fpNKWst
@mxschmitt
mxschmitt force-pushed the chore/modernize-docs-site branch from bf02614 to 2dce163 Compare August 17, 2026 04:48
@mxschmitt
mxschmitt merged commit 5034630 into main Aug 17, 2026
21 checks passed
@mxschmitt
mxschmitt deleted the chore/modernize-docs-site branch August 17, 2026 04:49
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