diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index ab691246b..e217a76ae 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -6,6 +6,9 @@ on: image: required: true type: string + wasm-artifacts-path: + required: true + type: string secrets: ALGOLIA_APP_ID: required: true @@ -29,7 +32,18 @@ jobs: uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd - name: Install Dependendencies - run: pnpm --filter docs install + run: pnpm install + + - name: Download WASM artifacts + if: ${{ inputs.wasm-artifacts-path }} + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c + with: + name: wasm-build + path: ${{ inputs.wasm-artifacts-path }} + + - name: Build packages/js + # Only build for browser since that is all we need here + run: pnpm -F img2num build:browser - name: Build Docusaurus env: diff --git a/.github/workflows/build-react-app.yml b/.github/workflows/build-react-app.yml deleted file mode 100644 index 3a355c58b..000000000 --- a/.github/workflows/build-react-app.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: Build React App - -on: - workflow_call: - inputs: - image: - required: true - type: string - wasm-artifacts-path: - required: false - type: string - -permissions: - contents: read - -jobs: - build-react-app: - name: Build React Example App - runs-on: ubuntu-latest - container: - image: ${{ inputs.image }} - steps: - - name: Checkout code - # No need for submodules since docs uses NPM - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd - - - name: Install Dependendencies - run: pnpm install - - - name: Download WASM artifacts - if: ${{ inputs.wasm-artifacts-path }} - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c - with: - name: wasm-build - path: ${{ inputs.wasm-artifacts-path }} - - - name: Build img2num module - # Only build for browser since that is all we need here - run: pnpm -F img2num build:browser - - - name: Build React app - run: pnpm -F react-example run build - - - name: Upload React build artifacts - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a - with: - name: react-build - path: example-apps/react-js/dist/ - if-no-files-found: error diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index af584b5cf..dd383cb25 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -104,20 +104,14 @@ jobs: with: image: ${{ needs.set-image.outputs.image }} - build-react-app: - name: Build React App - uses: ./.github/workflows/build-react-app.yml - needs: [set-image, cmake-build] - with: - image: ${{ needs.set-image.outputs.image }} - wasm-artifacts-path: packages/js/build-wasm/ - + # Docs now builds react app internally build-docs: name: Build Documentation Site uses: ./.github/workflows/build-docs.yml - needs: [set-image] + needs: [set-image, cmake-build] with: image: ${{ needs.set-image.outputs.image }} + wasm-artifacts-path: packages/js/build-wasm/ secrets: ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }} ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }} diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 871d7841f..1f4204925 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -30,19 +30,14 @@ jobs: uses: ./.github/workflows/cmake-build.yml with: image: ${{ needs.setup.outputs.image }} - build-react-app: - name: Build React App - uses: ./.github/workflows/build-react-app.yml - needs: [cmake-build, wait-for-image, setup] - with: - wasm-artifacts-path: packages/js/build-wasm/ - image: ${{ needs.setup.outputs.image }} + build-docs: name: Build Documentation Site needs: [wait-for-image, setup] uses: ./.github/workflows/build-docs.yml with: image: ${{ needs.setup.outputs.image }} + wasm-artifacts-path: packages/js/build-wasm/ secrets: ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }} ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }} @@ -50,15 +45,9 @@ jobs: deploy: name: Deploy site to GH Pages - needs: [build-react-app, build-docs, wait-for-image] + needs: [build-docs, wait-for-image] runs-on: ubuntu-latest steps: - - name: Download React build artifacts - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c - with: - name: react-build - path: ./new-react-build - - name: Download Docs build artifacts uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c with: @@ -67,12 +56,11 @@ jobs: - name: Prepare built assets run: | - mkdir -p ./new-build/info + mkdir -p ./new-build # We could just mv, but cp keeps the structure and works like a log for debugging if necessary - cp -r ./new-react-build/* ./new-build - cp -r ./new-docs-build/* ./new-build/info + cp -r ./new-docs-build/* ./new-build - - name: Deploy React App + - name: Deploy Website uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e with: github_token: ${{ secrets.GITHUB_TOKEN }} @@ -81,4 +69,4 @@ jobs: user_email: "github-actions[bot]@users.noreply.github.com" - name: Clean temp folders - run: rm -rf ./new-react-build ./new-docs-build + run: rm -rf ./new-docs-build diff --git a/.prettierignore b/.prettierignore index 9294dee27..a4e9afadc 100644 --- a/.prettierignore +++ b/.prettierignore @@ -42,6 +42,5 @@ packages/py docs/.docusaurus docs/build/ -docs/static/js/api.json -docs/static/docs +docs/static/* docs/docs/js/api/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 60188d1a9..32c3a5f1d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,7 +2,7 @@ Want to contribute to Img2Num? There are a few things you need to know. -We wrote a [contribution guide](https://ryan-millard.github.io/Img2Num/info/docs/contributing) to help you get started. +We wrote a [contribution guide](https://ryan-millard.github.io/Img2Num/docs/contributing) to help you get started. **A few important points:** diff --git a/README.md b/README.md index 4fe371ee0..e3b00e5e7 100644 --- a/README.md +++ b/README.md @@ -20,8 +20,8 @@ It converts raster images (like PNGs and JPGs) into clean SVGs with _high accura [![Stars](https://img.shields.io/github/stars/Ryan-Millard/Img2Num?style=social)](https://github.com/Ryan-Millard/Img2Num) [![Docker Pulls](https://img.shields.io/docker/pulls/ryanmillard/img2num-dev)](https://hub.docker.com/repository/docker/ryanmillard/img2num-dev/general) [![Open in Codespaces](https://img.shields.io/badge/-Open%20in%20Codespaces-black?logo=github)](https://codespaces.new/Ryan-Millard/Img2Num) -[![Docs](https://img.shields.io/badge/docs-full-blue?logo=gitbook&logoColor=white)](https://ryan-millard.github.io/Img2Num/info/docs/) -[![Changelog](https://img.shields.io/badge/changelog-full-orange?logo=git&logoColor=white)](https://ryan-millard.github.io/Img2Num/info/changelog/) +[![Docs](https://img.shields.io/badge/docs-full-blue?logo=gitbook&logoColor=white)](https://ryan-millard.github.io/Img2Num/docs/) +[![Changelog](https://img.shields.io/badge/changelog-full-orange?logo=git&logoColor=white)](https://ryan-millard.github.io/Img2Num/changelog/) ## Contents @@ -58,7 +58,7 @@ It converts raster images (like PNGs and JPGs) into clean SVGs with _high accura ### What are you waiting for? -Try our [image to color-by-number demo](https://ryan-millard.github.io/Img2Num/)! +Try our [image to color-by-number demo](https://ryan-millard.github.io/Img2Num/example-apps/react-js/)! @@ -99,29 +99,29 @@ Try our [image to color-by-number demo](https://ryan-millard.github.io/Img2Num/) | Language | Package Info | |-----------:|:------------| -| | [![Docs](https://img.shields.io/badge/docs-C-A8B9CC?logo=gitbook&logoColor=white)](https://ryan-millard.github.io/Img2Num/info/docs/c/) [![C Changelog](https://img.shields.io/badge/changelog-C-A8B9CC?logo=c)](https://ryan-millard.github.io/Img2Num/info/changelog/c/) | -| | [![Docs](https://img.shields.io/badge/docs-C++-00599C?logo=gitbook&logoColor=white)](https://ryan-millard.github.io/Img2Num/info/docs/cpp/) [![C++ Changelog](https://img.shields.io/badge/changelog-C%2B%2B-00599C?logo=c%2B%2B&logoColor=white)](https://ryan-millard.github.io/Img2Num/info/changelog/cpp/) | -| | [![npm](https://img.shields.io/npm/v/img2num?logo=npm)](https://www.npmjs.com/package/img2num) ![Downloads](https://img.shields.io/npm/dm/img2num?logo=npm) [![Docs](https://img.shields.io/badge/docs-JavaScript-F7DF1E?logo=gitbook&logoColor=white)](https://ryan-millard.github.io/Img2Num/info/docs/js/) [![JavaScript Changelog](https://img.shields.io/badge/changelog-JavaScript-F7DF1E?logo=javascript)](https://ryan-millard.github.io/Img2Num/info/changelog/js/) | -| | ![PyPI](https://img.shields.io/pypi/v/img2num?logo=pypi) [![PyPI Downloads](https://img.shields.io/pypi/dm/img2num?logo=pypi)](https://pypi.org/project/img2num/) [![Supported Versions](https://img.shields.io/pypi/pyversions/img2num?logo=python)](https://pypi.org/project/img2num/) [![Docs](https://img.shields.io/badge/docs-Python-3776AB?logo=gitbook&logoColor=white)](https://ryan-millard.github.io/Img2Num/info/docs/py/) [![Python Changelog](https://img.shields.io/badge/changelog-Python-3776AB?logo=python)](https://ryan-millard.github.io/Img2Num/info/changelog/py/) | +| | [![Docs](https://img.shields.io/badge/docs-C-A8B9CC?logo=gitbook&logoColor=white)](https://ryan-millard.github.io/Img2Num/docs/c/) [![C Changelog](https://img.shields.io/badge/changelog-C-A8B9CC?logo=c)](https://ryan-millard.github.io/Img2Num/changelog/c/) | +| | [![Docs](https://img.shields.io/badge/docs-C++-00599C?logo=gitbook&logoColor=white)](https://ryan-millard.github.io/Img2Num/docs/cpp/) [![C++ Changelog](https://img.shields.io/badge/changelog-C%2B%2B-00599C?logo=c%2B%2B&logoColor=white)](https://ryan-millard.github.io/Img2Num/changelog/cpp/) | +| | [![npm](https://img.shields.io/npm/v/img2num?logo=npm)](https://www.npmjs.com/package/img2num) ![Downloads](https://img.shields.io/npm/dm/img2num?logo=npm) [![Docs](https://img.shields.io/badge/docs-JavaScript-F7DF1E?logo=gitbook&logoColor=white)](https://ryan-millard.github.io/Img2Num/docs/js/) [![JavaScript Changelog](https://img.shields.io/badge/changelog-JavaScript-F7DF1E?logo=javascript)](https://ryan-millard.github.io/Img2Num/changelog/js/) | +| | ![PyPI](https://img.shields.io/pypi/v/img2num?logo=pypi) [![PyPI Downloads](https://img.shields.io/pypi/dm/img2num?logo=pypi)](https://pypi.org/project/img2num/) [![Supported Versions](https://img.shields.io/pypi/pyversions/img2num?logo=python)](https://pypi.org/project/img2num/) [![Docs](https://img.shields.io/badge/docs-Python-3776AB?logo=gitbook&logoColor=white)](https://ryan-millard.github.io/Img2Num/docs/py/) [![Python Changelog](https://img.shields.io/badge/changelog-Python-3776AB?logo=python)](https://ryan-millard.github.io/Img2Num/changelog/py/) | ## Community Links -[![Changelog](https://img.shields.io/badge/Changelog-Full-orange?logo=git&logoColor=white)](https://ryan-millard.github.io/Img2Num/info/changelog/) +[![Changelog](https://img.shields.io/badge/Changelog-Full-orange?logo=git&logoColor=white)](https://ryan-millard.github.io/Img2Num/changelog/) [![Contributing](https://img.shields.io/badge/Contributing-Guide-blue?logo=github)](https://github.com/Ryan-Millard/Img2Num/blob/main/CONTRIBUTING.md) [![Issues](https://img.shields.io/badge/Issues-Available-brightgreen?logo=github)](https://github.com/Ryan-Millard/Img2Num/issues/views/1151) [![Good First Issues](https://img.shields.io/badge/Good%20First%20Issues-Welcome-6cc644?logo=github)](https://github.com/Ryan-Millard/Img2Num/issues/views/1155) -[![Blog](https://img.shields.io/badge/Blog-Updates-ff6f00?logo=githubpages)](https://ryan-millard.github.io/Img2Num/info/blog/) +[![Blog](https://img.shields.io/badge/Blog-Updates-ff6f00?logo=githubpages)](https://ryan-millard.github.io/Img2Num/blog/) [![GitHub Discussions](https://img.shields.io/badge/discussions-join_the_chat-4c1?logo=github)](https://github.com/Ryan-Millard/Img2Num/discussions) ## Quick Start ### C / C++ -[![Documentation](https://img.shields.io/badge/Documentation-C-A8B9CC?logo=gitbook&logoColor=white)](https://ryan-millard.github.io/Img2Num/info/docs/c/) -[![Documentation](https://img.shields.io/badge/Documentation-C++-00599C?logo=gitbook&logoColor=white)](https://ryan-millard.github.io/Img2Num/info/docs/cpp/) +[![Documentation](https://img.shields.io/badge/Documentation-C-A8B9CC?logo=gitbook&logoColor=white)](https://ryan-millard.github.io/Img2Num/docs/c/) +[![Documentation](https://img.shields.io/badge/Documentation-C++-00599C?logo=gitbook&logoColor=white)](https://ryan-millard.github.io/Img2Num/docs/cpp/) This process is too detailed to put in a `README.md` file, so please see our documentation: -- [C Documentation](https://ryan-millard.github.io/Img2Num/info/docs/c/) -- [C++ Documentation](https://ryan-millard.github.io/Img2Num/info/docs/cpp/) +- [C Documentation](https://ryan-millard.github.io/Img2Num/docs/c/) +- [C++ Documentation](https://ryan-millard.github.io/Img2Num/docs/cpp/) > [!TIP] > You can install the library from our GitHub releases: @@ -133,9 +133,9 @@ This process is too detailed to put in a `README.md` file, so please see our doc -For more detailed information on installing this package, please refer to [our documentation](https://ryan-millard.github.io/Img2Num/info/docs/js/): +For more detailed information on installing this package, please refer to [our documentation](https://ryan-millard.github.io/Img2Num/docs/js/): -[![Docs](https://img.shields.io/badge/docs-JavaScript-F7DF1E?logo=gitbook&logoColor=white)](https://ryan-millard.github.io/Img2Num/info/docs/js/) +[![Docs](https://img.shields.io/badge/docs-JavaScript-F7DF1E?logo=gitbook&logoColor=white)](https://ryan-millard.github.io/Img2Num/docs/js/) #### CDN @@ -164,9 +164,9 @@ import { imageToSvg } from "img2num"; -For more detailed information on installing this package, please refer to [our documentation](https://ryan-millard.github.io/Img2Num/info/docs/py/): +For more detailed information on installing this package, please refer to [our documentation](https://ryan-millard.github.io/Img2Num/docs/py/): -[![Docs](https://img.shields.io/badge/docs-Python-3776AB?logo=gitbook&logoColor=white)](https://ryan-millard.github.io/Img2Num/info/docs/py/) +[![Docs](https://img.shields.io/badge/docs-Python-3776AB?logo=gitbook&logoColor=white)](https://ryan-millard.github.io/Img2Num/docs/py/) #### Install Img2Num using pip @@ -199,7 +199,7 @@ Subdirectories retain their own licenses: ## Can't find something? -If you need something, see [our documentation](https://ryan-millard.github.io/Img2Num/info/docs/). +If you need something, see [our documentation](https://ryan-millard.github.io/Img2Num/docs/). If you can't find it, feel free to open an [issue](https://github.com/Ryan-Millard/Img2Num/issues/new) to request assistance with finding or creating what you need. @@ -212,7 +212,7 @@ If you can't find it, feel free to open an [issue](https://github.com/Ryan-Milla > [!NOTE] > ### Maintainers wanted > We’re looking for new maintainers. -> [Read more here](https://ryan-millard.github.io/Img2Num/info/blog/img2num-maintainer-expansion/). +> [Read more here](https://ryan-millard.github.io/Img2Num/blog/img2num-maintainer-expansion/). ## Contributors & Credits diff --git a/bindings/js/doxygen/home_page.dox b/bindings/js/doxygen/home_page.dox index f62b61b78..363ae0a67 100644 --- a/bindings/js/doxygen/home_page.dox +++ b/bindings/js/doxygen/home_page.dox @@ -28,7 +28,7 @@ * \endcode * * For extensive documentation, please see the - * [project setup guide](/Img2Num/info/docs/next/contributing/setup-and-dependencies/) +* [project setup guide](/Img2Num/docs/contributing/setup-and-dependencies/) * * This will generate the necessary WASM files for use in JavaScript. You can then integrate them into your web * projects or Node.js applications. diff --git a/docs/.gitignore b/docs/.gitignore index eba7249c8..ccf2cfbca 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -1,11 +1,15 @@ # Dependencies node_modules + +# Static files /static/docs/internal/**/api/* !/static/docs/internal/**/api/.gitkeep /static/docs/cpp/api/* !/static/docs/cpp/api/.gitkeep /static/docs/c/api/* !/static/docs/c/api/.gitkeep +/static/example-apps/react-js/* +!/static/example-apps/react-js/.gitkeep # Production /build diff --git a/docs/blog/2025-12-05-launch.md b/docs/blog/2025-12-05-launch.md index 6f51bd0b3..0e835dcca 100644 --- a/docs/blog/2025-12-05-launch.md +++ b/docs/blog/2025-12-05-launch.md @@ -16,6 +16,6 @@ Instead, it is now a library that supports C, C++, Python, and JavaScript. {/* truncate */} -Try it out online at [https://ryan-millard.github.io/Img2Num/](https://ryan-millard.github.io/Img2Num/) and start coloring your favorite images today! +Try it out online at [https://ryan-millard.github.io/Img2Num/example-apps/react-js/](https://ryan-millard.github.io/Img2Num/example-apps/react-js/) and start coloring your favorite images today! Stay tuned for tutorials, tips, and updates right here on the blog. diff --git a/docs/docs/c/api-reference.md b/docs/docs/c/api-reference.md index 150bf2f8c..aa09c3dd4 100644 --- a/docs/docs/c/api-reference.md +++ b/docs/docs/c/api-reference.md @@ -10,10 +10,10 @@ import FullscreenIframe from "@site/src/components/FullscreenIframe"; export const DocsLink = () => ( { e.preventDefault(); - window.location.href = "/Img2Num/info/docs/c/api/"; + window.location.href = "/Img2Num/docs/c/api/"; }} > {" "} @@ -24,8 +24,8 @@ export const DocsLink = () => ( > Don't like iframes? > Visit the{' '} directly. - + ## About this page -This page is a direct proxy for the{' '} { e.preventDefault(); window.location.href = "/Img2Num/info/docs/c/api/"; }}> Doxygen documentation generated from the C core directory. +This page is a direct proxy for the{' '} { e.preventDefault(); window.location.href = "/Img2Num/docs/c/api/"; }}> Doxygen documentation generated from the C core directory. diff --git a/docs/docs/cpp/api-reference.md b/docs/docs/cpp/api-reference.md index 3fc2a1e03..93cdd6d9d 100644 --- a/docs/docs/cpp/api-reference.md +++ b/docs/docs/cpp/api-reference.md @@ -10,10 +10,10 @@ import FullscreenIframe from "@site/src/components/FullscreenIframe"; export const DocsLink = () => ( { e.preventDefault(); - window.location.href = "/Img2Num/info/docs/cpp/api/"; + window.location.href = "/Img2Num/docs/cpp/api/"; }} > {" "} @@ -24,8 +24,8 @@ export const DocsLink = () => ( > Don't like iframes? > Visit the{' '} directly. - + ## About this page -This page is a direct proxy for the{' '} { e.preventDefault(); window.location.href = "/Img2Num/info/docs/cpp/api/"; }}> Doxygen documentation generated from the C++ core directory. +This page is a direct proxy for the{' '} { e.preventDefault(); window.location.href = "/Img2Num/docs/cpp/api/"; }}> Doxygen documentation generated from the C++ core directory. diff --git a/docs/docs/index.md b/docs/docs/index.md index 16f6d197b..4cfc7a304 100644 --- a/docs/docs/index.md +++ b/docs/docs/index.md @@ -8,8 +8,8 @@ sidebar_position: 1 Img2Num is a lightweight, high-performance library for converting raster images to SVGs with ease and speed. -[![Docs](https://img.shields.io/badge/docs-full-blue?logo=gitbook&logoColor=white)](https://ryan-millard.github.io/Img2Num/info/docs/next/) -[![Changelog](https://img.shields.io/badge/changelog-full-orange?logo=git&logoColor=white)](https://ryan-millard.github.io/Img2Num/info/changelog/) +[![Docs](https://img.shields.io/badge/docs-full-blue?logo=gitbook&logoColor=white)](https://ryan-millard.github.io/Img2Num/docs/) +[![Changelog](https://img.shields.io/badge/changelog-full-orange?logo=git&logoColor=white)](https://ryan-millard.github.io/Img2Num/changelog/) ## Quick Overview @@ -25,12 +25,12 @@ Img2Num is a lightweight, high-performance library for converting raster images ## API Bindings -| Language | Status | Docs | Changelog | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| | [![Status](https://img.shields.io/badge/status-active_development-orange?logo=github)](https://github.com/Ryan-Millard/Img2Num/tree/main/core) | [JS API Reference](./js) | [![C Changelog](https://img.shields.io/badge/changelog-C-A8B9CC?logo=c)](https://ryan-millard.github.io/Img2Num/info/changelog/c/) | -| | [![Status](https://img.shields.io/badge/status-active_development-orange?logo=github)](https://github.com/Ryan-Millard/Img2Num/tree/main/bindings/c) | [C++ API Reference](./cpp) | [![C++ Changelog](https://img.shields.io/badge/changelog-C%2B%2B-00599C?logo=c%2B%2B&logoColor=white)](https://ryan-millard.github.io/Img2Num/info/changelog/cpp/) | -| | [![Status](https://img.shields.io/badge/status-active_development-orange?logo=github)](https://github.com/Ryan-Millard/Img2Num/tree/main/packages/js) | [C API Reference](./c) | [![JavaScript Changelog](https://img.shields.io/badge/changelog-JavaScript-F7DF1E?logo=javascript)](https://ryan-millard.github.io/Img2Num/info/changelog/js/) | -| | [![Status](https://img.shields.io/badge/status-active_development-orange?logo=github)](https://github.com/Ryan-Millard/Img2Num/tree/main/packages/js) | [Python API Reference](./py) | [![Python Changelog](https://img.shields.io/badge/changelog-Python-3776AB?logo=python)](https://ryan-millard.github.io/Img2Num/info/changelog/py/) | +| Language | Status | Docs | Changelog | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| | [![Status](https://img.shields.io/badge/status-active_development-orange?logo=github)](https://github.com/Ryan-Millard/Img2Num/tree/main/core) | [JS API Reference](./js) | [![C Changelog](https://img.shields.io/badge/changelog-C-A8B9CC?logo=c)](https://ryan-millard.github.io/Img2Num/changelog/c/) | +| | [![Status](https://img.shields.io/badge/status-active_development-orange?logo=github)](https://github.com/Ryan-Millard/Img2Num/tree/main/bindings/c) | [C++ API Reference](./cpp) | [![C++ Changelog](https://img.shields.io/badge/changelog-C%2B%2B-00599C?logo=c%2B%2B&logoColor=white)](https://ryan-millard.github.io/Img2Num/changelog/cpp/) | +| | [![Status](https://img.shields.io/badge/status-active_development-orange?logo=github)](https://github.com/Ryan-Millard/Img2Num/tree/main/packages/js) | [C API Reference](./c) | [![JavaScript Changelog](https://img.shields.io/badge/changelog-JavaScript-F7DF1E?logo=javascript)](https://ryan-millard.github.io/Img2Num/changelog/js/) | +| | [![Status](https://img.shields.io/badge/status-active_development-orange?logo=github)](https://github.com/Ryan-Millard/Img2Num/tree/main/packages/py) | [Python API Reference](./py) | [![Python Changelog](https://img.shields.io/badge/changelog-Python-3776AB?logo=python)](https://ryan-millard.github.io/Img2Num/changelog/py/) | --- diff --git a/docs/docs/internal/bindings/c/api-reference.md b/docs/docs/internal/bindings/c/api-reference.md index 107bfd653..ab33b8631 100644 --- a/docs/docs/internal/bindings/c/api-reference.md +++ b/docs/docs/internal/bindings/c/api-reference.md @@ -10,13 +10,13 @@ import FullscreenIframe from '@site/src/components/FullscreenIframe'; > Don't like iframes? Visit the{' '} - { e.preventDefault(); window.location.href = "/Img2Num/info/docs/c/api/"; }}> Doxygen documentation {' '} directly. + { e.preventDefault(); window.location.href = "/Img2Num/docs/c/api/"; }}> Doxygen documentation {' '} directly. ## About this page -This page is a direct proxy for the{' '} { e.preventDefault(); window.location.href = "/Img2Num/info/docs/c/api/"; }}> Doxygen documentation generated from the `bindings/c` directory. +This page is a direct proxy for the{' '} { e.preventDefault(); window.location.href = "/Img2Num/docs/c/api/"; }}> Doxygen documentation generated from the `bindings/c` directory. diff --git a/docs/docs/internal/bindings/js/api-reference.md b/docs/docs/internal/bindings/js/api-reference.md index ea804a128..5ec84d751 100644 --- a/docs/docs/internal/bindings/js/api-reference.md +++ b/docs/docs/internal/bindings/js/api-reference.md @@ -10,13 +10,13 @@ import FullscreenIframe from '@site/src/components/FullscreenIframe'; > Don't like iframes? Visit the{' '} - { e.preventDefault(); window.location.href = "/Img2Num/info/docs/internal/bindings/js/api/"; }}> Doxygen documentation {' '} directly. + { e.preventDefault(); window.location.href = "/Img2Num/docs/internal/bindings/js/api/"; }}> Doxygen documentation {' '} directly. ## About this page -This page is a direct proxy for the{' '} { e.preventDefault(); window.location.href = "/Img2Num/info/docs/internal/bindings/js/api/"; }}> Doxygen documentation generated from the `bindings/js` directory. +This page is a direct proxy for the{' '} { e.preventDefault(); window.location.href = "/Img2Num/docs/internal/bindings/js/api/"; }}> Doxygen documentation generated from the `bindings/js` directory. diff --git a/docs/docs/internal/bindings/py/api-reference.md b/docs/docs/internal/bindings/py/api-reference.md index 3b42c3748..5db924fd8 100644 --- a/docs/docs/internal/bindings/py/api-reference.md +++ b/docs/docs/internal/bindings/py/api-reference.md @@ -10,13 +10,13 @@ import FullscreenIframe from '@site/src/components/FullscreenIframe'; > Don't like iframes? Visit the{' '} - { e.preventDefault(); window.location.href = "/Img2Num/info/docs/internal/bindings/py/api/"; }}> Doxygen documentation {' '} directly. + { e.preventDefault(); window.location.href = "/Img2Num/docs/internal/bindings/py/api/"; }}> Doxygen documentation {' '} directly. ## About this page -This page is a direct proxy for the{' '} { e.preventDefault(); window.location.href = "/Img2Num/info/docs/internal/bindings/py/api/"; }}> Doxygen documentation generated from the `bindings/py` directory. +This page is a direct proxy for the{' '} { e.preventDefault(); window.location.href = "/Img2Num/docs/internal/bindings/py/api/"; }}> Doxygen documentation generated from the `bindings/py` directory. diff --git a/docs/docs/internal/core/api-reference.md b/docs/docs/internal/core/api-reference.md index 0b146ed11..4c758f8be 100644 --- a/docs/docs/internal/core/api-reference.md +++ b/docs/docs/internal/core/api-reference.md @@ -10,13 +10,13 @@ import FullscreenIframe from '@site/src/components/FullscreenIframe'; > Don't like iframes? Visit the{' '} - { e.preventDefault(); window.location.href = "/Img2Num/info/docs/internal/core/api/"; }}> Doxygen documentation {' '} directly. + { e.preventDefault(); window.location.href = "/Img2Num/docs/internal/core/api/"; }}> Doxygen documentation {' '} directly. ## About this page -This page is a direct proxy for the{' '} { e.preventDefault(); window.location.href = "/Img2Num/info/docs/internal/core/api/"; }}> Doxygen documentation generated from the C++ core directory. +This page is a direct proxy for the{' '} { e.preventDefault(); window.location.href = "/Img2Num/docs/internal/core/api/"; }}> Doxygen documentation generated from the C++ core directory. diff --git a/docs/docs/internal/example-apps/react-js/components/NavBar/index.md b/docs/docs/internal/example-apps/react-js/components/NavBar/index.md index 97f3e1c80..9d4a21a0d 100644 --- a/docs/docs/internal/example-apps/react-js/components/NavBar/index.md +++ b/docs/docs/internal/example-apps/react-js/components/NavBar/index.md @@ -208,7 +208,7 @@ const INTERNAL_LINKS = [ ]; const EXTERNAL_LINKS = [ - { href: "https://ryan-millard.github.io/Img2Num/info/", label: "Docs", icon: Info, tooltip: "View documentation" }, + { href: "https://ryan-millard.github.io/Img2Num/", label: "Docs", icon: Info, tooltip: "View documentation" }, { href: "https://github.com/Ryan-Millard/Img2Num", label: "GitHub", diff --git a/docs/docs/js/index.md b/docs/docs/js/index.md index 6b5988279..a3ef34acd 100644 --- a/docs/docs/js/index.md +++ b/docs/docs/js/index.md @@ -180,7 +180,7 @@ writeFileSync("output.svg", svg); - [Documentation](/docs/js/docs/) - [GitHub repository](https://github.com/Ryan-Millard/Img2Num) -- [React demo app](https://ryan-millard.github.io/Img2Num/) +- [React demo app](https://ryan-millard.github.io/Img2Num/example-apps/react-js/) ## License diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 8e421d7f5..a2c0daf4a 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -52,7 +52,7 @@ const config = { url: "https://ryan-millard.github.io/", // Set the // pathname under which your site is served // For GitHub pages deployment, it is often '//' - baseUrl: "/Img2Num/info/", + baseUrl: "/Img2Num/", // GitHub Pages fix: canonical URL with trailing slash trailingSlash: true, @@ -183,10 +183,11 @@ const config = { }, announcementBar: { - id: "docs-refactor-notice", - content: `⚠️ Some documentation pages are incomplete due to a recent refactor. Learn more.`, - backgroundColor: "#fdfd96", // light background - textColor: "#091E42", // dark text + id: "support_us", // Unique ID + content: `⚠️Some links may be broken. If you find any, please let us know on +issue #404. Thank you!`, + backgroundColor: "var(--accent)", + textColor: "var(--white)", isCloseable: true, }, diff --git a/docs/package.json b/docs/package.json index 3a78fa74a..45d3d5af1 100644 --- a/docs/package.json +++ b/docs/package.json @@ -103,7 +103,7 @@ "help": "node scripts/help.js", "docusaurus": "docusaurus", "start": "docusaurus start --host 0.0.0.0 --poll 1000", - "prebuild": "pnpm doxygen", + "prebuild": "node scripts/prebuild.mjs", "build": "docusaurus build", "swizzle": "docusaurus swizzle", "deploy": "docusaurus deploy", diff --git a/docs/scripts/help.js b/docs/scripts/help.js index e008583a2..d114762f4 100644 --- a/docs/scripts/help.js +++ b/docs/scripts/help.js @@ -1,8 +1,6 @@ import { runFuzzyCli, readPackageJsonScripts } from "img2num-dev-scripts"; -const title = `Img2Num Docs CLI Scripts -Also see: https://ryan-millard.github.io/Img2Num/info/docs/category/-project-scripts -`; +const title = `Img2Num Docs CLI Scripts`; try { const { flat: items, basicItems } = readPackageJsonScripts(new URL("../package.json", import.meta.url)); diff --git a/docs/scripts/prebuild.mjs b/docs/scripts/prebuild.mjs new file mode 100644 index 000000000..bab61ab60 --- /dev/null +++ b/docs/scripts/prebuild.mjs @@ -0,0 +1,23 @@ +#!/usr/bin/env node + +import { spawn } from "node:child_process"; + +async function run(command, args) { + return new Promise((resolve, reject) => { + const child = spawn(command, args, { + stdio: "inherit", + shell: true, + }); + + child.on("close", (code) => { + if (code === 0) { + resolve(); + } else { + reject(new Error(`${command} exited with code ${code}`)); + } + }); + }); +} + +await run("pnpm", ["-F", "docs", "run", "doxygen"]); +await run("pnpm", ["-F", "react-example", "run", "build"]); diff --git a/docs/src/pages/index.jsx b/docs/src/pages/index.jsx index 144764e28..d6b463b5f 100644 --- a/docs/src/pages/index.jsx +++ b/docs/src/pages/index.jsx @@ -109,7 +109,7 @@ function HeroSection() {
- + Try Live Demo →
diff --git a/example-apps/react-js/index.html b/example-apps/react-js/index.html index 854c047f8..3eefa7180 100644 --- a/example-apps/react-js/index.html +++ b/example-apps/react-js/index.html @@ -21,21 +21,21 @@ - - + + - + - + - +