When working with Power Pages, maintaining clear documentation and implementing version control are essential for collaboration, debugging, and ensuring smooth development and deployment across environments. This guide covers how to manage documentation and version control effectively within Power Pages projects.
1. Importance of Documentation
Proper documentation ensures that:
- Your team understands the portal structure and functionality.
- Future developers can maintain or extend the portal.
- Business users can reference functionality and workflows.
🔹 What to Document:
- Portal Structure: Web pages, web roles, permissions, web templates.
- Custom Code: JavaScript, Liquid templates, FetchXML queries.
- Integration Points: Power Automate flows, APIs, external systems.
- Environment Setup: Environment variables, configuration steps.
- Security Settings: Authentication methods, web roles, table permissions.
🔹 Tools to Use:
- Markdown files (
README.md
) within your solution export folder. - Confluence / SharePoint / OneNote for internal documentation.
- Dataverse Notes attached to portal records for embedded documentation.
2. Version Control Using Source Control Systems
Although Power Pages is a low-code platform, ALM (Application Lifecycle Management) is still critical. The recommended way to implement version control is to use Azure DevOps or GitHub along with Solutions and Power Platform CLI (PAC CLI).
🔹 Steps to Implement Version Control:
a. Use Solutions
- Group your portal components (pages, forms, tables, etc.) inside a Solution.
- This makes export/import and change tracking easier.
b. Export the Solution (Unmanaged)
- Use the Power Platform CLI (
pac
) or Power Apps admin center to export the solution. - Unpack the solution using: bashCopyEdit
pac solution unpack --path ./MySolution --solution-zip ./MySolution.zip
- Store the unpacked files in your Git repository.
c. Track Changes in Git
- Commit and push changes to GitHub/Azure Repos.
- Use branching strategies (e.g.,
dev
,test
,main
) for safe development workflows. - Code reviews and pull requests help manage changes and minimize errors.
3. Source Control Best Practices
- Commit Often: Commit small, manageable changes frequently with clear messages.
- Use Branches: Separate branches for features, bugs, and releases.
- Automate CI/CD: Use pipelines to automatically deploy changes to environments.
- Use Tags/Releases: Tag stable versions to track deployed portal versions.
4. Solution Packager Tool
An alternative to pac
is the Solution Packager, which also unpacks managed/unmanaged solutions into individual XML and other files that can be tracked in version control.
5. Tracking Liquid, JS, and Web Templates
Since Power Pages allows custom code like Liquid, JavaScript, and CSS, consider:
- Exporting these components manually or via
pac
. - Keeping them in a separate directory in your repository for easier code review.
6. Versioning Portal Content
If your portal content is frequently updated (e.g., knowledge base), use:
- Dataverse auditing to track content changes.
- Custom “Version” columns in content tables.
- Backups before major content changes.
7. Change Log
Maintain a changelog.md to document changes:
## [1.0.1] - 2025-04-15
### Fixed
- Fixed JavaScript error on registration page.
- Updated FetchXML for advanced search.
### Added
- New event registration form.
- Integration with payment gateway.