Skip to content

New commands and draft page support#9

Merged
sn merged 2 commits into
mainfrom
feature/new-commands-and-draft-page-support
Jan 30, 2026
Merged

New commands and draft page support#9
sn merged 2 commits into
mainfrom
feature/new-commands-and-draft-page-support

Conversation

@sn
Copy link
Copy Markdown
Contributor

@sn sn commented Jan 30, 2026

This pull request introduces several new features and improvements to the Nitro static site generator, focusing on enhanced build customization, environment management, and CLI usability. The most notable changes are the addition of draft page support, environment variable handling, expanded CLI commands, and improved sitemap generation. These updates are reflected in both the documentation and the codebase.

New Features and Enhancements

  • Draft Page Support: Pages can now be marked as drafts using the draft=True attribute in Page. Drafts are rendered during development but excluded from production builds and sitemap generation. [1] [2]
  • Environment Variable Access: Introduced the env module, which auto-loads .env files and provides attribute-based access to environment variables, with helpers for production/development checks. Requires python-dotenv as an optional dependency. [1] [2] [3] [4] [5] [6]

CLI Improvements

  • Expanded Commands: Added new CLI commands: nitro init, nitro routes, nitro check, and nitro export. These commands support project initialization, route listing, site validation, and exporting builds as zip archives. [1] [2] [3] [4] [5] [6] [7] [8]

Build and Sitemap Enhancements

  • Improved Sitemap Generation: Sitemap creation now respects page metadata (e.g., custom priority, change frequency, last modified date, and exclusion from sitemap). Draft pages are automatically excluded. [1] [2] [3]
  • Production Environment Handling: The build command sets a production environment variable and passes a production=True flag to the generator for more accurate build behavior. [1] [2]

Dependency and Version Updates

  • Updated dependencies: nitro-ui to >=1.0.6, added optional python-dotenv for environment variable support, and bumped nitro-cli version to 1.0.8. [1] [2] [3]

These changes collectively improve workflow flexibility, site customization, and developer experience.

@sn sn self-assigned this Jan 30, 2026
@sn sn merged commit 1917b87 into main Jan 30, 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