This commit introduces a significant restructuring of the documentation deployment and content strategy to support a gradual migration from Nextra to Astro. - **New Astro Workflow (`jan-astro-docs.yml`)**: Implemented a new, separate GitHub Actions workflow to build and deploy the Astro site from the `/website` directory to a new subdomain (`v2.jan.ai`). This isolates the new site from the existing one, allowing for independent development and testing. - **Removed Combined Workflow**: Deleted the previous, more complex combined workflow (`jan-combined-docs.yml`) and its associated test scripts to simplify the deployment process and eliminate routing conflicts. - **Astro Config Update**: Simplified the Astro configuration (`astro.config.mjs`) by removing the conditional `base` path. The Astro site is now configured to deploy to the root of its own subdomain. - **Mirrored Content**: Recreated the entire `/products` section from the Astro site within the Nextra site at `/docs/src/pages/products`. This provides content parity and a consistent user experience on both platforms during the transition period. - **File Structure**: Established a clear, organized structure for platforms, models, and tools within the Nextra `products` directory. - **Nextra Sidebar Fix**: Implemented the correct `_meta.json` structure for the new products section. Created nested meta files to build a collapsible sidebar, fixing the UI bug that caused duplicated navigation items. - **"Coming Soon" Pages**: Added clear, concise "Coming Soon" and "In Development" banners and content for upcoming products like Jan V1, Mobile, Server, and native Tools, ensuring consistent messaging across both sites. - **.gitignore**: Updated the root `.gitignore` to properly exclude build artifacts, caches, and environment files for both the Nextra (`/docs`) and Astro (`/website`) projects. - **Repository Cleanup**: Removed temporary and unused files related to the previous combined deployment attempt. This new architecture provides a stable, predictable, and low-risk path for migrating our documentation to Astro while ensuring the current production site remains unaffected.
Website & Docs
This website is built using Nextra, a modern static website generator.
Information Architecture
We try to keep routes consistent to maintain SEO.
-
/guides/: Guides on how to use the Jan application. For end users who are directly using Jan. -
/developer/: Developer docs on how to extend Jan. These pages are about what people can build with our software. -
/api-reference/: Reference documentation for the Jan API server, written in Swagger/OpenAPI format. -
/changelog/: A list of changes made to the Jan application with each release. -
/blog/: A blog for the Jan application.
How to Contribute
Refer to the Contributing Guide for more comprehensive information on how to contribute to the Jan project.
Pre-requisites and Installation
Installation
cd jan/docs
yarn install
yarn dev
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
Build
yarn build
This command generates static content into the build directory and can be served using any static contents hosting service.
Deployment
Using SSH:
USE_SSH=true yarn deploy
Not using SSH:
GIT_USER=<Your GitHub username> yarn deploy
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the gh-pages branch.
Preview URL, Pre-release and Publishing Documentation
-
When a pull request is created, the preview URL will be automatically commented on the pull request.
-
The documentation will then be published to https://jan.ai/ when the pull request is merged to
main.