
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
pagemeta2md
Advanced tools
A powerful Node.js CLI tool that provides bidirectional conversion between CSV and Markdown files with frontmatter support
CSVファイルとMarkdownファイル間の双方向変換を行う強力なNode.js CLIツールです。CSVデータからフロントマター付きMarkdownファイルの生成と、既存のMarkdownファイル構造からCSVファイルの生成の両方に対応。ドキュメントサイト、ブログ、またはメタデータを使用するMarkdownファイルベースのコンテンツ管理システムの作成・管理に最適です。
npm install -g pagemeta2md
pnpm add -g pagemeta2md
yarn global add pagemeta2md
sidebar_position,slug,parent,title,status,post_type,seo_title,seo_keywords,seo_description,handson_overview
1,getting-started,,Getting Started,published,pages,Getting Started Guide,tutorial guide,Learn how to get started,Introduction to the platform
2,installation,getting-started,Installation,published,pages,Installation Guide,install setup,Step-by-step installation,How to install the software
3,configuration,getting-started,Configuration,draft,pages,Configuration Guide,config setup,Configuration options,Setting up your environment
pagemeta2md data.csv
contents/
├── getting-started/
│ ├── index.md
│ ├── installation.md
│ └── configuration.md
# ヘルプを表示
pagemeta2md --help
# CSV → Markdown変換
pagemeta2md csv2md <csvFile>
# Markdown → CSV変換
pagemeta2md md2csv <inputDir> <outputCsv>
# 後方互換性(従来の使用方法)
pagemeta2md <csvFile>
pagemeta2md csv2md [options] <csvFile>
オプション:
-o, --output <dir> 出力ディレクトリ (デフォルト: "./contents")
-t, --template <file> Markdownファイル生成用のカスタムテンプレートファイル
-f, --force 確認なしで既存ファイルを上書き
-v, --verbose 詳細ログを有効化
pagemeta2md md2csv [options] <inputDir> <outputCsv>
オプション:
--update-mode 既存CSVファイルの順序を保持した差分更新
--base-csv <file> 差分更新のベースとなる既存CSVファイル
--columns <list> 出力するCSV列(カンマ区切り)
--include <pattern> 含めるファイルパターン(glob)(デフォルト: "**/*.md")
--exclude <pattern> 除外するファイルパターン(カンマ区切り)
--sort <field> ソートフィールド(update-mode時は無効)
--encoding <type> 出力エンコーディング (デフォルト: "utf8")
--delimiter <char> CSV区切り文字 (デフォルト: ",")
--handle-deleted <action> 削除ファイルの処理(warn/remove/ignore)
-v, --verbose 詳細ログを有効化
# デフォルトの./contentsディレクトリにファイルを生成
pagemeta2md csv2md pages.csv
# カスタムディレクトリにファイルを生成
pagemeta2md csv2md pages.csv --output ./docs
# ファイル生成にカスタムテンプレートを使用
pagemeta2md csv2md pages.csv --template ./templates/custom.md
# 既存ファイルを上書きし、詳細ログを表示
pagemeta2md csv2md pages.csv --force --verbose
# contentsディレクトリのMarkdownファイルから新しいCSVを生成
pagemeta2md md2csv contents output.csv
# 既存CSVファイルの順序を保持しながら更新
pagemeta2md md2csv contents updated.csv --update-mode --base-csv existing.csv
# 特定のパターンのファイルのみを変換
pagemeta2md md2csv contents docs.csv \
--include "docs/**/*.md" \
--exclude "drafts/**,temp/**"
# 特定の列のみを含むCSVを生成
pagemeta2md md2csv contents minimal.csv \
--columns "slug,title,parent,status"
# 詳細ログを表示し、削除されたファイルをCSVからも削除
pagemeta2md md2csv contents output.csv \
--update-mode \
--base-csv existing.csv \
--handle-deleted remove \
--verbose
CSVファイルには以下の列を含める必要があります:
slug: ファイル/ページのURL対応識別子title: ページの表示タイトルparent: 階層構造の親スラッグ(ルートアイテムの場合は空)status: 公開ステータス(draft、publishedなど)filepath: 生成されるMarkdownファイルのカスタムファイルパスpost_type: コンテンツの種類(pages、postsなど)target: コンテンツの対象読者またはコンテキストgoal: コンテンツの目的または目標seo_title: SEO最適化されたタイトルseo_description: SEO用のメタディスクリプションseo_keywords: SEO用のキーワードhandson_overview: 追加のメタデータフィールドsidebar_position,slug,parent,title,status,filepath,post_type,target,goal,seo_title,seo_keywords,seo_description,handson_overview
1,introduction,,Introduction,published,,pages,developers,getting-started,Introduction to Our Platform,intro guide,Welcome to our comprehensive guide,Getting started overview
2,basics,introduction,Basic Concepts,published,,pages,beginners,learn-fundamentals,Basic Concepts Guide,basics fundamentals,Learn the fundamental concepts,Core concepts explanation
3,advanced,introduction,Advanced Topics,draft,,pages,experienced-users,master-features,Advanced Guide,advanced topics,Deep dive into advanced features,Advanced usage patterns
4,api,,API Reference,published,docs/api/index.md,pages,developers,api-integration,API Documentation,api reference,Complete API documentation,API usage guide
5,authentication,api,Authentication,published,,pages,developers,secure-access,API Authentication,auth api,Authentication methods,How to authenticate
テンプレートが指定されていない場合、pagemeta2mdは組み込みテンプレートを使用します:
---
title: "{{title}}"
slug: "{{slug}}"
parent: "{{parent}}"
status: "{{status}}"
filepath: "{{filepath}}"
post_type: "{{post_type}}"
target: "{{target}}"
goal: "{{goal}}"
seo_title: "{{seo_title}}"
seo_description: "{{seo_description}}"
seo_keywords: "{{seo_keywords}}"
handson_overview: "{{handson_overview}}"
---
<!-- コンテンツをここに記述 -->
{{column_name}}プレースホルダーを使用して独自のテンプレートを作成できます:
---
title: "{{title}}"
description: "{{seo_description}}"
keywords: [{{seo_keywords}}]
draft: {{#if status === 'draft'}}true{{else}}false{{/if}}
---
# {{title}}
{{#if handson_overview}}
> {{handson_overview}}
> {{/if}}
<!-- ここにコンテンツを記述 -->
--forceが使用されない限り確認プロンプトを表示parent関係に基づいてネストされたディレクトリを自動作成index.mdファイルを生成.mdファイルを作成このツールは包括的なエラーハンドリングを提供します:
このプロジェクトはパッケージ管理にpnpmを使用しています。
# リポジトリをクローン
git clone https://github.com/username/pagemeta2md.git
cd pagemeta2md
# 依存関係をインストール
pnpm install
# テストを実行
pnpm test
# カバレッジ付きでテストを実行
pnpm test:coverage
# コードをリント
pnpm lint
# コードをフォーマット
pnpm format
# プロダクション用にビルド
pnpm build
# 開発モードで実行
pnpm dev
# すべてのテストを実行
pnpm test
# 特定のテストファイルを実行
pnpm test csvParser.test.js
# ウォッチモードでテストを実行
pnpm test:watch
# カバレッジレポートを生成
pnpm test:coverage
貢献を歓迎します!詳細については貢献ガイドをご覧ください。
git checkout -b feature/amazing-featurepnpm testgit commit -m 'Add amazing feature'git push origin feature/amazing-feature変更の詳細履歴についてはCHANGELOG.mdをご覧ください。
このプロジェクトはMITライセンスの下でライセンスされています - 詳細についてはLICENSEファイルをご覧ください。
pagemeta2mdチームが❤️を込めて作成
FAQs
A powerful Node.js CLI tool that provides bidirectional conversion between CSV and Markdown files with frontmatter support
We found that pagemeta2md demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.