This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
VitePressベースのランディングページ(LP)サイト。ページスピード改善コンサルティングサービスの紹介サイト。
ターゲットドメイン: rehearsal.sitespeed.info
# 開発サーバー起動
npm run dev
# プロダクションビルド(出力: .vitepress/dist/)
npm run build
# ビルド結果のプレビュー
npm run preview
# デプロイ(ビルド+rsync)
bash deploy.sh<script setup>).vitepress/
├── config.ts # VitePress設定(head、Tailwind統合)
├── theme/
│ ├── index.ts # テーマエントリポイント
│ ├── Layout.vue # ルートレイアウト(Contentをラップ)
│ └── style.css # グローバルスタイル(Tailwindインポート)
└── components/ # セクションコンポーネント(16個)
index.md # メインページ(全コンポーネントを組み立て)
design.md # デザインガイド(ビルド除外)
public/ # 静的アセット(画像、動画、アイコン)単一ページ構成のLP。index.mdがルート(/)に対応し、ページ内アンカーで各セクションにリンク。
/ → index.md(Hero〜Footer全セクション)#how-it-works → HowItWorksセクション#contact → FaqContactセクションindex.mdで各セクションコンポーネントをインポートし、順番に配置:
<script setup>
import Hero from './.vitepress/components/Hero.vue'
import Problem from './.vitepress/components/Problem.vue'
// ...他のコンポーネント
</script>
<main class="min-h-screen bg-white text-gray-900">
<Hero />
<Problem />
<!-- ...セクション続く -->
</main>.vitepress/theme/index.tsのenhanceAppでグローバルコンポーネント登録やVueプラグイン追加が可能:
export default {
Layout,
enhanceApp({ app }) {
// app.component('MyGlobal', MyGlobal)
// app.use(somePlugin)
}
}<section class="py-16 md:py-20">
<div class="max-w-7xl mx-auto px-6">
<!-- コンテンツ -->
</div>
</section>| クラス | 用途 |
|---|---|
max-w-7xl | 標準セクション、2カラム |
max-w-6xl | 中間的なコンテンツ |
max-w-5xl | 説明系コンテンツ |
max-w-4xl | FAQ、単純なリスト |
from-cyan-400 to-emerald-500from-cyan-500 to-blue-600from-orange-500 to-red-500bg-gray-50<span class="text-transparent bg-clip-text bg-gradient-to-r from-cyan-400 to-emerald-500">モバイルファースト設計。md:(768px以上)、lg:(1024px以上)で段階的に調整。
モーダル表示などインタラクティブな機能は<script setup>で実装:
<script setup>
import { ref } from 'vue'
const modalOpen = ref(false)
const openModal = () => { modalOpen.value = true }
const closeModal = () => { modalOpen.value = false }
</script>
<template>
<!-- Teleportでbodyにモーダルを描画 -->
<Teleport to="body">
<div v-if="modalOpen">...</div>
</Teleport>
</template>テンプレートのみでscriptタグ不要の場合は省略可能。
mpa: true - MPA(Multi-Page Application)モードsrcExclude: ['**/design.md'] - design.mdをビルドから除外vite.plugins - Tailwind CSSプラグイン統合tailwind.config.jsは使用しない。.vitepress/theme/style.cssで直接インポート:
@import 'tailwindcss';deploy.shでビルド後、rsyncでリモートサーバー(web-g6)にデプロイ。
rsync -av .vitepress/dist/ web-g6:web/vhosts/rehearsal.sitespeed.info/html/strong, bタグはfont-weight: 900に設定whitespace-nowrapを使用