Add sculpin bundles section - #143
Open
opdavies wants to merge 4 commits into
Open
Conversation
app/config/bundles.yml holds the bundles the site knows about, imported
into the site configuration so it is available to templates as
site.bundles. It is kept separate from sculpin_site.yml because a script
rewrites it.
scripts/fetch-bundles.php populates it. It finds repositories that carry
the sculpin-bundle GitHub topic or whose name contains both "sculpin"
and "bundle", reads the Composer package name out of each repository,
and pulls the version and abandoned status from Packagist. Run it with:
GITHUB_TOKEN=... composer fetch-bundles
Discovery deliberately does not publish. A GitHub topic is self assigned,
so anything found is written to a `discovered` list that the site does
not render, and a maintainer moves the entries worth listing into
`bundles`. Repositories that should never be listed go in `ignored` so
that they are not rediscovered on the next run.
The name search is needed because the topic is barely used: it currently
matches one repository, where the name heuristic finds 36. Neither the
Composer `type` nor a `sculpin/sculpin` requirement is a usable signal,
as most existing bundles set neither.
The script only owns description, version, updated, stars, archived and
abandoned. Anything else, including a description once it has been
written, is left for maintainers to edit by hand.
A new section under "Powered by Sculpin" on both pages, rendered from site.bundles by a shared include, in the same way that the powered by list works. The include decides what is shown rather than the YAML doing it, so that app/config/bundles.yml can stay in alphabetical order and produce a readable diff when the fetch script refreshes it. Bundles marked abandoned on Packagist are skipped, and the rest are listed most recently updated first, which matters because many of the bundles out there were last touched around 2015 and target Sculpin 1 or 2. The last updated date and the archived flag are shown rather than used to filter, so that readers can judge for themselves how current a bundle is. The list is a single column, going to two columns at the same 768px breakpoint the rest of the stylesheet uses.
Adds the Bundles section to the home page and community page. Every other page changes only by picking up the generator metatag added in b433764, which had not been regenerated into docs/ yet.
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.
Adds a Bundles section to the home page and the community page, listing Sculpin bundles with their latest version, last update and a link to the repository. Rendered from a new
app/config/bundles.yml, kept up to date by a script.Discovery
scripts/fetch-bundles.phpfinds bundles on GitHub and refreshes their metadata:A repository is picked up if it has the
sculpin-bundletopic, or if its name contains both "sculpin" and "bundle". The Composer package name is read from each repository, then the version and abandoned status come from Packagist.The name search is there because the topic is barely used — it currently matches one repository, where the name heuristic finds 36. Neither the Composer
typenor asculpin/sculpinrequirement works as a signal, since most existing bundles set neither.Nothing is published automatically
A GitHub topic is self-assigned, so auto-listing would let any repository appear on the project's own site. Instead the script writes new finds to a
discoveredlist that isn't rendered; a maintainer moves the worthwhile ones intobundles. Anything that should never be listed goes inignoredso it isn't rediscovered.This PR seeds
bundleswith the 5 extensions already documented under Community Extensions, and leaves 31 indiscoveredfor review.Display
Ordering and filtering live in
source/_views/includes/bundles.html, not in the YAML — the file stays alphabetical so refreshes produce a readable diff. Bundles marked abandoned on Packagist are skipped; the rest are listed most recently updated first. That matters because many bundles out there were last touched around 2015 and target Sculpin 1 or 2.The last-updated date and an "Archived" flag are shown rather than used to filter, so readers can judge for themselves how current something is.
Notes for reviewers
docs/is regenerated. 23 of the 26 changed files differ only by picking up thegeneratormetatag from b433764, which hadn't been regenerated intodocs/yet. The real changes areindex.html,community/index.htmlandcss/style.css.bundles.yml.Screenshot