Improve pkgdown build process and fix documentation generation #3454
+254,460
−0
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.
Improve pkgdown build process and fix documentation generation
Review Time Estimate: Within one week, Types of changes: Bug fix (non-breaking change which fixes an issue) #18
Description
script/build_pkdown.R
to ensurepkgdown::build_site()
correctly generates documentation within the correct package directories. This resolves issues where documentation was not being created for some packages.docs
tobook_source/pkgdocs
. This prevents broken assets (CSS, JavaScript, images) in the final documentation.build_pkdown.R
to prevent failures for individual packages from halting the entire build process. The script now includes atryCatch
block with afinally
clause for proper working directory management, and it stops execution on critical errors.base
,models
,modules
, andbook_source
to align with the new build process.scripts/build_pkgdown.R
,Makefile
,book.yml
,docker/base/dockerfile
, anddocker-compose.yml
.pkgdown
output is correctly copied tobook_source/pkgdocs
for seamless integration into the bookdown site.Motivation and Context
This change is required to ensure that the pkgdown documentation for all PEcAn packages is generated correctly and consistently. Previously, issues with symlink handling and incorrect working directory management led to broken documentation and missing files. This PR addresses these problems, providing a more robust and reliable documentation build process. It also automates the process of copying the generated documentation to the bookdown source directory, simplifying the integration of pkgdown output into the book.
Review Time Estimate
Types of changes
Checklist: