{{ if isset .Params "github" }}

{{ $upleft := .Site.Data.Modules.GithubRibbons.Upleft }}
{{ $upright := .Site.Data.Modules.GithubRibbons.Upright }}
{{ $.Scratch.Set "img" .Site.Data.Modules.GithubRibbons.Default }}
{{ $ribbon := .Params.ghribbon }}
{{ $.Scratch.Set "pos" "upright" }}

{{ if or ( eq $ribbon "black" ) ( eq $ribbon "black-upright" ) }}
  {{ $.Scratch.Set "img" $upright.Black }}
{{ else if or ( eq $ribbon "green" ) ( eq $ribbon "green-upright" ) }}
  {{ $.Scratch.Set "img" $upright.Green }}
{{