Skip to content

refactor: add docs-site with locally-sourced docs#510

Merged
m4tx merged 16 commits intomasterfrom
docs-site
Mar 17, 2026
Merged

refactor: add docs-site with locally-sourced docs#510
m4tx merged 16 commits intomasterfrom
docs-site

Conversation

@m4tx
Copy link
Member

@m4tx m4tx commented Mar 15, 2026

See cot-rs/cot-site#77 for the corresponding cot-site PR.

Copilot AI review requested due to automatic review settings March 15, 2026 11:05
@github-actions github-actions bot added C-lib Crate: cot (main library crate) A-ci Area: CI (Continuous Integration) labels Mar 15, 2026
@m4tx m4tx marked this pull request as draft March 15, 2026 11:06
@m4tx m4tx force-pushed the docs-site branch 2 times, most recently from 662edfc to cc0449d Compare March 15, 2026 11:08
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an in-repo “docs-site” application and supporting infrastructure so the Cot guide can be built/served locally from Markdown sources, aligning this repo with the website build pipeline referenced in cot-rs/cot-site#77.

Changes:

  • Introduces a new docs-site/ Rust crate (workspace member) that boots a Cot project wired to cot-site and renders guide pages.
  • Adds container/dev tooling for running the docs site (Dockerfile, compose files, bacon config) plus a new GitHub Actions workflow to build/push an image.
  • Adds documentation pointers from the main README and new docs/README.md, and exposes a new Urls::new helper in the router.

Reviewed changes

Copilot reviewed 13 out of 14 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
docs/README.md New guide-specific README describing how guide Markdown is used and how to build locally.
README.md Links readers to the guide docs and build instructions.
docs-site/src/main.rs New docs-site entrypoint implementing Project and registering guide page structure.
docs-site/Cargo.toml New workspace crate with deps on cot and cot-site.
docs-site/README.md Local development instructions for docs-site (cargo/nightly/bacon).
docs-site/Dockerfile Container build for the docs-site binary and runtime image.
docs-site/compose.yml Production compose definition pointing at GHCR image.
docs-site/compose.dev.yml Dev compose definition building the image locally.
docs-site/bacon.toml Bacon job to run the site with nightly features.
docs-site/.dockerignore Docker build context exclusions for docs-site.
.github/workflows/docker.yml New workflow to build & push the docs-site image from docs-site/.
cot/src/router.rs Adds Urls::new constructor to complement Urls::from_request.
Cargo.toml Registers docs-site as a workspace member.
Cargo.lock Lockfile updates due to adding the new crate and its dependencies.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link

github-actions bot commented Mar 15, 2026

🐰 Bencher Report

Branchdocs-site
Testbedgithub-ubuntu-latest
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
microseconds (µs)
(Result Δ%)
Upper Boundary
microseconds (µs)
(Limit %)
empty_router/empty_router📈 view plot
🚷 view threshold
6,521.80 µs
(+9.71%)Baseline: 5,944.52 µs
7,078.20 µs
(92.14%)
json_api/json_api📈 view plot
🚷 view threshold
1,071.60 µs
(+4.17%)Baseline: 1,028.73 µs
1,182.32 µs
(90.64%)
nested_routers/nested_routers📈 view plot
🚷 view threshold
1,011.70 µs
(+6.74%)Baseline: 947.82 µs
1,080.63 µs
(93.62%)
single_root_route/single_root_route📈 view plot
🚷 view threshold
971.03 µs
(+6.78%)Baseline: 909.36 µs
1,040.69 µs
(93.31%)
single_root_route_burst/single_root_route_burst📈 view plot
🚷 view threshold
20,537.00 µs
(+16.79%)Baseline: 17,584.72 µs
20,864.73 µs
(98.43%)
🐰 View full continuous benchmarking report in Bencher

@m4tx m4tx force-pushed the docs-site branch 10 times, most recently from 1fe8ec5 to 841ce05 Compare March 15, 2026 12:00
@m4tx m4tx marked this pull request as ready for review March 15, 2026 12:13
@m4tx m4tx requested review from ElijahAhianyo, Copilot and seqre March 15, 2026 12:13
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a standalone docs-site crate and supporting tooling so the Cot guide (from docs/) can be built/served locally and packaged as a Docker image, alongside a small router API convenience.

Changes:

  • Add docs-site/ Rust crate + Dockerfile/compose/bacon config to serve the website/guide using locally stored Markdown docs.
  • Add a GitHub Actions workflow to build and push the docs-site Docker image.
  • Add From<&ProjectContext> conversions for cot::router::Urls to simplify URL reversing outside requests.

Reviewed changes

Copilot reviewed 13 out of 15 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
docs/README.md Documents where guide source lives and how to build via docs-site/.
docs-site/src/main.rs Implements the Project wiring for the docs site (apps, middleware, error handler).
docs-site/compose.yml Adds a production compose service pointing at a published GHCR image.
docs-site/compose.dev.yml Adds a dev compose service intended to build the image locally.
docs-site/bacon.toml Adds a bacon job for live-restart while developing the docs site.
docs-site/README.md Development instructions for running the docs site locally.
docs-site/Cargo.toml Defines the standalone docs-site crate and its dependencies.
docs-site/Cargo.lock Locks docs-site dependencies independently of the main workspace.
docs-site.dockerfile Docker build for docs-site binary runtime image.
cot/src/router.rs Adds From<ProjectContext> conversions for Urls.
README.md Links the repository docs/guide setup from the main README.
Cargo.toml Excludes docs-site from the main workspace to keep the primary lockfile clean.
Cargo.lock Updates lockfile entries due to dependency resolution changes.
.github/workflows/docker.yml New workflow to build/push the docs-site image to GHCR.
.dockerignore Adds ignore rules for Docker build context.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@seqre seqre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks fine, I'd just move it from docs-site to docs/site to keep it more contained (and you could move .dockerfile inside as well)

@m4tx m4tx requested a review from seqre March 15, 2026 13:03
Copy link
Member

@seqre seqre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with one comment

@codecov
Copy link

codecov bot commented Mar 15, 2026

Codecov Report

❌ Patch coverage is 0% with 9 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cot/src/router.rs 0.00% 9 Missing ⚠️
Flag Coverage Δ
rust 89.99% <0.00%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
cot/src/router.rs 92.00% <0.00%> (-1.69%) ⬇️

... and 11 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@m4tx m4tx requested a review from seqre March 17, 2026 18:37
@m4tx m4tx enabled auto-merge (squash) March 17, 2026 19:07
@m4tx m4tx disabled auto-merge March 17, 2026 19:13
@m4tx m4tx enabled auto-merge (squash) March 17, 2026 19:14
@m4tx m4tx merged commit cf75df8 into master Mar 17, 2026
38 checks passed
@m4tx m4tx deleted the docs-site branch March 17, 2026 19:33
@cotbot cotbot bot mentioned this pull request Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-ci Area: CI (Continuous Integration) C-lib Crate: cot (main library crate)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants