From 4d0032051220c9043f37b00344319f30c8a8a45b Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Sat, 4 Dec 2021 19:40:52 -0800 Subject: [PATCH] Add id attribute to h2 elements (#1590) Prior to this change, it was not possible to link to headings. For example, this link wasn't functional: functions/lang/#langformatnumber --- layouts/template-func/page.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/layouts/template-func/page.html b/layouts/template-func/page.html index f08018e4f..8b5f0da85 100644 --- a/layouts/template-func/page.html +++ b/layouts/template-func/page.html @@ -4,8 +4,9 @@ {{ range $k, $v := $funcs }} {{ if $v.Description }} {{ $func := printf "%s.%s" $pkg $k }} -

- + {{ $id := $func | anchorize | safeURL }} +

+