Docs: add config param + shortcode for bug reporting button

This commit is contained in:
Sybren A. Stüvel 2023-04-14 11:52:01 +02:00
parent c61530e9cc
commit 2a3356049b
3 changed files with 23 additions and 1 deletions

View File

@ -115,3 +115,6 @@ enableRobotsTXT = true
[params.geekdocContentLicense]
name = "CC BY 4.0 - Blender Foundation"
link = "https://creativecommons.org/licenses/by/4.0/"
[params.flamenco]
bugreportURL = "https://projects.blender.org/studio/flamenco/issues/new?template=.gitea%2fissue_template%2fbug.yaml"

View File

@ -9,7 +9,7 @@ Join the community on the [#flamenco channel][chat] of Blender Chat do discuss
development topics. New faces are always welcome!
{{< button size="large" relref="/development/getting-started" >}}Get Started Developing Flamenco{{< /button >}}
{{< button size="large" href="https://projects.blender.org/studio/flamenco/issues/new?template=.gitea%2fissue_template%2fbug.yaml" >}}Report a Bug{{< /button >}}
{{< flamenco/reportBugButton size="large" >}}
If you want to know what kind of work can be done, take a look at the
[workboard][workboard].

View File

@ -0,0 +1,19 @@
{{/* This is an adjusted copy of themes/hugo-geekdoc/layouts/shortcodes/button.html */}}
{{- $ref := .Page.Site.Params.Flamenco.bugreportURL -}}
{{- $class := "" }}
{{- $size := default "regular" (.Get "size" | lower) }}
{{- if not (in (slice "regular" "large" "small") $size) }}
{{- $size = "regular" }}
{{- end }}
{{- with .Get "class" }}
{{- $class = . }}
{{- end }}
<span class="gdoc-button gdoc-button--{{ $size }}{{ with $class }}{{ printf " %s" . }}{{ end }}">
<a
class="gdoc-button__link"
{{- with $ref }}{{ printf " href=\"%s\"" . | safeHTMLAttr }}{{ end }}
>Report a Bug</a>
</span>