{{/* Display copyright license. */}} {{ $copyright_license := .Params.copyright_license | default site.Params.copyright_license }} {{ if and $copyright_license $copyright_license.enable }} {{ $notice := .Params.copyright_license.notice | default site.Params.copyright_license.notice }} {{ $allow_commercial := .Params.copyright_license.allow_commercial | default site.Params.copyright_license.allow_commercial }} {{ $allow_derivatives := .Params.copyright_license.allow_derivatives | default site.Params.copyright_license.allow_derivatives }} {{ $share_alike := .Params.copyright_license.share_alike | default site.Params.copyright_license.share_alike }} {{ $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 }}
{{ replace . "{license}" (printf "CC %s 4.0" $license_url (replace $cc_code "-" " " | upper)) | markdownify }}
{{ end }} {{ end }}