Updating dev to main #15
No reviewers
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
javascript
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
thayen/portfolio-site!15
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "dev"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Seems like github really hates rebases so I'm just gonna do a normal merge
Code Review
This pull request introduces an automated icon generation workflow by adding a custom Astro integration that executes a shell script to convert SVG sources into various favicon and manifest formats. The changes include new SVG assets, a web manifest, and updates to the site layout. Feedback focuses on enhancing the reliability and performance of the generation process, specifically by handling potential execution errors in the integration, optimizing the build hook to avoid unnecessary overhead during development, and improving the shell script's compatibility across different ImageMagick versions.
execSyncwill throw an exception if the command fails, which will crash the Astro process. This is a significant risk in CI/CD environments like Cloudflare Pages wheremagick(ImageMagick 7) might not be available or is namedconvert(ImageMagick 6). Additionally, ensure the script has the executable bit set (chmod +x). Wrapping this in atry...catchblock prevents a missing dependency from breaking the entire build.The
astro:config:setuphook is triggered every time the Astro environment is initialized, including during development server starts and configuration reloads. This can add unnecessary overhead to the development loop. Consider moving this logic to a build-specific hook (e.g.,astro:build:start) or implementing a check to only regenerate icons when the source SVGs have changed.The script uses the
magickcommand, which is specific to ImageMagick 7+. Many CI/CD environments (including Cloudflare Pages) often provide ImageMagick 6, where the command isconvert. Consider adding a check to usemagickif available, falling back toconvertfor better compatibility.