Add package detail pages and improve packages UI#7
Merged
Conversation
- /-/packages now renders an HTML list of packages, each linking to its detail page and showing the version number - /-/packages/<name> shows all available metadata for a package in a table, plus the README rendered as plain text with pre-wrap styling - Returns 404 for unknown package names - JSON endpoint at /-/packages.json remains unchanged https://claude.ai/code/session_01NweDU9Kg1no11mAq3azT55
Main migrated from setup.py to pyproject.toml. Removed setup.py and confirmed uv_build includes template files in the wheel automatically. https://claude.ai/code/session_01NweDU9Kg1no11mAq3azT55
Owner
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.



Summary
This PR enhances the datasette-packages plugin by adding individual package detail pages and improving the overall user interface with proper HTML templates instead of generic JSON rendering.
Key Changes
/-/packages/<package_name>endpoint that displays detailed metadata and README for individual packagespackages_list.htmlandpackage_detail.html) that extend the base Datasette templateextra_template_dirs()hook implementation to register the templates directorysetup.pyto include template files in package distributionNotable Implementation Details
dist.metadata.get_all()to properly handle fields that can have multiple valuesdist.metadata.get_payload()and only displayed if non-emptyhttps://claude.ai/code/session_01NweDU9Kg1no11mAq3azT55