diff options
| author | 魏曹先生 <1992414357@qq.com> | 2025-11-06 22:11:10 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2025-11-06 22:11:10 +0800 |
| commit | 986a896062939c41f769b30c90d8d955b959f788 (patch) | |
| tree | e170286efe8120d8995240066ed188141862d2b7 /crates/vcs_docs/src/docs.rs.template | |
| parent | d2713f597bb860996f75749d2753e52ebe5297e0 (diff) | |
feat: Add documentation management module (WIP)
- Create vcs_docs crate for documentation handling
- Add build script and Cargo.toml
- NOTE: Core implementation pending
Diffstat (limited to 'crates/vcs_docs/src/docs.rs.template')
| -rw-r--r-- | crates/vcs_docs/src/docs.rs.template | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/crates/vcs_docs/src/docs.rs.template b/crates/vcs_docs/src/docs.rs.template new file mode 100644 index 0000000..c6787d9 --- /dev/null +++ b/crates/vcs_docs/src/docs.rs.template @@ -0,0 +1,26 @@ +// Auto-generated code. + +--- TEMPLATE DOCUMENT BEGIN --- +/// From {{DOCUMENT_PATH}} +pub const {{DOCUMENT_CONSTANT_NAME}}: &str = "{{DOCUMENT_CONTENT}}"; + +--- TEMPLATE DOCUMENT END --- + +// Get document content by name +pub fn document(name: impl AsRef<str>) -> Option<String> { + match name.as_ref() { +--- TEMPLATE FUNC BEGIN --- + "{{DOCUMENT_PATH_SNAKE_CASE}}" => Some({{DOCUMENT_CONSTANT_NAME}}.to_string()), +--- TEMPLATE FUNC END --- + _ => None, + } +} + +// Get list of all available document names +pub fn documents() -> Vec<String> { + vec![ +--- TEMPLATE LIST BEGIN --- + "{{DOCUMENT_PATH_SNAKE_CASE}}".to_string(), +--- TEMPLATE LIST END --- + ] +} |
