Skip to content

agonyz/github-readme-packagist-stats

Repository files navigation

Packagist Logo

GitHub Readme Packagist Stats

Badge Badge Badge

Dynamically generated statistics of your Packagist Bundles for your GitHub README

Features

Top bundles

By vendor

Retrieves the top bundles for the given vendor

  • How to use:
    /api/packagist/card?vendor={your-packagist-user}
  • Example:
    ![Packagist Top Bundles](https://github-readme-packagist-stats.vercel.app/api/packagist/card?vendor=agonyz)
    Packagist Top Bundles

By maintainer

Retrieves the top bundles for the given maintainer from the given vendor

  • How to use:
    /api/packagist/card?vendor={your-example-organization}&maintainer={your-packagist-user}
  • Example:
    ![Packagist Top Bundles](https://github-readme-packagist-stats.vercel.app/api/packagist/card?vendor=exampleOrganization&maintainer=agonyz)

Themes

You can use different themes for the cards

  • How to use:
    /api/packagist/card?vendor={your-packagist-user}&theme=dark
  • Example:
    ![Packagist Top Bundles](https://github-readme-packagist-stats.vercel.app/api/packagist/card?vendor=agonyz&theme=dark)
    Packagist Top Bundles

Add own themes

To add your own themes, do the following:

  • Navigate to the theme directory src/themes/
  • Create a theme file e.g. dark.ts
  • Place your styles inside the theme file and export your theme
  • Create a pull request e.g. feature/add-theme-{theme-name}

Skip Bundles

You can skip bundles you don't want to display

  • How to use:
    /api/packagist/card?vendor={your-packagist-user}&skip={bundle-name1, bundle-name2, ..}
  • Example:
    ![Packagist Top Bundles](https://github-readme-packagist-stats.vercel.app/api/packagist/card?vendor=agonyz&skip=contao-countdown-bundle,contao-page-speed-insights-bundle)
    Packagist Top Bundles

Caching

  • In order to not overuse the packagist api a cache time of 12 hours was implemented.