Skip to content

[] Create MDX content skeleton: _meta.json hierarchy and placeholder pages with frontmatter (with validation tests)#282

Merged
zoetaka38 merged 3 commits into
mainfrom
feature/019f0d7d8800-019f0d7d8800
Jun 29, 2026
Merged

[] Create MDX content skeleton: _meta.json hierarchy and placeholder pages with frontmatter (with validation tests)#282
zoetaka38 merged 3 commits into
mainfrom
feature/019f0d7d8800-019f0d7d8800

Conversation

@red-codens

@red-codens red-codens Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Type of Change

  • feat — new feature
  • fix — bug fix
  • chore — tooling / maintenance
  • docs — documentation only
  • refactor — code change that neither fixes a bug nor adds a feature
  • test — adding or updating tests
  • ci — CI/CD configuration

Testing

Checklist

  • Tests pass locally
  • Lint clean (task lint)
  • Commit messages follow Conventional Commits

Task Goal

Target Repository

Corevice/open-git
All work for this task belongs in this repository. Do the implementation inside this repository's directory in the workspace; do not search or edit other repositories unless this task explicitly requires a cross-repo change.

Context

With the Nextra scaffold in place, populate the pages/ directory with the navigation structure and placeholder MDX files. Each file must have the required title frontmatter. Also add a Vitest test that validates all _meta.json entries point to real files and all MDX files contain a title field.

Steps

  1. Create open-git/docs/pages/_meta.json:
{
  "index": "ホーム",
  "getting-started": "はじめに",
  "self-hosting": "セルフホスト",
  "api": "API リファレンス",
  "contributing": "コントリビューター"
}
  1. Create open-git/docs/pages/index.mdx with frontmatter title: ホーム, description: open-git 公式ドキュメント; body: heading, intro paragraph, links to getting-started
  2. Create open-git/docs/pages/getting-started/_meta.json{ "index": "概要", "installation": "インストール", "quickstart": "クイックスタート" }
  3. Create open-git/docs/pages/getting-started/index.mdx with title: はじめに
  4. Create open-git/docs/pages/getting-started/installation.mdx with title: インストール, order: 1 — Docker Compose and Helm install placeholder sections
  5. Create open-git/docs/pages/getting-started/quickstart.mdx with title: クイックスタート, order: 2
  6. Create open-git/docs/pages/self-hosting/_meta.json{ "index": "概要", "traefik": "Traefik 設定", "database": "データベース" }
  7. Create stub MDX files for each self-hosting entry with proper frontmatter
  8. Create open-git/docs/pages/api/_meta.json{ "rest": "REST API", "graphql": "GraphQL API" }
  9. Create stub MDX files for api/rest.mdx and api/graphql.mdx with frontmatter
  10. Create open-git/docs/pages/contributing/_meta.json{ "index": "コントリビューターガイド", "license": "ライセンス", "branding": "ブランディング" }
  11. Create stub MDX files for contributing section with frontmatter; contributing

Changes Made

I'll
inspect
the existing
docs layout
,
then add the navigation
structure
, MD
X placeholders
, Vit
est config, and
validation
test
.

Creating the pages
structure
, MD
X stubs, Vit
est config, and
validation
test
.

N
extra
docs
scaffold is
in
place: navigation
, placeholder
MDX pages,
Vitest config,
and meta
validation tests.

**
Navigation structure
**

  • Top
    -level _ meta.json
    with 5 sections
    (ホ
    ーム, はじ
    めに,
    セルフホ
    スト, API
    リファレ
    ンス, コ
    ントリビュ
    ーター)

Sub-section
s for
getting-started, self
-hosting, api
, and contributing

**Content
(
12 MDX pages
)
**

  • Home
    page
    with intro
    and links to getting
    -started

  • Getting
    Started
    : overview
    , installation (
    Docker Compose /
    Helm placeholders), quick
    start

  • Self
    -host
    ing: overview,
    Traefik, database

  • API
    : REST and Graph
    QL stubs

  • Contributing:
    guide
    (
    links
    to LICENSE), license
    , branding

**Infrastructure
**

  • public/robots .txt
    allows all crawlers

  • vit est.config.ts
    — node
    environment

  • __tests__/meta -validation.test.ts
    — validates _meta .json entries
    resolve to files,
    all MDX have
    title
    frontmatter, and
    at least 10
    MDX pages exist

[P
URPLE-M
ODIFIED-FILES
]
docs/pages/_
meta.json
docs
/pages/index.mdx

docs/pages/getting
-started/_meta.json

docs/pages/getting
-started/index.mdx

docs/pages/getting
-started/installation.md
x
docs/pages
/getting-started/quickstart
.mdx
docs
/pages/
self-hosting/_
meta.json
docs
/pages/self-host
ing/index.mdx

docs/pages/
self-hosting/
traefik.mdx

docs/pages/
self-hosting/database
.mdx
docs
/pages/api/_meta
.json
docs/pages
/api/rest.mdx

docs/pages/api
/graphql.mdx

docs/pages/contributing
/_meta.json

docs/pages/contributing
/index.mdx

docs/pages/contributing
/license.mdx

docs/pages/contributing
/branding.mdx

docs/public
/robots.txt

docs/v
itest.config.ts

docs/__tests
__/meta-validation.test
.ts
[/
PURPLE
-MODIFIED-F
ILES]

Task ID: 019f0d7d-8800-7bb4-ad40-8d5d0a86fc80
Generated by Purple Codens

…der pages with frontmatter (with validation tests)

@orange-codens orange-codens Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍊 Orange Codens レビュー

このPRは要件通りにMDXコンテンツ骨格と検証テストを追加しており、全体的な品質は問題ないレベルです。ただし metaKeyResolvesToFile がディレクトリ存在のみで検証を通過させるロジック上の穴(index.mdx なしのディレクトリを見落とす)と、CRLF 改行環境でフロントマター検出が失敗する正規表現の問題はテストの信頼性を損なうため修正を推奨します。その他は命名不一致・マジックナンバー等のマイナーな改善点です。

🔒 セキュリティ: このPRはドキュメントサイトのMDXスケルトンとVitest検証テストを追加するものであり、サーバーサイドロジックや認証・認可コードは含まれていません。主なセキュリティ上の注意点は、テストコード内の metaKeyResolvesToFile 関数が _meta.json のキーをサニタイズせずに path.join へ渡している点です(CWE-22)。テストコードであるためseverityはlowですが、CI環境で外部から持ち込まれた _meta.json を処理するシナリオではキーの検証ガードを追加することを推奨します。その他の変更(MDXコンテンツ・設定ファイル)にはセキュリティリスクは見当たりません。

🟡 medium: 2 / 🔵 low: 4 / ⚪ info: 1

その他の指摘 (7 件)
  • 🟡 [medium] docs/__tests__/meta-validation.test.ts:37metaKeyResolvesToFile がディレクトリ存在のみで true を返すため、index.mdx が無いディレクトリでも検証を通過してしまう (confidence: 0.85, code.logic.loose_meta_resolution)
  • 🟡 [medium] docs/__tests__/meta-validation.test.ts:49hasTitleFrontmatter の正規表現が Windows 改行 (\r\n) を持つファイルで失敗する (confidence: 0.82, code.regex.frontmatter_pattern_fragile)
  • 🔵 [low] docs/__tests__/meta-validation.test.ts:84 — 「最低 10 ページ」のマジックナンバーにコメントがなく、ページ追加時に閾値更新が漏れる (confidence: 0.75, maintainability.test.magic_number)
  • 🔵 [low] docs/pages/self-hosting/index.mdx:2self-hosting/index.mdxtitle フロントマターが _meta.json のラベルと不一致 (confidence: 0.72, maintainability.naming.title_mismatch)
  • 🔵 [low] docs/vitest.config.ts:1vitest.config.tsinclude パターンが未指定で、pages/ 以下の MDX もスキャン対象になりうる (confidence: 0.65, maintainability.config.no_include_pattern)
  • 🔵 [low] docs/__tests__/meta-validation.test.ts:6 — テストコード内でのパストラバーサルチェック欠如 (_meta.json キーのサニタイズなし) (confidence: 0.60, sec.sast.path_traversal.test_file_traversal)
  • [info] docs/public/robots.txt:1 — robots.txt がすべてのクローラーにすべてのパスを許可している (confidence: 0.40, sec.sast.info.robots_txt_allow_all)

head: 333f1f1 | Orange Codens (P1)

# Conflicts:
#	docs/vitest.config.ts
- Convert _meta.json -> _meta.ts (Nextra 3.3.1 removed _meta.json support)
- Add required pages/_app.tsx for Nextra v3 Pages Router
- Rename pages/api -> pages/api-reference (pages/api is reserved by Next.js)
- Update meta-validation test to validate _meta.{ts,js} via import

@orange-codens orange-codens Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍊 Orange Codens レビュー

MDX スケルトンと meta 検証テストの骨格は整っていますが、metaKeyResolvesToFile が空ディレクトリのみでも pass するため、ナビゲーション整合性テストとしての信頼性が低い点が主な懸念です。加えて、タスク仕様の api/_meta.json と実装の api-reference/_meta.ts に差分があるため、意図的な変更かどうかの確認を推奨します。

🔒 セキュリティ: 本 PR は Nextra 向けの静的 MDX ドキュメント骨格、ナビゲーション用 _meta.ts、および _meta / frontmatter を検証する Vitest テストの追加のみです。ユーザー入力を処理する API・認可ロジック・外部 URL 取得・暗号処理・動的 SQL/コマンド実行は diff に含まれておらず、OWASP Top 10 / CWE Top 25 に該当する論理的脆弱性は検出されませんでした。robots.txtAllow: / は公開ドキュメントサイトとして一般的な設定です。

🟡 medium: 2 / 🔵 low: 2 / ⚪ info: 1

その他の指摘 (5 件)
  • 🟡 [medium] docs/__tests__/meta-validation.test.ts:48 — meta 検証が空ディレクトリのみでも pass する (confidence: 0.95, code.test.weak-assertion)
  • 🟡 [medium] docs/pages/_meta.ts:5 — タスク仕様の api キーが api-reference に変更されている (confidence: 0.90, maintainability.spec-deviation)
  • 🔵 [low] docs/__tests__/meta-validation.test.ts:16 — テストが _meta.json を走査対象から除外している (confidence: 0.85, maintainability.spec-deviation)
  • 🔵 [low] docs/__tests__/meta-validation.test.ts:56title frontmatter の存在のみ検証し値の妥当性は未チェック (confidence: 0.75, maintainability.test-coverage)
  • [info] docs/pages/_meta.ts:1 — タスク仕様の _meta.json_meta.ts として実装されている (confidence: 0.80, maintainability.spec-deviation)

head: 4dfd3b4 | Orange Codens (P1)

@zoetaka38
zoetaka38 merged commit 3c08913 into main Jun 29, 2026
11 of 13 checks passed
zoetaka38 added a commit that referenced this pull request Jun 29, 2026
- Take main's docs/tsconfig.json (PR's types override broke next build's
  type-checking of nextra theme config)
- Drop standalone 'tsc --noEmit' step (impossible in monorepo: parent
  tsconfig excludes docs; next build already type-checks)
- Fix lychee args: --root-dir + --fallback-extensions html for static
  export, exclude 404 page (intentional /docs link per main's test)
- Fix EditPageLink: docsRepositoryBase is undefined via useConfig in
  nextra v3 -> broken edit links on every page
- Fix /LICENSE link in contributing/index.mdx (repo-root file absent in
  static site) -> point to GitHub
- Remove stale pre-#282 scaffold (pages/index.tsx duplicate of index.mdx,
  pages/content/intro.mdx)
zoetaka38 added a commit that referenced this pull request Jun 29, 2026
…tmatter validation, Pagefind index (#261)

* chore: Add CI pipeline for docs site: static build, dead-link check, frontmatter validation, Pagefind index

* chore: Add CI pipeline for docs site: static build, dead-link check, frontmatter validation, Pagefind index

* ci(docs): reconcile docs CI job to be green on current main

- Take main's docs/tsconfig.json (PR's types override broke next build's
  type-checking of nextra theme config)
- Drop standalone 'tsc --noEmit' step (impossible in monorepo: parent
  tsconfig excludes docs; next build already type-checks)
- Fix lychee args: --root-dir + --fallback-extensions html for static
  export, exclude 404 page (intentional /docs link per main's test)
- Fix EditPageLink: docsRepositoryBase is undefined via useConfig in
  nextra v3 -> broken edit links on every page
- Fix /LICENSE link in contributing/index.mdx (repo-root file absent in
  static site) -> point to GitHub
- Remove stale pre-#282 scaffold (pages/index.tsx duplicate of index.mdx,
  pages/content/intro.mdx)

---------

Co-authored-by: codens-agent <agent@codens.ai>
Co-authored-by: red-codens[bot] <245102073+red-codens[bot]@users.noreply.github.com>
Co-authored-by: zoetaka38 <takayuki.kawazoe@corevice.com>
Co-authored-by: zoetaka38 <tkawazoe@portament.jp>
@zoetaka38
zoetaka38 deleted the feature/019f0d7d8800-019f0d7d8800 branch July 2, 2026 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant