Skip to content

docs: link READMEs to the runnable docs site#252

Closed
adamziel wants to merge 1 commit into
trunkfrom
docs-site-links
Closed

docs: link READMEs to the runnable docs site#252
adamziel wants to merge 1 commit into
trunkfrom
docs-site-links

Conversation

@adamziel
Copy link
Copy Markdown
Collaborator

@adamziel adamziel commented May 2, 2026

Summary

  • Adds a docs-site banner at the top of every component README, the root README, and examples/create-wp-site/README.md. Each component banner deep-links to its matching reference page on the live site (e.g. reference/zip.html).
  • Rewrites the root README's components section as a table with one row per component and a "Live docs" column.
  • Calls out the docs site as the recommended source for code samples — every snippet there is verified against trunk in CI by the existing snippet-tests.yml workflow.

Repo settings (already applied via the API)

  • GitHub Pages enabled with source = GitHub Actions (the docs.yml workflow added in Runnable docs site: live examples for every component #244 now publishes).
  • Repo description set to Standalone, dependency-free PHP libraries for WordPress and PHP projects — XML, ZIP, Git, HTTP, Markdown, Filesystem, and more.
  • Repo homepage set to https://wordpress.github.io/php-toolkit/.

Follow-ups (separate PRs)

  • PR B: extend bin/run-snippets.py so CI fails on any snippet without expected output that isn't explicitly Playground-only — closes the gap that today only enforces snippets already in bin/_expected_outputs.json.
  • PR C: refactor bin/_docs_components.py so per-component README.md (or sibling docs.md) is the source of truth for snippets — fenced ```php blocks plus HTML-comment frontmatter for snippet metadata.

Test plan

  • Pages deployment for trunk succeeds and the linked URLs all resolve.
  • Component README banners render correctly on github.com (the <!-- docs-site-banner --> markers are HTML comments, so they're hidden in rendered output).
  • Root README table renders cleanly.

🤖 Generated with Claude Code

Now that PR #244 is merged and GitHub Pages is enabled, add a banner
pointing readers to https://wordpress.github.io/php-toolkit/ from the
top of every component README, the root README, and the create-wp-site
example. Component banners deep-link to the matching reference page so
readers land directly on the live, executable snippets.

The root README is also restructured around the docs site: the
component list becomes a table where each row links to both the
component README and its live reference page, and a callout makes the
docs site the recommended source for code samples (verified in CI by
the existing snippet-tests workflow).
@adamziel
Copy link
Copy Markdown
Collaborator Author

adamziel commented May 3, 2026

Closing in favor of #256, which does the same README/component-banner work plus the Packagist composer.json metadata, repo homepage, and AGENTS.md pointer. The branch this PR was based on predates the markdown-source migration in #254, so the diff has drifted; #256 was authored against the post-#254 trunk.

@adamziel adamziel closed this May 3, 2026
@adamziel adamziel deleted the docs-site-links branch May 3, 2026 19:39
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