Abbreviations

Is there an equivalent of this in Hugo?

No, there is not.

Okay. I am looking for a way to write abbreviations without HTML in markdown. I can leave it if it is not possible (for now).

If you can live with the abbreviation defined only once on a page (which is the correct structure anyway), you can cheat with a markdown render hook.

layouts/_default/_markup/render-link.html

{{- if eq .Destination "@" -}}
  <abbr title="{{ .Title }}">{{ .Text | safeHTML }}</abbr>
{{- else -}}
  <a href="{{ .Destination | safeURL }}"
    {{- with .Title }} title="{{ . }}"{{ end -}}
  >
    {{- with .Text | safeHTML }}{{ . }}{{ end -}}
  </a>
{{- end -}}

markdown

Mix raw [HTML](@ "Hypertext Markup Language") with markdown.

rendered

<p>Mix raw <abbr title="Hypertext Markup Language">HTML</abbr> with markdown.</p>
2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.