Skip to content

chore(website): move docusaurus site to root and make react example tertiary - #486

Merged
Ryan-Millard merged 16 commits into
devfrom
chore/refactor-website-urls
Jul 4, 2026
Merged

chore(website): move docusaurus site to root and make react example tertiary#486
Ryan-Millard merged 16 commits into
devfrom
chore/refactor-website-urls

Conversation

@Ryan-Millard

Copy link
Copy Markdown
Owner

Changes & Reason

Changes

Website URL refactor to make the Docusaurus site the main interface.

Reason

Img2Num is not the example app, so this change was necessary so newcomers actually know what we're about.

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

❌ This PR targets main directly — please retarget it to dev

Direct merges into main are not permitted. Please update the base branch of this PR to dev.

Warning

This comment will reappear on every push until the base branch is changed.

We block direct merges to main to ensure the quality of production code.

@github-actions github-actions Bot added js/ts example-app Updates to code related to demonstration (example) applications docs labels Jul 2, 2026
@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@Ryan-Millard, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 15 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 63401944-4ccc-43a6-a579-c8739582b967

📥 Commits

Reviewing files that changed from the base of the PR and between 6d9268d and c5e8f7b.

📒 Files selected for processing (7)
  • .github/workflows/build-docs.yml
  • .github/workflows/ci.yml
  • .github/workflows/deploy.yml
  • bindings/js/doxygen/home_page.dox
  • docs/docs/index.md
  • docs/docusaurus.config.js
  • example-apps/react-js/src/pages/Editor/EditorHelmet.test.jsx

Walkthrough

The PR relocates the React example app to a nested /example-apps/react-js/ deployment path, updating Vite build config, router basename, HTML metadata, and page-level SEO links accordingly. CI/CD workflows are restructured so the docs build now builds the React app internally, replacing the separate build-react-app job. Documentation, README, and script links across the repo are updated to drop the /info/ URL prefix.

Changes

React app subdirectory migration and CI/docs link updates

Layer / File(s) Summary
Build config and app routing base path
example-apps/react-js/vite.config.js, example-apps/react-js/package.json, example-apps/react-js/index.html, example-apps/react-js/src/main.jsx
Vite base/outDir and build script target the nested example-apps path, sitemap plugin removed, and HTML base href, favicon, OG/Twitter/JSON-LD metadata, and router basename point to /Img2Num/example-apps/react-js/.
NavBar links and logo
example-apps/react-js/src/components/NavBar.jsx, NavBar.test.jsx
Docs link and logo image src updated to new paths, with matching test assertions.
Page SEO metadata and dependency fetch URLs
example-apps/react-js/src/pages/**/*Helmet.jsx, EditorHelmet.test.jsx, DependencyCreditsCard.jsx
og:url/canonical links target the nested app path; robots meta assertion removed from a test; dependency data fetched from the app-specific package.json.
CI/CD workflow restructuring for React app build
.github/workflows/build-docs.yml, build-react-app.yml, ci.yml, deploy.yml, docs/package.json, docs/scripts/prebuild.mjs, .prettierignore, docs/.gitignore
Removed build-react-app workflow; docs build now installs deps, downloads WASM artifacts, and builds img2num browser + React app before Docusaurus; deploy simplifies to copy only docs build output.
Documentation site link and config updates
docs/docusaurus.config.js, docs/docs/**/*.md, docs/blog/*.md, docs/scripts/help.js, README.md, CONTRIBUTING.md, packages/js/README.md, pyproject.toml, bindings/js/doxygen/home_page.dox, scripts/help.js
Removed /info/ prefix from baseUrl and docs/changelog/blog links across configuration, API reference pages, and README files.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

  • Ryan-Millard/Img2Num#135: Both PRs touch the same help-script entrypoint logic in docs/scripts/help.js, specifically the exported/used title string formatting.
  • Ryan-Millard/Img2Num#287: Both PRs modify .github/workflows/deploy.yml to change how GitHub Pages build artifacts are assembled and deployed.
  • Ryan-Millard/Img2Num#449: The main PR deletes/reworks .github/workflows/build-react-app.yml, the same workflow file modified in PR #449.

Suggested labels: tooling, build-system

Poem

A rabbit hops to a nested lane,
"/example-apps/" is the new domain! 🐇
Links reshuffled, /info/ set free,
One build now makes both docs and thee.
Hop, deploy, and let it shine! ✨

🚥 Pre-merge checks | ✅ 7 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Coderabbit Config Needs Update ⚠️ Warning PR adds docs/scripts/prebuild.mjs, but .coderabbit.yaml has no .mjs path instruction and wasn't updated in the diff. Add a matching glob (e.g. docs/**/*.mjs or docs/scripts/*.mjs) under reviews.path_instructions, or use an already-covered extension.
✅ Passed checks (7 passed)
Check name Status Explanation
Title check ✅ Passed The title uses a Conventional Commit style and clearly describes the site root move and React example de-prioritization.
Description check ✅ Passed The description is directly related to the URL refactor and the shift to making Docusaurus the main interface.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
No Ai Slop Pr Description ✅ Passed The PR description names the concrete change (website URL refactor) and the rationale (make Docusaurus the main interface for newcomers); no generic slop dominates.
No Strangely-Named Root Markdown Files ✅ Passed The diff adds no markdown files at repo root; only README.md, CONTRIBUTING.md, and CODE_OF_CONDUCT.md exist there.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/refactor-website-urls
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch chore/refactor-website-urls

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot added enhancement New feature or request ux labels Jul 2, 2026
@Ryan-Millard
Ryan-Millard changed the base branch from main to dev July 2, 2026 16:02
@Ryan-Millard

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@github-actions github-actions Bot added the ci label Jul 4, 2026
@coderabbitai coderabbitai Bot added build-system tooling and removed ux enhancement New feature or request labels Jul 4, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 5

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/ci.yml (1)

107-117: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Pass the WASM artifact path through build-docs

./.github/workflows/build-docs.yml already has a WASM download step, but workflow_call only declares image, so ci.yml has no way to pass an artifact path. Either add the missing wasm-artifacts-path input and wire it from cmake-build, or drop the cmake-build dependency if docs no longer use that output.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml around lines 107 - 117, The build-docs reusable
workflow call is missing the WASM artifact path input, so the docs job cannot
consume the output from cmake-build. Update build-docs in ci.yml to either pass
a new wasm-artifacts-path input from cmake-build into
./.github/workflows/build-docs.yml and ensure workflow_call declares it, or
remove the cmake-build dependency if the docs workflow no longer needs that
artifact. Use the build-docs, cmake-build, and workflow_call inputs definitions
to locate the wiring.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@bindings/js/doxygen/home_page.dox`:
- Line 31: The bullet entry in home_page.dox is malformed because the list
marker is written as t* instead of a valid Doxygen bullet, so update the Home
Page list item to use proper bullet syntax in the section containing the project
setup guide link. Locate the affected entry in the Doxygen home page content and
correct the marker so the generated documentation renders it as a list item
rather than plain text.

In `@docs/docs/index.md`:
- Around line 28-33: The Python row’s status badge in the docs table points to
the wrong target, sending readers to the JavaScript package instead of Python.
Update the link in the Python entry so it matches the Python package path used
by the row’s other symbols, keeping the `Python` status badge aligned with the
`Python API Reference` and `Python Changelog` entries.

In `@example-apps/react-js/src/pages/Editor/EditorHelmet.test.jsx`:
- Around line 25-29: Restore the missing robots meta check in
EditorHelmet.test.jsx: the EditorHelmet component still renders the
noindex/nofollow robots tag, so re-add the assertion for the meta[name="robots"]
element alongside the existing description and canonical checks. Use the
existing test setup in EditorHelmet.test.jsx and the EditorHelmet.jsx render
behavior to confirm the content remains "noindex, nofollow".

In `@packages/js/README.md`:
- Around line 104-107: The package badge rows in README still use icon-only
image tags without alt text, so update the `<img>` elements in the JavaScript
and Python package entries to satisfy the MD045 rule. In the README table near
the `packages-js` and `packages-py` badge links, add appropriate `alt`
attributes to each badge image (use empty alt for purely decorative icons, or
descriptive text if the badge conveys meaning) so the package section matches
the accessible pattern used elsewhere.

In `@README.md`:
- Around line 102-105: The icon-only badge images in the README table are
missing alt text, which leaves the MD045 warning unresolved and hurts
accessibility. Update the `<img>` tags in the release/package links to include
either descriptive `alt` text or `alt=""` for purely decorative icons, keeping
the existing link structure and badge labels intact.

---

Outside diff comments:
In @.github/workflows/ci.yml:
- Around line 107-117: The build-docs reusable workflow call is missing the WASM
artifact path input, so the docs job cannot consume the output from cmake-build.
Update build-docs in ci.yml to either pass a new wasm-artifacts-path input from
cmake-build into ./.github/workflows/build-docs.yml and ensure workflow_call
declares it, or remove the cmake-build dependency if the docs workflow no longer
needs that artifact. Use the build-docs, cmake-build, and workflow_call inputs
definitions to locate the wiring.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: bd0a70a4-3f34-4377-b93b-78676a3be431

📥 Commits

Reviewing files that changed from the base of the PR and between 0eb0598 and 6d9268d.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml, !pnpm-lock.yaml
📒 Files selected for processing (42)
  • .github/workflows/build-docs.yml
  • .github/workflows/build-react-app.yml
  • .github/workflows/ci.yml
  • .github/workflows/deploy.yml
  • .prettierignore
  • CONTRIBUTING.md
  • README.md
  • bindings/js/doxygen/home_page.dox
  • docs/.gitignore
  • docs/blog/2025-12-05-launch.md
  • docs/docs/c/api-reference.md
  • docs/docs/cpp/api-reference.md
  • docs/docs/index.md
  • docs/docs/internal/bindings/c/api-reference.md
  • docs/docs/internal/bindings/js/api-reference.md
  • docs/docs/internal/bindings/py/api-reference.md
  • docs/docs/internal/core/api-reference.md
  • docs/docs/internal/example-apps/react-js/components/NavBar/index.md
  • docs/docs/js/index.md
  • docs/docusaurus.config.js
  • docs/package.json
  • docs/scripts/help.js
  • docs/scripts/prebuild.mjs
  • docs/src/pages/index.jsx
  • example-apps/react-js/index.html
  • example-apps/react-js/package.json
  • example-apps/react-js/public/404.html
  • example-apps/react-js/public/robots.txt
  • example-apps/react-js/scripts/help.js
  • example-apps/react-js/src/components/NavBar.jsx
  • example-apps/react-js/src/components/NavBar.test.jsx
  • example-apps/react-js/src/main.jsx
  • example-apps/react-js/src/pages/About/AboutHelmet.jsx
  • example-apps/react-js/src/pages/Credits/CreditsHelmet.jsx
  • example-apps/react-js/src/pages/Credits/DependencyCreditsCard.jsx
  • example-apps/react-js/src/pages/Editor/EditorHelmet.jsx
  • example-apps/react-js/src/pages/Editor/EditorHelmet.test.jsx
  • example-apps/react-js/src/pages/Home/HomeHelmet.jsx
  • example-apps/react-js/vite.config.js
  • packages/js/README.md
  • pyproject.toml
  • scripts/help.js
💤 Files with no reviewable changes (3)
  • .github/workflows/build-react-app.yml
  • example-apps/react-js/public/robots.txt
  • example-apps/react-js/public/404.html
📜 Review details
⏰ Context from checks skipped due to timeout. (4)
  • GitHub Check: Build C/C++ / Build WASM (bindings/js)
  • GitHub Check: Build C/C++ / Build Python
  • GitHub Check: Build C/C++ / Build C & C++
  • GitHub Check: Lint & Validate Code
🧰 Additional context used
📓 Path-based instructions (11)
**/*.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (.editorconfig)

**/*.{js,ts,jsx,tsx}: Use 2-space indentation for JavaScript and TypeScript files
Maintain 200 character maximum line length for JavaScript/TypeScript files

Files:

  • scripts/help.js
  • example-apps/react-js/src/pages/Editor/EditorHelmet.jsx
  • example-apps/react-js/src/main.jsx
  • example-apps/react-js/src/pages/Credits/CreditsHelmet.jsx
  • example-apps/react-js/src/pages/Credits/DependencyCreditsCard.jsx
  • docs/scripts/help.js
  • docs/src/pages/index.jsx
  • example-apps/react-js/src/components/NavBar.jsx
  • example-apps/react-js/src/pages/About/AboutHelmet.jsx
  • example-apps/react-js/scripts/help.js
  • example-apps/react-js/src/pages/Home/HomeHelmet.jsx
  • example-apps/react-js/vite.config.js
  • example-apps/react-js/src/pages/Editor/EditorHelmet.test.jsx
  • docs/docusaurus.config.js
  • example-apps/react-js/src/components/NavBar.test.jsx
**

⚙️ CodeRabbit configuration file

**: # Contributing to Img2Num

Want to contribute to Img2Num? There are a few things you need to know.

We wrote a contribution guide to help you get started.

A few important points:

  • Add tests with your PR — new features and bug fixes must include tests where appropriate. PRs without tests are unlikely to be approved.
  • Follow the repository's coding style rules.
  • Use the issue and PR templates when filing issues or submitting code. Your PR will be rejected if you don't.

If you're unsure what to change, open a discussion and someone will assist you.

Questions?

If you have questions or need help:

Thank you for improving Img2Num! 🎨🚀

**: BasedOnStyle: LLVM
Standard: c++20

--- Basic formatting ---

IndentWidth: 4
ColumnLimit: 100
TabWidth: 4

--- Braces ---

Cpp11BracedListStyle: true
SpaceBeforeCpp11BracedList: true
BreakBeforeBraces: Attach

--- Braced initializers ---

Cpp11BracedListStyle: true

--- Constructor initializer lists ---

PackConstructorInitializers: Never
BreakConstructorInitializers: BeforeComma
ConstructorInitializerIndentWidth: 4

--- Alignment ---

AlignAfterOpenBracket: BlockIndent

--- Pointers ---

PointerAlignment: Left

--- Includes ---

IncludeBlocks: Regroup
SortIncludes: CaseInsensitive

--- Extern "C" cleanliness ---

IndentExternBlock: NoIndent

--- Lambdas ---

AllowShortLambdasOnASingleLine: Inline

--- Functions ---

AllowShortFunctionsOnASingleLine: None

**: root = true

-------------------------

Global defaults

-------------------------

[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
insert_final_newline = true
max_line_lengt...

Files:

  • scripts/help.js
  • example-apps/react-js/src/pages/Editor/EditorHelmet.jsx
  • example-apps/react-js/src/main.jsx
  • docs/blog/2025-12-05-launch.md
  • example-apps/react-js/src/pages/Credits/CreditsHelmet.jsx
  • example-apps/react-js/src/pages/Credits/DependencyCreditsCard.jsx
  • docs/scripts/help.js
  • docs/src/pages/index.jsx
  • docs/scripts/prebuild.mjs
  • CONTRIBUTING.md
  • example-apps/react-js/src/components/NavBar.jsx
  • docs/docs/index.md
  • example-apps/react-js/src/pages/About/AboutHelmet.jsx
  • docs/package.json
  • example-apps/react-js/scripts/help.js
  • example-apps/react-js/src/pages/Home/HomeHelmet.jsx
  • docs/docs/internal/bindings/c/api-reference.md
  • docs/docs/internal/example-apps/react-js/components/NavBar/index.md
  • docs/docs/js/index.md
  • docs/docs/internal/bindings/js/api-reference.md
  • docs/docs/internal/bindings/py/api-reference.md
  • docs/docs/internal/core/api-reference.md
  • example-apps/react-js/vite.config.js
  • example-apps/react-js/src/pages/Editor/EditorHelmet.test.jsx
  • bindings/js/doxygen/home_page.dox
  • pyproject.toml
  • docs/docs/c/api-reference.md
  • docs/docusaurus.config.js
  • docs/docs/cpp/api-reference.md
  • example-apps/react-js/src/components/NavBar.test.jsx
  • example-apps/react-js/index.html
  • packages/js/README.md
  • README.md
  • example-apps/react-js/package.json
scripts/**

⚙️ CodeRabbit configuration file

scripts/**: These are the Img2Num developer scripts. When referencing CLI commands in review
comments, always prefer the top-level ./img2num (shell), img2num.ps1 (PowerShell),
or img2num.bat (CMD) wrapper over direct tool invocations, to support contributors
using Docker.

Files:

  • scripts/help.js
example-apps/**

⚙️ CodeRabbit configuration file

example-apps/**: - Example applications. These are for demonstration; keep them minimal and ensure
they correctly reflect the public API. Flag any use of internal/private APIs.

  • IMPORTANT: These example apps must be a good reflection of how to use Img2Num's
    library, which means that they need good comments and must have clean code. This
    is meant to be external and is designed for others to use to get started.

Files:

  • example-apps/react-js/src/pages/Editor/EditorHelmet.jsx
  • example-apps/react-js/src/main.jsx
  • example-apps/react-js/src/pages/Credits/CreditsHelmet.jsx
  • example-apps/react-js/src/pages/Credits/DependencyCreditsCard.jsx
  • example-apps/react-js/src/components/NavBar.jsx
  • example-apps/react-js/src/pages/About/AboutHelmet.jsx
  • example-apps/react-js/scripts/help.js
  • example-apps/react-js/src/pages/Home/HomeHelmet.jsx
  • example-apps/react-js/vite.config.js
  • example-apps/react-js/src/pages/Editor/EditorHelmet.test.jsx
  • example-apps/react-js/src/components/NavBar.test.jsx
  • example-apps/react-js/index.html
  • example-apps/react-js/package.json
**/*.md

📄 CodeRabbit inference engine (.editorconfig)

**/*.md: Do not trim trailing whitespace in Markdown files
Use 2-space indentation for Markdown files
Do not enforce maximum line length for Markdown files

Files:

  • docs/blog/2025-12-05-launch.md
  • CONTRIBUTING.md
  • docs/docs/index.md
  • docs/docs/internal/bindings/c/api-reference.md
  • docs/docs/internal/example-apps/react-js/components/NavBar/index.md
  • docs/docs/js/index.md
  • docs/docs/internal/bindings/js/api-reference.md
  • docs/docs/internal/bindings/py/api-reference.md
  • docs/docs/internal/core/api-reference.md
  • docs/docs/c/api-reference.md
  • docs/docs/cpp/api-reference.md
  • packages/js/README.md
  • README.md
docs/**/*.{js,jsx,ts,tsx,mdx}

⚙️ CodeRabbit configuration file

docs/**/*.{js,jsx,ts,tsx,mdx}: This is the Docusaurus site source. Check for MDX compatibility, correct
plugin usage, and valid imports. Review docusaurus.config.js changes carefully
for broken routing or plugin config regressions.

Files:

  • docs/scripts/help.js
  • docs/src/pages/index.jsx
  • docs/docusaurus.config.js
docs/docs/**

⚙️ CodeRabbit configuration file

docs/docs/**: All documentation must follow Docusaurus conventions (docs/docs/ folder structure).
Do NOT suggest creating strangely-named markdown files at the repository root
(e.g. COMPREHENSIVE_TEST_REPORT.md, DELIVERABLES.md, SUMMARY.md).
New docs belong either as a dedicated Docusaurus category or integrated into an
existing category such as project-scripts. Verify valid frontmatter
(title, sidebar_label, etc.) and correct sidebar wiring.

Files:

  • docs/docs/index.md
  • docs/docs/internal/bindings/c/api-reference.md
  • docs/docs/internal/example-apps/react-js/components/NavBar/index.md
  • docs/docs/js/index.md
  • docs/docs/internal/bindings/js/api-reference.md
  • docs/docs/internal/bindings/py/api-reference.md
  • docs/docs/internal/core/api-reference.md
  • docs/docs/c/api-reference.md
  • docs/docs/cpp/api-reference.md
**/*.json

📄 CodeRabbit inference engine (.editorconfig)

Do not trim trailing whitespace in JSON files

Files:

  • docs/package.json
  • example-apps/react-js/package.json
.github/workflows/**

⚙️ CodeRabbit configuration file

.github/workflows/**: GitHub Actions workflows. Review for:

  • SHA-pinned action versions for third-party actions (security best practice).
  • Secrets accessed only via ${{ secrets.* }} — never hardcoded.
  • Least-privilege permissions on each job/workflow.
  • Correct job dependency ordering (needs:) and if/condition logic.

Files:

  • .github/workflows/build-docs.yml
  • .github/workflows/ci.yml
  • .github/workflows/deploy.yml
bindings/**

⚙️ CodeRabbit configuration file

bindings/**: Language bindings for the Img2Num library. Ensure the public API surface matches
the core C/C++ headers and that error propagation is handled correctly for each
binding language. Also ensure the relevant docstrings are present to enable
auto-generation of documentation.

Files:

  • bindings/js/doxygen/home_page.dox
**/*.{html,htm}

📄 CodeRabbit inference engine (.editorconfig)

**/*.{html,htm}: Use 2-space indentation for HTML files
Maintain 200 character maximum line length for HTML files

Files:

  • example-apps/react-js/index.html
🧠 Learnings (8)
📓 Common learnings
Learnt from: CR
Repo: Ryan-Millard/Img2Num

Timestamp: 2026-07-04T19:13:38.249Z
Learning: Add tests with your pull request: new features and bug fixes must include tests where appropriate, and PRs without tests are unlikely to be approved.
Learnt from: CR
Repo: Ryan-Millard/Img2Num

Timestamp: 2026-07-04T19:13:38.249Z
Learning: Follow the repository's coding style rules.
Learnt from: CR
Repo: Ryan-Millard/Img2Num

Timestamp: 2026-07-04T19:13:38.249Z
Learning: Use the issue and pull request templates when filing issues or submitting code; PRs that do not use the templates may be rejected.
📚 Learning: 2026-01-04T15:34:04.654Z
Learnt from: Ryan-Millard
Repo: Ryan-Millard/Img2Num PR: 146
File: docs/docs/reference/react/components/ThemeSwitch/tests.md:123-124
Timestamp: 2026-01-04T15:34:04.654Z
Learning: In Docusaurus documentation, relative directory links (e.g., ../ or ../../../hooks/useTheme) resolve to index.md within the target directory. Do not require or force linking to index.md explicitly; such relative links remain valid and should not be changed when reviewing docs under the docs directory.

Applied to files:

  • docs/blog/2025-12-05-launch.md
  • docs/docs/index.md
  • docs/docs/internal/bindings/c/api-reference.md
  • docs/docs/internal/example-apps/react-js/components/NavBar/index.md
  • docs/docs/js/index.md
  • docs/docs/internal/bindings/js/api-reference.md
  • docs/docs/internal/bindings/py/api-reference.md
  • docs/docs/internal/core/api-reference.md
  • docs/docs/c/api-reference.md
  • docs/docs/cpp/api-reference.md
📚 Learning: 2026-02-22T15:20:15.304Z
Learnt from: Ryan-Millard
Repo: Ryan-Millard/Img2Num PR: 263
File: docs/docs/internal/core/api-reference.md:13-13
Timestamp: 2026-02-22T15:20:15.304Z
Learning: In Docusaurus projects, Markdown files (*.md, *.mdx) may contain anchor tags with onClick={(e) => { e.preventDefault(); window.location.href = '...'; }} to force a full page navigation, bypassing React SPA routing for static/external paths. Treat this as intentional and do not flag it as redundant in docs contexts. Apply this guidance broadly to Markdown docs across the repository (not just the single file) and focus reviews on more impactful patterns such as accessibility, SEO, and navigation consistency.

Applied to files:

  • docs/blog/2025-12-05-launch.md
  • CONTRIBUTING.md
  • docs/docs/index.md
  • docs/docs/internal/bindings/c/api-reference.md
  • docs/docs/internal/example-apps/react-js/components/NavBar/index.md
  • docs/docs/js/index.md
  • docs/docs/internal/bindings/js/api-reference.md
  • docs/docs/internal/bindings/py/api-reference.md
  • docs/docs/internal/core/api-reference.md
  • docs/docs/c/api-reference.md
  • docs/docs/cpp/api-reference.md
  • packages/js/README.md
  • README.md
📚 Learning: 2026-04-02T18:39:20.647Z
Learnt from: Krasner
Repo: Ryan-Millard/Img2Num PR: 290
File: core/src/internal/graph.cpp:138-208
Timestamp: 2026-04-02T18:39:20.647Z
Learning: In Ryan-Millard/Img2Num, `add_edge_pixel()` on a `Node` is intentionally designed to allow dual ownership of boundary pixels (the same pixel may appear in the node’s `m_pixels` and also in a neighboring node’s `m_edge_pixels` at the same time). This is required to avoid the SVG “1 pixel boundary problem” (a 1-pixel boundary gap artifact). Treat this as correct behavior: do not review it as a bug, memory/logic misuse, or an invalid data-structure invariant. Note that edge pixels are used only to expand the contour/binary representation for boundary tracing and do not affect node properties such as color.

Applied to files:

  • .prettierignore
📚 Learning: 2026-04-11T22:21:32.583Z
Learnt from: Ryan-Millard
Repo: Ryan-Millard/Img2Num PR: 308
File: Dockerfile.dev:96-97
Timestamp: 2026-04-11T22:21:32.583Z
Learning: In this repo’s development Docker image (Dockerfile.dev), keep the root user as an intentional, acceptable design for dev workflows. Rationale to preserve: pnpm is installed under /root/.local/share/pnpm, /usr/src/app is a host-mounted volume where UID mismatches can cause permission issues, and dev tooling needs root-level flexibility. Do not suggest switching to a non-root USER for Dockerfile.dev unless you can provide a careful, qualified alternative that avoids pnpm path and host-volume permission problems.

Applied to files:

  • .prettierignore
📚 Learning: 2026-04-25T22:11:19.587Z
Learnt from: Ryan-Millard
Repo: Ryan-Millard/Img2Num PR: 327
File: docs/package.json:132-132
Timestamp: 2026-04-25T22:11:19.587Z
Learning: In Ryan-Millard/Img2Num, treat `docusaurus/faster` as a required runtime dependency: ensure it is present in `docs/package.json`. This is needed for Docusaurus 3.10 builds because the project’s `docs/docusaurus.config.js` uses `future: { v4: true }`, enabling `fasterByDefault`, which requires `docusaurus/faster` to be installed; it should not be removed or considered optional for performance in this repo.

Applied to files:

  • .prettierignore
📚 Learning: 2026-05-01T22:50:11.527Z
Learnt from: Ryan-Millard
Repo: Ryan-Millard/Img2Num PR: 339
File: release-please-config.json:18-47
Timestamp: 2026-05-01T22:50:11.527Z
Learning: In this repo, release-please-action v4 preserves '/' verbatim in slash-containing path-based package keys when emitting GitHub Actions output names (e.g., `bindings/c--release_created`). When referencing these step outputs in `job.outputs` (and other expressions), use bracket notation with the exact output name: `${{ steps.release.outputs['bindings/c--release_created'] }}` rather than dot notation. If needed, map the complex step output to a clean job-level output alias so downstream jobs can use dot notation via that alias.

Applied to files:

  • .github/workflows/build-docs.yml
  • .github/workflows/ci.yml
  • .github/workflows/deploy.yml
📚 Learning: 2026-05-19T17:30:09.565Z
Learnt from: Ryan-Millard
Repo: Ryan-Millard/Img2Num PR: 375
File: .github/workflows/cmake-build.yml:86-88
Timestamp: 2026-05-19T17:30:09.565Z
Learning: In Ryan-Millard/Img2Num CI/workflow YAMLs, any `uv sync` command used for the Python package build must include `--no-build-isolation` (do not remove it). If you need deterministic dependency installs for CI, you may add `--frozen` alongside it (e.g., `uv sync --frozen --no-build-isolation`), and it should not conflict with the repo’s build setup.

Applied to files:

  • .github/workflows/build-docs.yml
  • .github/workflows/ci.yml
  • .github/workflows/deploy.yml
🪛 actionlint (1.7.12)
.github/workflows/build-docs.yml

[error] 35-35: property "wasm-artifacts-path" is not defined in object type {image: string}

(expression)


[error] 39-39: property "wasm-artifacts-path" is not defined in object type {image: string}

(expression)

🪛 markdownlint-cli2 (0.22.1)
docs/docs/index.md

[warning] 30-30: Images should have alternate text (alt text)

(MD045, no-alt-text)


[warning] 31-31: Images should have alternate text (alt text)

(MD045, no-alt-text)


[warning] 32-32: Images should have alternate text (alt text)

(MD045, no-alt-text)


[warning] 33-33: Images should have alternate text (alt text)

(MD045, no-alt-text)

packages/js/README.md

[warning] 104-104: Images should have alternate text (alt text)

(MD045, no-alt-text)


[warning] 104-104: Images should have alternate text (alt text)

(MD045, no-alt-text)


[warning] 105-105: Images should have alternate text (alt text)

(MD045, no-alt-text)


[warning] 105-105: Images should have alternate text (alt text)

(MD045, no-alt-text)


[warning] 106-106: Images should have alternate text (alt text)

(MD045, no-alt-text)


[warning] 106-106: Images should have alternate text (alt text)

(MD045, no-alt-text)


[warning] 107-107: Images should have alternate text (alt text)

(MD045, no-alt-text)


[warning] 107-107: Images should have alternate text (alt text)

(MD045, no-alt-text)


[warning] 109-109: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


[warning] 199-199: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)

README.md

[warning] 102-102: Images should have alternate text (alt text)

(MD045, no-alt-text)


[warning] 102-102: Images should have alternate text (alt text)

(MD045, no-alt-text)


[warning] 103-103: Images should have alternate text (alt text)

(MD045, no-alt-text)


[warning] 103-103: Images should have alternate text (alt text)

(MD045, no-alt-text)


[warning] 104-104: Images should have alternate text (alt text)

(MD045, no-alt-text)


[warning] 104-104: Images should have alternate text (alt text)

(MD045, no-alt-text)


[warning] 105-105: Images should have alternate text (alt text)

(MD045, no-alt-text)


[warning] 105-105: Images should have alternate text (alt text)

(MD045, no-alt-text)


[warning] 107-107: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)

🔇 Additional comments (34)
example-apps/react-js/vite.config.js (1)

6-9: LGTM!

Also applies to: 26-26, 36-36

example-apps/react-js/package.json (1)

96-96: LGTM!

Also applies to: 143-144

example-apps/react-js/index.html (1)

24-46: LGTM!

example-apps/react-js/src/components/NavBar.jsx (1)

18-20: LGTM!

Also applies to: 43-43

example-apps/react-js/src/components/NavBar.test.jsx (1)

329-329: LGTM!

example-apps/react-js/src/main.jsx (1)

12-12: 🎯 Functional Correctness

No change needed for basename. React Router treats the trailing slash as valid here; it does not inherently cause matching or double-slash issues.

			> Likely an incorrect or invalid review comment.
example-apps/react-js/src/pages/About/AboutHelmet.jsx (1)

10-11: LGTM!

example-apps/react-js/src/pages/Credits/CreditsHelmet.jsx (1)

10-11: LGTM!

example-apps/react-js/src/pages/Editor/EditorHelmet.jsx (1)

9-9: LGTM!

example-apps/react-js/src/pages/Home/HomeHelmet.jsx (1)

10-11: LGTM!

example-apps/react-js/src/pages/Credits/DependencyCreditsCard.jsx (1)

20-20: LGTM!

.github/workflows/deploy.yml (2)

56-61: LGTM!

Also applies to: 70-71


27-32: 🗄️ Data Integrity & Integration

No cmake-build dependency is needed here.github/workflows/build-docs.yml never declares wasm-artifacts-path, so its WASM download step never runs and the cmake-build job in deploy.yml is unused.

			> Likely an incorrect or invalid review comment.
docs/package.json (1)

106-106: LGTM!

docs/scripts/prebuild.mjs (1)

1-24: LGTM!

.prettierignore (1)

45-45: LGTM!

docs/.gitignore (1)

3-12: LGTM!

docs/docusaurus.config.js (1)

55-55: LGTM!

Also applies to: 187-187

docs/docs/index.md (1)

11-12: LGTM!

docs/docs/internal/example-apps/react-js/components/NavBar/index.md (1)

211-211: LGTM!

docs/docs/js/index.md (1)

183-183: LGTM!

docs/docs/internal/bindings/c/api-reference.md (1)

13-22: LGTM!

docs/docs/internal/bindings/js/api-reference.md (1)

13-22: LGTM!

docs/docs/internal/bindings/py/api-reference.md (1)

13-18: LGTM!

Also applies to: 20-22

docs/src/pages/index.jsx (1)

112-114: LGTM!

example-apps/react-js/scripts/help.js (1)

3-3: LGTM!

docs/blog/2025-12-05-launch.md (1)

19-19: LGTM!

docs/scripts/help.js (1)

3-3: LGTM!

docs/docs/internal/core/api-reference.md (1)

13-22: LGTM!

scripts/help.js (1)

4-4: LGTM!

CONTRIBUTING.md (1)

5-5: LGTM!

pyproject.toml (1)

24-26: LGTM!

docs/docs/c/api-reference.md (1)

13-16: LGTM!

Also applies to: 27-31

docs/docs/cpp/api-reference.md (1)

13-16: LGTM!

Also applies to: 27-31

Comment thread bindings/js/doxygen/home_page.dox Outdated
Comment thread docs/docs/index.md Outdated
Comment thread example-apps/react-js/src/pages/Editor/EditorHelmet.test.jsx
Comment thread packages/js/README.md
Comment thread README.md
Ryan-Millard and others added 3 commits July 4, 2026 21:23
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@Ryan-Millard
Ryan-Millard force-pushed the chore/refactor-website-urls branch from f113fac to c5e8f7b Compare July 4, 2026 19:57
@Ryan-Millard

Copy link
Copy Markdown
Owner Author

@coderabbitai what should the commit message and description for this be? I will squash this PR.

@coderabbitai

coderabbitai Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

@Ryan-Millard, here's a squash commit message/description based on the PR objectives and the changes summarized above:

Commit title (conventional commit style):

refactor(docs): make Docusaurus site the primary site, move React example to /example-apps/react-js/

Commit description:

Restructure the website so the Docusaurus documentation site is served
from the repository root, and the React example app becomes a secondary
page under /example-apps/react-js/ instead of being the default entry
point. This ensures newcomers land on the project's documentation and
purpose first, rather than the example app.

- Move Docusaurus baseUrl from /Img2Num/info/ to /Img2Num/, and update
  all internal doc links, badges, and announcement bar URLs accordingly.
- Update the React example app's Vite base, BrowserRouter basename,
  canonical/OG URLs, favicon path, and build outDir to publish under
  docs/static/example-apps/react-js/.
- Remove the standalone build-react-app workflow; the docs build
  workflow now builds the img2num browser bundle and the React example
  app internally via a new prebuild script (docs/scripts/prebuild.mjs).
- Update deploy.yml to only depend on build-docs (drop the separate
  react-app artifact merge step).
- Update README.md, CONTRIBUTING.md, packages/js/README.md,
  pyproject.toml, and Doxygen pages to point to the new /docs/,
  /changelog/, and /blog/ URL paths (removing the /info/ prefix).
- Remove now-unneeded React example app assets (robots.txt, 404.html,
  vite-plugin-sitemap) since it's no longer served at the site root.
- Fix expected artifact location for the React build in CI and adjust
  .prettierignore to ignore all generated docs/static assets.

Closes: refactor of primary/secondary site structure.

Feel free to trim the body if you'd like a shorter description — but this should cover the main intent plus the supporting technical changes for anyone reading the squashed history.

@Ryan-Millard
Ryan-Millard merged commit a235ec5 into dev Jul 4, 2026
14 checks passed
@Ryan-Millard
Ryan-Millard deleted the chore/refactor-website-urls branch July 4, 2026 20:12
@Ryan-Millard

Copy link
Copy Markdown
Owner Author

Hi @Krasner and @Prachi-Gupta2808.

Just to let you know, this PR shuffled things around:

This is nicer because the example app doesn't really have as nice of a UI and may confuse people into thinking that this project is that web app and not a library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build-system ci docs example-app Updates to code related to demonstration (example) applications js/ts scripts tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant