Skip to main content
nulldepdoc

設定リファレンス#

プロジェクトルートに nulldepdoc.config.json(または ESM 形式の nulldepdoc.config.mjs / nulldepdoc.config.js)を配置すると自動で読み込まれます。

サイト設定ファイル(nulldepdoc.config.json)#

nulldepdoc.config.json
{
  "title": "nulldepdoc",
  "tagline": "完全ゼロ依存の静的ドキュメントサイト生成基盤",
  "docsDir": "docs",
  "staticDir": "static",
  "outDir": "dist",
  "basePath": "/",
  "lang": "ja",
  "onBrokenLinks": "error",
  "customCss": "/site-custom.css",
  "customScripts": ["/dep-compare.js"],
  "nav": [
    { "label": "はじめに", "href": "/getting-started/" },
    { "label": "GitHub", "href": "https://github.com/stakme/nulldepdoc" }
  ],
  "footer": "Built with nulldepdoc — 0 npm dependencies."
}
キー型デフォルト説明
titlestring"Documentation"サイトタイトル(ナビバーと <title> に使用)
taglinestring""ページ固有の description がない場合の <meta name="description">
docsDirstring"docs"Markdown 文書のルートディレクトリ
staticDirstring"static"そのまま outDir へコピーされる静的アセットディレクトリ
outDirstring"dist"静的サイト出力先(原本やルートと重なるパスは安全のため拒否)
basePathstring"/"サブパス公開用のベースパス(例:"/nulldepdoc/")
langstring"en"<html lang="..."> 属性値
onBrokenLinks"error" | "warn" | "ignore""warn"内部リンク・アンカー・nav リンク切れ検知時の挙動
includeDraftsbooleanfalsedraft: true のページを出力対象に含めるかどうか
navArray<{ label, href }>[]上部ナビゲーションバーのリンク一覧
footerstring""記事下部に表示するフッター文字列
customCssstring""追加読み込むカスタム CSS のパス(static/ 配下など)
customScriptsstring[][]独自 Web Components 等を読み込む ESM スクリプトパス配列

Frontmatter 項目#

Markdown ファイル先頭の --- ブロックでページ単位のメタデータを指定できます(インラインコメント # ... 対応)。

yaml
---
title: ページタイトル
sidebar_label: サイドバー用の短い名前
sidebar_position: 1
description: 検索結果や meta description に表示される説明
slug: /custom-url/
tags: [guide, architecture]
draft: false # true にすると本番ビルドから除外
sidebar_hidden: false
---

カテゴリ設定(_category.json)#

docs/ 配下のサブディレクトリに _category.json を置くと、サイドバーのカテゴリ表示をカスタマイズできます。

docs/guides/_category.json
{
  "label": "設計・運用ガイド",
  "position": 4,
  "collapsed": false
}
Built with nulldepdoc itself — 0 npm dependencies.