feat(docs): D-19 Add Contract Documentation Generator#442
Open
damiedee96 wants to merge 1 commit into
Open
Conversation
Implements the full contract documentation generator pipeline as described in issue Nanle-code#356 (D-19). New modules: - src/utils/doc_extractor.rs - Extracts doc comments (///, //!) and code examples from .rs source files - src/utils/doc_templates.rs - Template system (HtmlFull, HtmlCard, MarkdownFull, MarkdownSummary, Custom) with {{placeholder}} rendering - src/utils/doc_html.rs - HTML site generator; produces per-contract pages and a searchable portal index - src/utils/doc_api_ref.rs - Machine-readable API reference builder; emits JSON + GitHub-flavoured Markdown - src/utils/doc_publisher.rs - Publish pipeline supporting Local, GitHub Pages, and custom HTTP targets with a persistent publish log Updated: - src/utils/mod.rs - Registers the five new utility modules - src/commands/docs.rs - Expands 'starforge docs' with new subcommands: extract, html, api-ref, publish New CLI subcommands: starforge docs extract <path> Extract doc comments from source starforge docs html <contract> Generate HTML documentation site starforge docs api-ref <contract> Generate JSON + Markdown API ref starforge docs publish <contract> Full build + publish pipeline Existing subcommands retained: generate, show, list, search, versions, export All new modules include unit tests. Closes Nanle-code#356
|
@damiedee96 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #356
Implements the full contract documentation generator pipeline as described in issue #356 (D-19).
New modules:
code examples from .rs source files
MarkdownFull, MarkdownSummary, Custom)
with {{placeholder}} rendering
pages and a searchable portal index
emits JSON + GitHub-flavoured Markdown
Pages, and custom HTTP targets with a
persistent publish log
Updated:
extract, html, api-ref, publish
New CLI subcommands:
starforge docs extract Extract doc comments from source
starforge docs html Generate HTML documentation site
starforge docs api-ref Generate JSON + Markdown API ref
starforge docs publish Full build + publish pipeline
Existing subcommands retained:
generate, show, list, search, versions, export
All new modules include unit tests.
Closes #356
Description
Brief description of what this PR does and why.
Closes #(issue number)
Type of Change
Changes Made
Testing
How has this been tested?
Describe the tests you ran and how to reproduce them.
Test Coverage
Describe what scenarios have been tested:
Code Quality Checklist
cargo fmt)cargo clippy -- -D warnings)Breaking Changes
If checked, describe the breaking changes and migration path:
Documentation
Screenshots (if applicable)
Add screenshots or GIFs for UI changes.
Additional Context
Add any other context about the PR here.
Note: Make sure all tests pass locally before submitting:
cargo test cargo fmt --all cargo clippy -- -D warnings