Langsung ke konten
Skillpedia
Dokumentasi48k ยท #6183

wiki-vitepress

Fungsinya

Agen ini mengubah file teks Anda (Markdown) menjadi situs web yang menarik dan mudah dinavigasi menggunakan alat bernama VitePress. Agen ini juga membuat diagram (Mermaid) tampil baik, bahkan dalam mode gelap, dan memungkinkan Anda memperbesar diagram tersebut.

Kapan dipakai

  • โœ“Saat Anda ingin membuat situs dari teks Anda.
  • โœ“Saat Anda ingin mengubah halaman wiki menjadi situs web HTML.
  • โœ“Saat Anda membutuhkan diagram yang tetap terbaca dengan warna gelap dan memiliki fitur zoom.

Link skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/wiki-vitepress/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/wiki-vitepress/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit โ†’

Contoh permintaan ke AI

โ€œUbah teks wiki ini menjadi situs VitePress dengan diagram mode gelap dan fitur zoom.โ€

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agen ini membuat struktur folder beserta file yang dibutuhkan VitePress. Setelah itu, ia mengatur tema gelap dan memastikan diagram (Mermaid) tampil dengan warna yang tepat serta bisa diperbesar.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

Wiki VitePress Packager

Transform generated wiki Markdown files into a polished VitePress static site with dark theme and interactive Mermaid diagrams.

When to Use

  • User asks to "build a site" or "package as VitePress"
  • User runs the /deep-wiki:build command
  • User wants a browsable HTML output from generated wiki pages

VitePress Scaffolding

Generate the following structure in a wiki-site/ directory:

wiki-site/
โ”œโ”€โ”€ .vitepress/
โ”‚   โ”œโ”€โ”€ config.mts
โ”‚   โ””โ”€โ”€ theme/
โ”‚       โ”œโ”€โ”€ index.ts
โ”‚       โ””โ”€โ”€ custom.css
โ”œโ”€โ”€ public/
โ”œโ”€โ”€ [generated .md pages]
โ”œโ”€โ”€ package.json
โ””โ”€โ”€ index.md

Config Requirements (config.mts)

  • Use withMermaid wrapper from vitepress-plugin-mermaid
  • Set appearance: 'dark' for dark-only theme
  • Configure themeConfig.nav and themeConfig.sidebar from the catalogue structure
  • Mermaid config must set dark theme variables:
mermaid: {
  theme: 'dark',
  themeVariables: {
    primaryColor: '#1e3a5f',
    primaryTextColor: '#e0e0e0',
    primaryBorderColor: '#4a9eed',
    lineColor: '#4a9eed',
    secondaryColor: '#2d4a3e',
    tertiaryColor: '#2d2d3d',
    background: '#1a1a2e',
    mainBkg: '#1e3a5f',
    nodeBorder: '#4a9eed',
    clusterBkg: '#16213e',
    titleColor: '#e0e0e0',
    edgeLabelBackground: '#1a1a2e'
  }
}

Dark-Mode Mermaid: Three-Layer Fix

Layer 1: Theme Variables (in config.mts)

Set via mermaid.themeVariables as shown above.

Layer 2: CSS Overrides (custom.css)

Target Mermaid SVG elements with !important:

.mermaid .node rect,
.mermaid .node circle,
.mermaid .node polygon { fill: #1e3a5f !important; stroke: #4a9eed !important; }
.mermaid .edgeLabel { background-color: #1a1a2e !important; color: #e0e0e0 !important; }
.mermaid text { fill: #e0e0e0 !important; }
.mermaid .label { color: #e0e0e0 !important; }

Layer 3: Inline Style Replacement (theme/index.ts)

Mermaid inline style attributes override everything. Use onMounted + polling to replace them:

import { onMounted } from 'vue'

// In setup()
onMounted(() => {
  let attempts = 0
  const fix = setInterval(() => {
    document.querySelectorAll('.mermaid svg [style]').forEach(el => {
      const s = (el as HTMLElement).style
      if (s.fill && !s.fill.includes('#1e3a5f')) s.fill = '#1e3a5f'
      if (s.stroke && !s.stroke.includes('#4a9eed')) s.stroke = '#4a9eed'
      if (s.color) s.color = '#e0e0e0'
    })
    if (++attempts >= 20) clearInterval(fix)
  }, 500)
})

Use setup() with onMounted, NOT enhanceApp() โ€” DOM doesn't exist during SSR.

Click-to-Zoom for Mermaid Diagrams

Wrap each .mermaid container in a clickable wrapper that opens a fullscreen modal:

document.querySelectorAll('.mermaid').forEach(el => {
  el.style.cursor = 'zoom-in'
  el.addEventListener('click', () => {
    const modal = document.createElement('div')
    modal.className = 'mermaid-zoom-modal'
    modal.innerHTML = el.outerHTML
    modal.addEventListener('click', () => modal.remove())
    document.body.appendChild(modal)
  })
})

Modal CSS:

.mermaid-zoom-modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.9);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; cursor: zoom-out;
}
.mermaid-zoom-modal .mermaid { transform: scale(1.5); }

Post-Processing Rules

Before VitePress build, scan all .md files and fix:

  • Replace <br/> with <br> (Vue template compiler compatibility)
  • Wrap bare <T> generic parameters in backticks outside code fences
  • Ensure every page has YAML frontmatter with title and description

Build

cd wiki-site && npm install && npm run docs:build

Output goes to wiki-site/.vitepress/dist/.

Known Gotchas

  • Mermaid renders async โ€” SVGs don't exist when onMounted fires. Must poll.
  • isCustomElement compiler option for bare <T> causes worse crashes โ€” do NOT use it
  • Node text in Mermaid uses inline style with highest specificity โ€” CSS alone won't fix it
  • enhanceApp() runs during SSR where document doesn't exist โ€” use setup() only

When to Use

This skill is applicable to execute the workflow or actions described in the overview.

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.

โ€ฆ

Pertanyaan umum

Apa itu VitePress?

VitePress adalah alat yang membantu membuat situs web yang cepat dan sederhana dari file teks (Markdown).

Apa itu diagram Mermaid?

Diagram Mermaid adalah gambar yang dibuat dengan teks untuk menggambarkan alur, struktur, atau diagram, misalnya diagram alur.

Mengapa mode gelap penting?

Banyak orang lebih suka membuka situs dengan latar belakang gelap agar mata lebih nyaman, terutama di malam hari.

Detail

Deskripsi asli dari pembuat

Transform generated wiki Markdown files into a polished VitePress static site with dark theme and interactive Mermaid diagrams. Use when user asks to \"build a site\" or \"package as VitePress\", user runs the /deep-wiki, or user wants a browsable HTML output from generated wiki pages.

repo: sickn33/agentic-awesome-skills

Popularitas

Bintang GitHub
48k
Peringkat
#6183
Lisensi
MIT
Diperbarui
15/10/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • โ€ฆ

Skill lain dari repositori ini

Skill serupa