{{/* Display copyright license. */}} {{ $copyright_license := .Params.copyright.license | default site.Params.footer.copyright.license }} {{ $notice := .Params.copyright.notice | default site.Params.footer.copyright.notice }} {{ if ($copyright_license.enable | default false) }} {{ $allow_commercial := $copyright_license.allow_commercial | default false }} {{ $allow_derivatives := $copyright_license.allow_derivatives | default false }} {{ $share_alike := $copyright_license.share_alike | default true }} {{ $cc_code := "by" }} {{ if not $allow_commercial }} {{ $cc_code = printf "%s-nc" $cc_code }} {{end}} {{ if and $allow_derivatives $share_alike }} {{ $cc_code = printf "%s-sa" $cc_code }} {{ else if not $allow_derivatives }} {{ $cc_code = printf "%s-nd" $cc_code }} {{end}} {{ $license_url := printf "https://creativecommons.org/licenses/%s/4.0" ($cc_code | urlize) }} {{ with $notice }} {{ end }} {{ else }} {{ with $notice }} {{ end }} {{ end }}