This is the source for https://the-eg.github.io/plugins-dashboard .
It uses NodeJS, React, Material-UI, Recharts and Gatsby. The site is built from the gh-pages branch and copied to the main branch where it is served using github pages.
The application loads the plugin-stats for all defined plugins from https://data.octoprint.org/export/plugin_stats_30d.json and builds the webpage out of this data.
This repository includes three branches and two actions.
main
: contains the statistics data (don't touch it)gh-pages
: includes the web-application which are later published to:https://<gitHubUser>.github.io/plugins-dashboard/
(modify if you like)the-eg
: includes the configuration and the pipeline action-scripts (you can rename it to your own GitHubUser-Name)
Update data/*.json
: download the stats (if not executed succesful we can't build the page)Build and Deploy
: reads the downloaded data and creates the dashboard
This file includes all plugins which you want to show in your dashboard.
{
"gitHubUser": "The-EG",
"plugins": [
{"id": "camerasettings", "name": "Camera Settings", "url": "https://github.com/The-EG/OctoPrint-CameraSettings", "repo": "OctoPrint-CameraSettings"},
{"id": "ublmeshedit", "name": "UBL Mesh Editor", "url": "https://github.com/The-EG/OctoPrint-UblMeshEditor", "repo": "OctoPrint-UBLMeshEdit"}
]
}
gitHubUser
: Your github account nameid
id of your plugin, listed in plugins.octoprint.org (all lowercase). This id must be in the plugin_stats_30d.json responsename
: Displayname of the Plugin in the dashboardurl
: Repository URLrepo
: Name of the repository
You can use this to track your own plugins!
- Fork this repo
- In branch
the-eg
, replace the contents of each .json file in data/ with an empty object ({}
) - Update plugins-dashboard-config.json
- Setup a personal access token:
- Go to your user settings
- Go to 'developer' settings
- Go to 'personal access tokens'
- Click generate new token, give it a name, etc. Give it 'public_repo' access.
- Copy the new token
- Add the token as a repo secret
- Go to the newly forked repo settings
- Go to 'Secrets'
- 'New Repository Secret' named
REPO_TOKEN
and paste the token you copied above
- (Optional) rename the
the-eg
branch to your own liking.- Update the reference to the above branch in .github/workflows/*.yml (in branch
gh-pages
)
- Update the reference to the above branch in .github/workflows/*.yml (in branch
- Enable GH Pages on the
main
branch- Go to repo settings
- Goto 'Pages'
- Select the
main
branch and/ (root)
- Click save
- Manually trigger the 'Update data/*.json' workflow
After that, it should update once a day and automatically deploy.
If I make updates that you'd like to incorporate to your fork later:
- Clone your fork locally
- Setup this repo as upstream:
git remote add upstream https://github.com/The-EG/plugins-dashboard.git
- While on your
gh-pages
branch, pull mygh-pages
branch:git pull upstream gh-pages
- Push the changes back up to yours:
git push
- Switch to your data branch, ie
the-eg
, and merge in gh-pages:git merge gh-pages
- Push those changes up too:
git push