diff --git a/config.yaml b/config.yaml index 2fc3792c5..be9bbcf54 100644 --- a/config.yaml +++ b/config.yaml @@ -30,3 +30,12 @@ taxonomies: rh_product: 'rh_products' other_product: 'other_products' blog_tag: 'blog_tags' + +mediaTypes: + application/json: + suffixes: + - json + +outputFormats: + patterns: + mediatype: application/json diff --git a/content/patterns/_index.md b/content/patterns/_index.md index 4ffac7585..26571f3ef 100644 --- a/content/patterns/_index.md +++ b/content/patterns/_index.md @@ -4,6 +4,9 @@ menu: main: weight: 10 name: Patterns +outputs: + - html + - json --- Browse through available patterns and their respective documentation for deployment and operation. Filter patterns by type, industry, and product. diff --git a/layouts/patterns/list.json.json b/layouts/patterns/list.json.json new file mode 100644 index 000000000..eb458b605 --- /dev/null +++ b/layouts/patterns/list.json.json @@ -0,0 +1,9 @@ +{{- if (eq .RelPermalink "/patterns/") }} + {{- $patterns := where $.Pages "Section" "patterns"}} + {{- $patterns_len := $patterns | len }} + {{- $pattern_list := slice }} + {{- range $index, $pattern := $patterns.ByTitle }} + {{- $pattern_list = $pattern_list | append (dict $pattern.Title $pattern.Params) }} + {{- end }} + {{- $pattern_list | jsonify }} +{{- end }}