Zalgorithm

Infolinks

Identifying pages in the render-link.html template that have the infolinks parameter set to true:

{{- if .Page.Params.infolinks }}
  {{ warnf ".Page.Params: %v" .Page.Params }}
{{- end }}

Pages with the infolinks = true parameter get their links converted to “infolinks.”

The parameter is set in the markdown file frontmatter:

[params]
infolinks = true

The “infolinks” approach was a good first experiment, but the UI is confusing. Adding a new UI element to a link (the open/close toggle) doesn’t seem like a good idea. The general test is that if I have to explain how to use the page, there’s something wrong with the UI.

An infolink in its closed state
An infolink in its closed state

Note that the “x” button in the next image shouldn’t be there — it was added to the response returned from the API for the next experiment (ajaxlinks):

An infolink in its open state
An infolink in its open state

htmx links are enabled for internal links on pages where htmxlink = true is set in the frontmatter:

[params]
htmxlinks = true