Skip to content

feat: every project's site gets a default Contributing page - #2

Merged
burinc merged 1 commit into
mainfrom
feat/default-contributing-page
Sep 7, 2026
Merged

feat: every project's site gets a default Contributing page#2
burinc merged 1 commit into
mainfrom
feat/default-contributing-page

Conversation

@burinc

@burinc burinc commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Why

Came out of a raylib-android session: it got its own CONTRIBUTING.md plus a mirrored docs/guide/contributing.md so the content would show up on its published site. Copying that into every project that uses this engine is the wrong shape, since "how to open an issue against a jlt-commons project" is the same answer everywhere. This engine already draws that line for base.html/404.html (shared chrome vs. project content); this extends the same idea to a page.

What changes

  • Every project's site now gets guide/contributing.html automatically, right after index.md in the nav, with no config and no file to write.
  • A project that wants something project-specific (known-broken areas, its own escalation path) writes its own docs/guide/contributing.md, discovered the same way any guide page is, and it replaces the default outright.
  • The mechanism is general (discover-doc-ids + a new doc-source, documented in the README under "The default Contributing page"), so a future default page follows the same shape.

Verification

  • bb test: 70 tests, 153 assertions, 0 failures, 0 errors (67 existing + 3 new, covering: default page appears with no project file, correct nav position, project's own file overrides).
  • Ran the CI workflow's own end-to-end demo-project build by hand, including its base-path-escape check, since this touches the URLs every page on every project emits.
  • Built raylib-android against this branch and confirmed guide/contributing.html renders with the right content, shows up in nav, and raylib-android's own docs/check-site.sh still passes (4 guide pages now, up from 2).

After merge

Plan to tag a release and bump raylib-android's pinned tag in .github/workflows/site.yml to pick this up on its published site, then look at doing the same for other jlt-commons projects that use this engine.

raylib-android's own docs got a hand-written CONTRIBUTING.md and a mirrored
docs/guide/contributing.md this session, and it became obvious partway
through that "how to open an issue against a jlt-commons project" is the
same answer for every project using this engine, so it belongs here, on
the same footing as base.html or 404.html, rather than copied into each
project's own docs/guide/.

- resources/content/contributing.md: the default page content (the
  Clojure community etiquette guide, adapted, plus a short invitation).
- src/site/core.clj:
  - discover-doc-ids now adds the engine's default-root-doc-basenames
    (currently just "contributing.md") to a project's guide-dir root
    group, for any name the project has not written itself. Nested
    subdirectories are untouched.
  - new doc-source resolves a doc-id to the project's own file if it
    exists, else the engine's bundled resources/content/<doc-id> — the
    override mechanism. render-all-docs now goes through it instead of a
    raw slurp.
- test/site/core_test.clj: three new tests — a project with no
  contributing.md gets the engine default, it lands in nav right after
  index.md (a sort-order check, not just presence), and a project's own
  docs/guide/contributing.md replaces the default outright.
- README.md: new "The default Contributing page" section documenting the
  mechanism and its override, plus stating the general shape for any
  future default page.

Verified against a real project, not just the fixture suite: built
raylib-android against this checkout and confirmed guide/contributing.html
renders, appears in nav, and raylib-android's own docs/check-site.sh still
passes (33 images, 4 guide pages, up from 2). Also ran the CI workflow's
own end-to-end demo-project build by hand, including its base-path escape
check, since this change touches the URLs every project's pages emit.

bb test: 70 tests, 153 assertions, 0 failures, 0 errors.
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