Skip to content

Added missing docstrings and bumped the version#13

Merged
sn merged 1 commit into
mainfrom
feature/adding-docstrings
Apr 17, 2026
Merged

Added missing docstrings and bumped the version#13
sn merged 1 commit into
mainfrom
feature/adding-docstrings

Conversation

@sn
Copy link
Copy Markdown
Contributor

@sn sn commented Apr 17, 2026

This pull request focuses on improving the developer experience by enhancing and expanding the inline documentation (docstrings) across several core modules of the Nitro static site generator. The changes provide clearer usage examples, detail class attributes and methods, and explain key behaviors, making the codebase much more accessible for both new and existing contributors. No functional or behavioral changes were made; all updates are to documentation and metadata.

Key improvements include:

Expanded and Clarified Docstrings

  • Added comprehensive docstrings and usage examples to the Config class in config.py, detailing its attributes, initialization, and role in project configuration. [1] [2]
  • Significantly enhanced docstrings for the Env class in env.py, including clearer explanations of environment variable access patterns, lazy loading, and example usages for all methods. [1] [2] [3]

Image Optimization Pipeline Documentation

  • Improved and expanded docstrings for ImageConfig, OptimizedImage, and ImageOptimizer classes in images.py, including method-level documentation for get_srcset, get_src, optimize_image, generate_picture_element, and process_html. These now include attribute descriptions, examples, and clearer explanations of return values and behavior. [1] [2] [3] [4] [5] [6] [7] [8]

Islands Architecture Documentation

  • Added detailed docstrings to IslandConfig and Island in islands.py, including attribute explanations, hydration strategies, and usage examples. The Island.render() method now documents its output and error handling. [1] [2] [3]

Metadata and Version Updates

  • Updated the project version in pyproject.toml and __init__.py to 1.0.14 to reflect these documentation improvements. [1] [2]

@sn sn self-assigned this Apr 17, 2026
@sn sn merged commit 0f13c3b into main Apr 17, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant