OWASP / www--site-theme

Contains owasp site theme specific items (headers, footers, json, menus)
9 stars 27 forks source link

Fix: Allow override of default GitHub buttons #13

Closed kingthorin closed 5 years ago

kingthorin commented 5 years ago

Fixes OWASP/www--site-theme#8

This is un-tested. But after a bunch of reading this is how it is meant to work:

Github buttons will be built based on the variables github.code_user and github.code_repo with default values of owasp user and the www-* repo respectively.

For example if _config.yml contained:

github.code_user: zaproxy
github.code_repo: zaproxy

The buttons would be set as:

<iframe src="https://ghbtns.com/github-btn.html?user=zaproxy&repo=zaproxy&type=star&count=true"
frameborder="0" scrolling="0" width="170px" height="20px"></iframe>
<iframe src="https://ghbtns.com/github-btn.html?user=zaproxy&repo=zaproxy&type=watch&count=true&v=2"
frameborder="0" scrolling="0" width="170px" height="20px"></iframe>

For the star button this would be:

https://github.com/zaproxy/zaproxy

instead of:

https://github.com/owasp/www-project-zap/

(Well at least that's the intent.)

Signed-off-by: kingthorin kingthorin@users.noreply.github.com

kingthorin commented 5 years ago

Just noticed there’s a typo in the HTML examples in the first commit message. Not a show stopper, I’ve corrected it in the PR description.

bkimminich commented 5 years ago

Awesome!!!! :100:

kingthorin commented 5 years ago

I've squashed this, rebased current, and fixed the commit message. 'Should' be ready for merge.

kingthorin commented 5 years ago

@hblankenship good with this?

kingthorin commented 5 years ago

Thanks

kingthorin commented 5 years ago

This had to be revised further, see: https://github.com/OWASP/www--site-theme/issues/8#issuecomment-546987233 for the specifics.