一键导入
update-docs
Update the Jekyll module documentation in `docs/modules/` based on changes to source files in `src/`.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Update the Jekyll module documentation in `docs/modules/` based on changes to source files in `src/`.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | update-docs |
| description | Update the Jekyll module documentation in `docs/modules/` based on changes to source files in `src/`. |
@version 1.0.0
The docs/ directory contains a Just the Docs Jekyll site published to GitHub Pages. Each top-level directory in src/ is documented by a single Markdown file at docs/modules/<slug>.md. This skill keeps those docs in sync with the PHP source.
Use git history as the source of truth — do not introduce a marker file.
git log -1 --format=%ct -- docs/modules/<slug>.mdgit log -1 --format=%ct -- src/<SourceDir>/docs/_config.yml was modified more recently than every module doc.docs/index.md was modified more recently than every module doc.Slugs are kebab-case; source directories are Pascal_Snake_Case. Apply this rule:
_ with - to derive the slug.CMB2, Rest_Api).Authoritative map for the current source tree:
| Slug | Source Directory |
|---|---|
api | src/Api/ |
args | src/Args/ |
blocks | src/Blocks/ |
cmb2 | src/CMB2/ |
comment | src/Comment/ |
container | src/Container/ |
cron | src/Cron/ |
db | src/Db/ |
libs | src/Libs/ |
menu | src/Menu/ |
meta | src/Meta/ |
network | src/Network/ |
post-type | src/Post_Type/ |
query | src/Query/ |
rest-api | src/Rest_Api/ |
settings | src/Settings/ |
site | src/Site/ |
taxonomy | src/Taxonomy/ |
theme | src/Theme/ |
traits | src/Traits/ |
user | src/User/ |
util | src/Util/ |
Every docs/modules/<slug>.md must follow this structure exactly:
---
title: <Module Title>
parent: Modules
nav_order: <integer>
---
# <Module Title>
## Overview
<One short paragraph describing what the module wraps and when to reach for it.>
## Types in this module
- `Lipe\Lib\<Namespace>\<ClassOrTrait>`
- ...
## `<ClassOrTrait>`
<Optional one-line summary of the class.>
### Key public methods
- <Optional one-line summary of the method.>
- `public function <name>(<args>): <return>`
- ...
### Example
```php
<?php
use Lipe\Lib\<Namespace>\<ClassOrTrait>;
// realistic minimal usage
```
Authoring rules:
public methods. Skip protected and private.Lipe\Lib\… fully-qualified names in the Types in this module list; use use imports in code examples.nav_order is assigned alphabetically by title, starting at 1 and incrementing by 1 — renumber siblings only when adding a new module.When a source module contains subdirectories (e.g., src/Args/Clause/, src/Util/Cache/), roll the public classes from those subdirectories into the same parent module doc:
## Types in this module list.## `<ClassName>` section in the parent doc.has_children hierarchy.When a directory exists under src/ with no matching docs/modules/<slug>.md:
docs/modules/<slug>.md using the doc template above.docs/modules/index.md in alphabetical order:
- [<Title>](<slug>/) — <one-line summary matching the new doc's Overview>.docs/index.md in alphabetical order:
| [<Title>](modules/<slug>/) | <one-line summary>. |nav_order across docs/modules/*.md so values remain contiguous and alphabetical.When a docs/modules/<slug>.md exists with no matching src/ directory:
docs/modules/index.md.docs/index.md.nav_order values.docs/index.md links use the form modules/<slug>/ (trailing slash, no .md).docs/modules/index.md links use the form <slug>/ (trailing slash, no .md).permalink: pretty in docs/_config.yml — do not change that setting.src/..php file under src/<SourceDir>/ recursively.## Overview and ### Example sections from the prior version when the public API has not meaningfully changed.