fix(kroki): update error handling pattern for newer Hugo
This commit is contained in:
		
							parent
							
								
									425a5d53ad
								
							
						
					
					
						commit
						0ea4e84975
					
				| 
						 | 
					@ -91,14 +91,14 @@ References:
 | 
				
			||||||
{{- /* Get diagram. */}}
 | 
					{{- /* Get diagram. */}}
 | 
				
			||||||
{{- $body := dict "diagram_source" $inner "diagram_type" $diagramType "output_format" "SVG" "diagram_options" $diagram_opts | jsonify }}
 | 
					{{- $body := dict "diagram_source" $inner "diagram_type" $diagramType "output_format" "SVG" "diagram_options" $diagram_opts | jsonify }}
 | 
				
			||||||
{{- $opts := dict "method" "post" "body" $body }}
 | 
					{{- $opts := dict "method" "post" "body" $body }}
 | 
				
			||||||
{{- with resources.GetRemote $apiEndpoint $opts }}
 | 
					{{- with try (resources.GetRemote $apiEndpoint $opts) }}
 | 
				
			||||||
  {{- with .Err }}
 | 
					  {{- with .Err }}
 | 
				
			||||||
    {{- errorf "The %q code block render hook was unable to get the remote diagram. See %s. %s" $renderHookName $position . }}
 | 
					    {{- errorf "The %q code block render hook was unable to get the remote diagram. See %s. %s" $renderHookName $position . }}
 | 
				
			||||||
  {{- else }}
 | 
					  {{- else with .Value }}
 | 
				
			||||||
    {{- $attrs = merge $attrs (dict "src" .RelPermalink) }}
 | 
					    {{- $attrs = merge $attrs (dict "src" .RelPermalink) }}
 | 
				
			||||||
 | 
					  {{- else }}
 | 
				
			||||||
 | 
					    {{- errorf "The %q code block render hook was unable to get the remote diagram. See %s" $renderHookName $position }}
 | 
				
			||||||
  {{- end }}
 | 
					  {{- end }}
 | 
				
			||||||
{{- else }}
 | 
					 | 
				
			||||||
  {{- errorf "The %q code block render hook was unable to get the remote diagram. See %s" $renderHookName $position }}
 | 
					 | 
				
			||||||
{{- end }}
 | 
					{{- end }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{{- /* Render. */}}
 | 
					{{- /* Render. */}}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue