{{- /* A button with a link. This overrides the Hextra shortcode of the same name (v0.13.0) with one difference: the text is rendered as inline Markdown, so that it can hold code such as `ads`. @param {string} link The link of the button. @param {string} text The text of the button, as inline Markdown. @param {string} style The style of the button. @example {{< hextra/hero-button text="Coming from `ads`" link="docs" >}} */ -}} {{- $link := .Get "link" -}} {{- $text := .Get "text" -}} {{- $style := .Get "style" -}} {{- $external := hasPrefix $link "http" -}} {{- $href := cond (hasPrefix $link "/") ($link | relURL) $link -}} {{- /* Keep the opening tag on one line: when nested, a lone ">" is parsed as a blockquote marker. */ -}} {{- $text | .Page.RenderString -}}