Astro PlantUML Demo
Project Setup
Prerequisites
- Node.js (version 18 or higher recommended)
- npm or yarn package manager
Installation Steps
- Clone the repository
- Install dependencies:
npm install
- Start the development server:
npm run dev
Configuration
astro.config.mjs
The project uses the following configuration:
import { defineConfig } from 'astro/config';
import plantuml from 'astro-plantuml';
export default defineConfig({
integrations: [plantuml()],
});
Using PlantUML in Astro
Basic Usage
You can use PlantUML diagrams in your Astro components using the following syntax:
---
// Your component imports and logic here
---
<PlantUML>
@startuml
Alice -> Bob: Hello
Bob --> Alice: Hi there!
@enduml
</PlantUML>
Example Diagrams
Explore different types of PlantUML diagrams:
- Sequence Diagram - Shows interactions between different actors over time
- Class Diagram - Displays the structure of classes and their relationships
- Activity Diagram - Illustrates workflow and decision processes
- Component Diagram - Shows system architecture and component relationships