https://github.com/spress/github-metadata-plugin
Github metadata of a repository
https://github.com/spress/github-metadata-plugin
github php plugin spress
Last synced: about 2 months ago
JSON representation
Github metadata of a repository
- Host: GitHub
- URL: https://github.com/spress/github-metadata-plugin
- Owner: spress
- License: mit
- Created: 2014-12-15T20:40:33.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2017-11-19T08:28:15.000Z (over 8 years ago)
- Last Synced: 2025-12-14T12:35:12.037Z (6 months ago)
- Topics: github, php, plugin, spress
- Language: PHP
- Homepage: http://spress.yosymfony.com
- Size: 7.81 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Github metadata of a repository

Access to `site.github` for getting a repository's metadata.
**Requires**:
* Spress >=2.0.0
* PHP cURL extension.
If you are using Spress 1.x, go to [1.0.0](https://github.com/spress/Github-metadata-plugin/tree/v1.0.0) version of the plugin.
### How to install?
Go to your site folder and input the following command:
```bash
spress add:plugin spress/github-metadata-plugin
```
### How to use?
Add the following to your `config.yml`:
```yaml
#Your repository name:
repository: "spress/spress"
```
#### Access to repository's metadada
* **Stargazers count**: `site.github.stargazers_count`.
* **Watchers count**: `site.gihub.watchers_count`.
* **Forks count**: `site.github.forks_count`.
See [Github repos API](https://developer.github.com/v3/repos/).
Another metadata keys:
* name
* full_name
* description
* fork
* html_url
* clone_url
* git_url
* ssh_url
* mirror_url
* homepage
* size
* default_branch
* open_issues_count
* has_issues
* has_pages
* has_downloads
* pushed_at
* created_at
* updated_at
##### Contributors metadata
Access to `site.github.contributors` for getting an array with contributors metadata.
See [Github repos API](https://developer.github.com/v3/repos/#list-contributors).
* login
* avatar_url
* html_url
* type
* contributions
##### Owner metada
Access to `site.github.owner` for getting owner metadata.
* login
* avatar_url
* gravatar_id
* html_url
##### Organization metadata
Access to `site.github.organization` for getting organization metadata.
* login
* avatar_url
* html_url
##### Source metadata
Access to `site.github.source` for getting source metadata.
* name
* full_name
* description
* html_url
* clone_url
* git_url
* ssh_url
* svn_url
* mirror_url
* homepage
* forks_count
* stargazers_count
* watchers_count
* size
* default_branch
* open_issues_count
* has_issues
* has_wiki
* has_pages
* has_downloads
* pushed_at
* created_at
* updated_at
## License
This plugin is available as open source under the terms of the
[MIT License](http://opensource.org/licenses/MIT).