ProjectPythia / cookbook-gallery

Root site for the ProjectPythiaCookbooks GitHub Pages
https://cookbooks.projectpythia.org
MIT License
1 stars 13 forks source link

Fix handling of long gallery card descriptions #204

Closed brian-rose closed 5 months ago

brian-rose commented 5 months ago

Closes #201

The reason that the Vapor Cookbook is not showing up in the gallery (and the Regridding Cookbook is duplicated) is that its description is long enough to trigger a truncation operation (this line in gallery_generator.py).

This PR fixes a bug in that logic. The code for new card generation was in the else block of that statement, so did not execute for any cookbook whose description requires truncation. The card from the previous iteration (in this case, the Regridding Cookbook) was added to the gallery again instead.

Moving the new card generation code outside of the if, else block seems to solve the issue.

github-actions[bot] commented 5 months ago

👋 Thanks for opening this PR! The Cookbook will be automatically built with GitHub Actions. To see the status of your deployment, click below. 🔍 Git commit SHA: 68bc54798ef9d0fd4688f0976472bba96688449f ✅ Deployment Preview URL: https://ProjectPythia.github.io/cookbook-gallery/_preview/204