Astro PlantUML Demo

Project Setup

Prerequisites

  • Node.js (version 18 or higher recommended)
  • npm or yarn package manager

Installation Steps

  1. Clone the repository
  2. Install dependencies:
    npm install
  3. 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: