--- title: diagrams.Goat description: Converts ASCII art to an SVG diagram, returning a GoAT diagram object. categories: [] keywords: [] action: aliases: [] related: [] returnType: diagrams.goatDiagram signatures: ['diagrams.Goat INPUT'] toc: true --- Useful in a [code block render hook], the `diagram.Goat` function converts ASCII art to an SVG diagram, returning a [GoAT] diagram object with the following methods: [GoAT]: https://github.com/blampe/goat#readme [code block render hook]: /render-hooks/code-blocks/ Inner : (`template.HTML`) Returns the SVG child elements without a wrapping `svg` element, allowing you to create your own wrapper. Wrapped : (`template.HTML`) Returns the SVG child elements wrapped in an `svg` element. Width : (`int`) Returns the width of the rendered diagram, in pixels. Height : (`int`) Returns the height of the rendered diagram, in pixels. ## GoAT Diagrams Hugo natively supports [GoAT](https://github.com/bep/goat) diagrams with an [embedded code block render hook]. [embedded code block render hook]: {{% eturl render-codeblock-goat %}} This Markdown: ```` ```goat .---. .-. .-. .-. .---. | A +--->| 1 |<--->| 2 |<--->| 3 |<---+ B | '---' '-' '+' '+' '---' ``` ```` Is rendered to: ```html