Conversation
662edfc to
cc0449d
Compare
There was a problem hiding this comment.
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 tocot-siteand 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 newUrls::newhelper 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.
|
| Branch | docs-site |
| Testbed | github-ubuntu-latest |
Click to view all benchmark results
| Benchmark | Latency | Benchmark 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%) |
1fe8ec5 to
841ce05
Compare
There was a problem hiding this comment.
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 forcot::router::Urlsto 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.
seqre
left a comment
There was a problem hiding this comment.
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)
Codecov Report❌ Patch coverage is
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 11 files with indirect coverage changes 🚀 New features to boost your workflow:
|
See cot-rs/cot-site#77 for the corresponding cot-site PR.