This repository contains the source code and content for the Project MONAI website found at project-monai.github.io. For more information about MONAI, visit the Project-MONAI GitHub.
- Astro 5 static-site build (one
.htmlper route) with Tailwind CSS - Model Zoo as a self-contained Vue 3 SPA (
public/src/model-zoo-vue.js) - LLM enablement:
.mdtwin per page,llms.txt/llms-full.txt,sitemap-llms.xml, agent-aware GA4 analytics (seedocs/ANALYTICS.md) - Generated sitemaps and crawler-friendly
robots.txt - LAN-accessible dev server with HMR
- Node.js (v20 or higher)
- npm (v10 or higher)
-
Clone the repository:
git clone https://github.com/Project-MONAI/project-monai.github.io.git cd project-monai.github.io -
Install dependencies:
npm install
-
Start the dev server (LAN-accessible on port 3000):
npm run dev
The site will be available at
http://localhost:3000and on your LAN IP.
project-monai.github.io/
├── astro.config.mjs # Astro config (Tailwind, MDX, sitemap, md-twins, llms-txt)
├── public/ # Static assets served as-is
│ └── src/ # Vue UMD app (model-zoo)
├── src/
│ ├── pages/ # Routes (.astro files emit *.html)
│ ├── layouts/ # BaseLayout.astro
│ ├── components/ # Header, Footer, BaseHead
│ ├── integrations/ # md-twins + llms-txt build hooks
│ └── styles/global.css # Tailwind entry
├── scripts/ # Visual snapshot/diff tooling, model-data generator
└── docs/ # Design, architecture, and analytics reference docs
- Create a new file in
src/pages/<name>.astro(or under a subdirectory). - Use the BaseLayout pattern:
--- import BaseLayout from '../layouts/BaseLayout.astro'; const frontmatter = { title: 'Page Title | MONAI', description: 'Page description', canonical: 'https://project-monai.github.io/<name>.html', }; --- <BaseLayout {...frontmatter}> <!-- Page content --> </BaseLayout>
- Follow
docs/DESIGN.md(direction, alignment and color rules) anddocs/STYLEGUIDE.md(component recipes); seeAGENTS.mdfor repo conventions and load-bearing invariants.
The Model Zoo page requires model data to display. During CI/CD, this data is generated from the model-zoo repository. For local development:
-
Fetch model data:
npm run fetch-models
This downloads the latest model data from production, or falls back to sample data if unavailable.
-
The sample data file
model_data.sample.jsonprovides a small set of representative models for development. -
For full model data generation (optional):
pip install requests beautifulsoup4 markdown python scripts/process_models.py
The website includes a flexible banner system for announcements and surveys. The banner system lives in the Astro Header component (src/components/Header.astro) and automatically appears on all pages.
-
Edit
src/components/Header.astroand add your banner to thebannersarray in thebannerSystem()function:{ id: 'unique-banner-id', // Unique identifier for localStorage message: 'Your announcement', // Main banner text link: 'https://example.com', // Optional link URL linkText: 'Learn more →', // Link text bgColor: 'bg-brand-primary', // Tailwind background class icon: 'check', // Icon type: 'check' or 'megaphone' priority: 1 // Higher priority shows first }
-
Available background colors:
bg-brand-primary- Teal (default MONAI color)bg-purple-600- Purple (for surveys/feedback)bg-blue-600- Bluebg-green-600- Greenbg-red-600- Red (for urgent announcements)
-
Banner features:
- Only one banner displays at a time (highest priority non-dismissed)
- Users can dismiss banners (stored in localStorage)
- Header automatically adjusts position when banner is visible
- Smooth transitions on dismiss
Version announcement:
{
id: 'monai-1-6',
message: 'MONAI Core v1.6 is now available!',
link: 'https://monai.readthedocs.io/en/stable/whatsnew_1_6.html',
linkText: 'See what\'s new →',
bgColor: 'bg-brand-primary',
icon: 'check',
priority: 2
}Survey/Feedback request:
{
id: 'community-survey-2024',
message: 'Help shape the future of MONAI!',
link: 'https://survey-link.com',
linkText: 'Take our 5-minute survey →',
bgColor: 'bg-purple-600',
icon: 'megaphone',
priority: 1
}-
Build the site:
npm run build
This runs
npm run fetch-models(to populatepublic/model_data.json) and thenastro build, producing the production output indist/.
The site is automatically deployed to GitHub Pages via the .github/workflows/deploy.yml workflow when changes are pushed to master or main. The workflow runs npm ci && npm run build and uploads dist/ as the GitHub Pages artifact.
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
If you need help or have questions:
- Open an issue in this repository