diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/assets/css/_social-icons.css b/_vendor/github.com/gohugoio/gohugoioTheme/assets/css/_social-icons.css index 04ea11ec5..6cfa7b1b4 100644 --- a/_vendor/github.com/gohugoio/gohugoioTheme/assets/css/_social-icons.css +++ b/_vendor/github.com/gohugoio/gohugoioTheme/assets/css/_social-icons.css @@ -1,5 +1,8 @@ -.facebook, .twitter, .instagram, .youtube { - fill: #BABABA; +.facebook, +.twitter, +.instagram, +.youtube { + fill: #bababa; } .facebook:hover { fill: #3b5998; @@ -10,10 +13,9 @@ } .twitter:hover { - fill: #BABABA; + fill: #bababa; } - .instagram:hover { fill: #e95950; } @@ -21,3 +23,30 @@ .youtube:hover { fill: #bb0000; } + +.mstdn { + display: inline-block; + background-color: #282c37; + color: #d9e1e8; + text-decoration: none; + padding: 4px 10px 4px 30px; + border-radius: 4px; + font-size: 16px; + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2261.076954mm%22%20height%3D%2265.47831mm%22%20viewBox%3D%220%200%20216.4144%20232.00976%22%3E%3Cpath%20d%3D%22M211.80734%20139.0875c-3.18125%2016.36625-28.4925%2034.2775-57.5625%2037.74875-15.15875%201.80875-30.08375%203.47125-45.99875%202.74125-26.0275-1.1925-46.565-6.2125-46.565-6.2125%200%202.53375.15625%204.94625.46875%207.2025%203.38375%2025.68625%2025.47%2027.225%2046.39125%2027.9425%2021.11625.7225%2039.91875-5.20625%2039.91875-5.20625l.8675%2019.09s-14.77%207.93125-41.08125%209.39c-14.50875.7975-32.52375-.365-53.50625-5.91875C9.23234%20213.82%201.40609%20165.31125.20859%20116.09125c-.365-14.61375-.14-28.39375-.14-39.91875%200-50.33%2032.97625-65.0825%2032.97625-65.0825C49.67234%203.45375%2078.20359.2425%20107.86484%200h.72875c29.66125.2425%2058.21125%203.45375%2074.8375%2011.09%200%200%2032.975%2014.7525%2032.975%2065.0825%200%200%20.41375%2037.13375-4.59875%2062.915%22%20fill%3D%22%233088d4%22%2F%3E%3Cpath%20d%3D%22M177.50984%2080.077v60.94125h-24.14375v-59.15c0-12.46875-5.24625-18.7975-15.74-18.7975-11.6025%200-17.4175%207.5075-17.4175%2022.3525v32.37625H96.20734V85.42325c0-14.845-5.81625-22.3525-17.41875-22.3525-10.49375%200-15.74%206.32875-15.74%2018.7975v59.15H38.90484V80.077c0-12.455%203.17125-22.3525%209.54125-29.675%206.56875-7.3225%2015.17125-11.07625%2025.85-11.07625%2012.355%200%2021.71125%204.74875%2027.8975%2014.2475l6.01375%2010.08125%206.015-10.08125c6.185-9.49875%2015.54125-14.2475%2027.8975-14.2475%2010.6775%200%2019.28%203.75375%2025.85%2011.07625%206.36875%207.3225%209.54%2017.22%209.54%2029.675%22%20fill%3D%22%23fff%22%2F%3E%3C%2Fsvg%3E"); + background-size: 16px; + background-repeat: no-repeat; + background-position: top 50% left 8px; + transition: all 0.5s; +} +.mstdn:hover { + background-color: #484c56; +} + +.mstdn > span { + color: #9baec8; + font-size: 12px; + padding-left: 3px; +} +.mstdn > span:before { + content: "@"; +} diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/assets/output/css/app.css b/_vendor/github.com/gohugoio/gohugoioTheme/assets/output/css/app.css index af648c759..f5e09aeb1 100644 --- a/_vendor/github.com/gohugoio/gohugoioTheme/assets/output/css/app.css +++ b/_vendor/github.com/gohugoio/gohugoioTheme/assets/output/css/app.css @@ -804,8 +804,6 @@ img { max-width: 100%; } .b--washed-red { border-color: #ffdfdf; } .b--transparent { border-color: transparent; } .b--inherit { border-color: inherit; } -.b--initial { border-color: currentColor; border-color: initial; } -.b--unset { border-color: unset; } /* BORDER RADIUS @@ -854,9 +852,6 @@ img { max-width: 100%; } border-top-right-radius: 0; border-bottom-right-radius: 0; } -.br-inherit { border-radius: inherit; } -.br-initial { border-radius: 0; border-radius: initial; } -.br-unset { border-radius: unset; } @media screen and (min-width: 30em) { .br0-ns { border-radius: 0; } .br1-ns { border-radius: .125rem; } @@ -881,9 +876,6 @@ img { max-width: 100%; } border-top-right-radius: 0; border-bottom-right-radius: 0; } - .br-inherit-ns { border-radius: inherit; } - .br-initial-ns { border-radius: 0; border-radius: initial; } - .br-unset-ns { border-radius: unset; } } @media screen and (min-width: 30em) and (max-width: 60em) { .br0-m { border-radius: 0; } @@ -909,9 +901,6 @@ img { max-width: 100%; } border-top-right-radius: 0; border-bottom-right-radius: 0; } - .br-inherit-m { border-radius: inherit; } - .br-initial-m { border-radius: 0; border-radius: initial; } - .br-unset-m { border-radius: unset; } } @media screen and (min-width: 60em) { .br0-l { border-radius: 0; } @@ -937,9 +926,6 @@ img { max-width: 100%; } border-top-right-radius: 0; border-bottom-right-radius: 0; } - .br-inherit-l { border-radius: inherit; } - .br-initial-l { border-radius: 0; border-radius: initial; } - .br-unset-l { border-radius: unset; } } /* @@ -2381,7 +2367,6 @@ img { max-width: 100%; } .washed-yellow { color: #fffceb; } .washed-red { color: #ffdfdf; } .color-inherit { color: inherit; } -/* Background colors */ .bg-black-90 { background-color: rgba(0, 0, 0, .9); } .bg-black-80 { background-color: rgba(0, 0, 0, .8); } .bg-black-70 { background-color: rgba(0, 0, 0, .7); } @@ -2401,6 +2386,7 @@ img { max-width: 100%; } .bg-white-30 { background-color: rgba(255, 255, 255, .3); } .bg-white-20 { background-color: rgba(255, 255, 255, .2); } .bg-white-10 { background-color: rgba(255, 255, 255, .1); } +/* Background colors */ .bg-black { background-color: #000; } .bg-near-black { background-color: #111; } .bg-dark-gray { background-color: #333; } @@ -4685,7 +4671,6 @@ h6:hover .header-link { .searchbox__input::-webkit-input-placeholder{color:#aaa} .searchbox__input:-ms-input-placeholder{color:#aaa} .searchbox__input::-ms-input-placeholder{color:#aaa} -.searchbox__input::-moz-placeholder{color:#aaa} .searchbox__input::placeholder{color:#aaa} .searchbox__submit{position:absolute;top:0;margin:0;border:0;border-radius:16px 0 0 16px;background-color:rgba(69, 142, 225, 0);padding:0;width:32px;height:100%;vertical-align:middle;text-align:center;font-size:inherit;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;right:inherit;left:0} .searchbox__submit:before{display:inline-block;margin-right:-4px;height:100%;vertical-align:middle;content:""} @@ -4919,14 +4904,14 @@ pre { text-decoration: none; } -.column-count-2 {-webkit-column-count: 1;-moz-column-count: 1;column-count: 1} -.column-gap-1 {-webkit-column-gap: 0;-moz-column-gap: 0;column-gap: 0} -.break-inside-avoid {-webkit-column-break-inside: auto;page-break-inside: auto;break-inside: auto} +.column-count-2 {-webkit-column-count: 1;column-count: 1} +.column-gap-1 {-webkit-column-gap: 0;column-gap: 0} +.break-inside-avoid {-webkit-column-break-inside: auto;break-inside: auto} @media screen and (min-width: 60em) { - .column-count-3-l {-webkit-column-count: 3;-moz-column-count: 3;column-count: 3} - .column-count-2-l {-webkit-column-count: 2;-moz-column-count: 2;column-count: 2} - .column-gap-1-l {-webkit-column-gap: 1;-moz-column-gap: 1;column-gap: 1} - .break-inside-avoid-l {-webkit-column-break-inside: avoid;page-break-inside: avoid;break-inside: avoid} + .column-count-3-l {-webkit-column-count: 3;column-count: 3} + .column-count-2-l {-webkit-column-count: 2;column-count: 2} + .column-gap-1-l {-webkit-column-gap: 1;column-gap: 1} + .break-inside-avoid-l {-webkit-column-break-inside: avoid;break-inside: avoid} } .prose ul, .prose ol { margin-bottom: 2em; @@ -4937,10 +4922,6 @@ pre { .prose li:hover { background-color: #eee } -.prose ::-moz-selection { - background: #0594CB; /* WebKit/Blink Browsers */ - color: white; -} .prose ::selection { background: #0594CB; /* WebKit/Blink Browsers */ color: white; @@ -5132,8 +5113,11 @@ code, .code, pre code, .highlight pre { -webkit-transition: opacity .15s ease-in; transition: opacity .15s ease-in; } -.facebook, .twitter, .instagram, .youtube { - fill: #BABABA; +.facebook, +.twitter, +.instagram, +.youtube { + fill: #bababa; } .facebook:hover { fill: #3b5998; @@ -5142,7 +5126,7 @@ code, .code, pre code, .highlight pre { fill: #55acee; } .twitter:hover { - fill: #BABABA; + fill: #bababa; } .instagram:hover { fill: #e95950; @@ -5150,6 +5134,32 @@ code, .code, pre code, .highlight pre { .youtube:hover { fill: #bb0000; } +.mstdn { + display: inline-block; + background-color: #282c37; + color: #d9e1e8; + text-decoration: none; + padding: 4px 10px 4px 30px; + border-radius: 4px; + font-size: 16px; + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2261.076954mm%22%20height%3D%2265.47831mm%22%20viewBox%3D%220%200%20216.4144%20232.00976%22%3E%3Cpath%20d%3D%22M211.80734%20139.0875c-3.18125%2016.36625-28.4925%2034.2775-57.5625%2037.74875-15.15875%201.80875-30.08375%203.47125-45.99875%202.74125-26.0275-1.1925-46.565-6.2125-46.565-6.2125%200%202.53375.15625%204.94625.46875%207.2025%203.38375%2025.68625%2025.47%2027.225%2046.39125%2027.9425%2021.11625.7225%2039.91875-5.20625%2039.91875-5.20625l.8675%2019.09s-14.77%207.93125-41.08125%209.39c-14.50875.7975-32.52375-.365-53.50625-5.91875C9.23234%20213.82%201.40609%20165.31125.20859%20116.09125c-.365-14.61375-.14-28.39375-.14-39.91875%200-50.33%2032.97625-65.0825%2032.97625-65.0825C49.67234%203.45375%2078.20359.2425%20107.86484%200h.72875c29.66125.2425%2058.21125%203.45375%2074.8375%2011.09%200%200%2032.975%2014.7525%2032.975%2065.0825%200%200%20.41375%2037.13375-4.59875%2062.915%22%20fill%3D%22%233088d4%22%2F%3E%3Cpath%20d%3D%22M177.50984%2080.077v60.94125h-24.14375v-59.15c0-12.46875-5.24625-18.7975-15.74-18.7975-11.6025%200-17.4175%207.5075-17.4175%2022.3525v32.37625H96.20734V85.42325c0-14.845-5.81625-22.3525-17.41875-22.3525-10.49375%200-15.74%206.32875-15.74%2018.7975v59.15H38.90484V80.077c0-12.455%203.17125-22.3525%209.54125-29.675%206.56875-7.3225%2015.17125-11.07625%2025.85-11.07625%2012.355%200%2021.71125%204.74875%2027.8975%2014.2475l6.01375%2010.08125%206.015-10.08125c6.185-9.49875%2015.54125-14.2475%2027.8975-14.2475%2010.6775%200%2019.28%203.75375%2025.85%2011.07625%206.36875%207.3225%209.54%2017.22%209.54%2029.675%22%20fill%3D%22%23fff%22%2F%3E%3C%2Fsvg%3E"); + background-size: 16px; + background-repeat: no-repeat; + background-position: top 50% left 8px; + -webkit-transition: all 0.5s; + transition: all 0.5s; +} +.mstdn:hover { + background-color: #484c56; +} +.mstdn > span { + color: #9baec8; + font-size: 12px; + padding-left: 3px; +} +.mstdn > span:before { + content: "@"; +} @media (min-width: 75em) { [data-scrolldir="down"] .sticky { diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/assets/output/js/app.js b/_vendor/github.com/gohugoio/gohugoioTheme/assets/output/js/app.js index 346f209ba..a3e1801f8 100644 --- a/_vendor/github.com/gohugoio/gohugoioTheme/assets/output/js/app.js +++ b/_vendor/github.com/gohugoio/gohugoioTheme/assets/output/js/app.js @@ -1,24 +1,17 @@ -!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=1)}([function(t,e,n){!function(e,n){var r=function(t,e,n){"use strict";var r,i;if(function(){var e,n={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",fastLoadedClass:"ls-is-cached",iframeLoadMode:0,srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:!0,ricTimeout:0,throttleDelay:125};for(e in i=t.lazySizesConfig||t.lazysizesConfig||{},n)e in i||(i[e]=n[e])}(),!e||!e.getElementsByClassName)return{init:function(){},cfg:i,noSupport:!0};var o=e.documentElement,s=t.HTMLPictureElement,a=t.addEventListener.bind(t),u=t.setTimeout,c=t.requestAnimationFrame||u,l=t.requestIdleCallback,h=/^picture$/i,f=["load","error","lazyincluded","_lazyloaded"],p={},d=Array.prototype.forEach,g=function(t,e){return p[e]||(p[e]=new RegExp("(\\s|^)"+e+"(\\s|$)")),p[e].test(t.getAttribute("class")||"")&&p[e]},m=function(t,e){g(t,e)||t.setAttribute("class",(t.getAttribute("class")||"").trim()+" "+e)},y=function(t,e){var n;(n=g(t,e))&&t.setAttribute("class",(t.getAttribute("class")||"").replace(n," "))},v=function(t,e,n){var r=n?"addEventListener":"removeEventListener";n&&v(t,e),f.forEach((function(n){t[r](n,e)}))},b=function(t,n,i,o,s){var a=e.createEvent("Event");return i||(i={}),i.instance=r,a.initEvent(n,!o,!s),a.detail=i,t.dispatchEvent(a),a},w=function(e,n){var r;!s&&(r=t.picturefill||i.pf)?(n&&n.src&&!e.getAttribute("srcset")&&e.setAttribute("srcset",n.src),r({reevaluate:!0,elements:[e]})):n&&n.src&&(e.src=n.src)},_=function(t,e){return(getComputedStyle(t,null)||{})[e]},x=function(t,e,n){for(n=n||t.offsetWidth;n0)&&"visible"!=_(i,"overflow")&&(r=i.getBoundingClientRect(),s=z>r.left&&Fr.top-1&&H500&&o.clientWidth>500?500:370:i.expand,r._defEx=p,d=p*i.expFactor,g=i.hFac,U=null,W2&&D>2&&!e.hidden?(W=d,X=0):W=D>1&&X>1&&Q<6?p:0),f!==c&&($=innerWidth+c*g,M=innerHeight+c,l=-1*c,f=c),s=m[n].getBoundingClientRect(),(B=s.bottom)>=l&&(H=s.top)<=M&&(z=s.right)>=l*g&&(F=s.left)<=$&&(B||z||F||H)&&(i.loadHidden||Z(m[n]))&&(R&&Q<3&&!h&&(D<3||X<4)||Y(m[n],c))){if(at(m[n]),u=!0,Q>9)break}else!u&&R&&!a&&Q<4&&X<4&&D>2&&(L[0]||i.preloadAfterLoad)&&(L[0]||!h&&(B||z||F||H||"auto"!=m[n].getAttribute(i.sizesAttr)))&&(a=L[0]||m[n]);a&&!u&&at(a)}},et=function(t){var e,r=0,o=i.throttleDelay,s=i.ricTimeout,a=function(){e=!1,r=n.now(),t()},c=l&&s>49?function(){l(a,{timeout:s}),s!==i.ricTimeout&&(s=i.ricTimeout)}:C((function(){u(a)}),!0);return function(t){var i;(t=!0===t)&&(s=33),e||(e=!0,(i=o-(n.now()-r))<0&&(i=0),t||i<9?c():u(c,i))}}(tt),nt=function(t){var e=t.target;e._lazyCache?delete e._lazyCache:(G(t),m(e,i.loadedClass),y(e,i.loadingClass),v(e,it),b(e,"lazyloaded"))},rt=C(nt),it=function(t){rt({target:t.target})},ot=function(t){var e,n=t.getAttribute(i.srcsetAttr);(e=i.customMedia[t.getAttribute("data-media")||t.getAttribute("media")])&&t.setAttribute("media",e),n&&t.setAttribute("srcset",n)},st=C((function(t,e,n,r,o){var s,a,c,l,f,p;(f=b(t,"lazybeforeunveil",e)).defaultPrevented||(r&&(n?m(t,i.autosizesClass):t.setAttribute("sizes",r)),a=t.getAttribute(i.srcsetAttr),s=t.getAttribute(i.srcAttr),o&&(l=(c=t.parentNode)&&h.test(c.nodeName||"")),p=e.firesLoad||"src"in t&&(a||s||l),f={target:t},m(t,i.loadingClass),p&&(clearTimeout(P),P=u(G,2500),v(t,it,!0)),l&&d.call(c.getElementsByTagName("source"),ot),a?t.setAttribute("srcset",a):s&&!l&&(K.test(t.nodeName)?function(t,e){var n=t.getAttribute("data-load-mode")||i.iframeLoadMode;0==n?t.contentWindow.location.replace(e):1==n&&(t.src=e)}(t,s):t.src=s),o&&(a||l)&&w(t,{src:s})),t._lazyRace&&delete t._lazyRace,y(t,i.lazyClass),S((function(){var e=t.complete&&t.naturalWidth>1;p&&!e||(e&&m(t,i.fastLoadedClass),nt(f),t._lazyCache=!0,u((function(){"_lazyCache"in t&&delete t._lazyCache}),9)),"lazy"==t.loading&&Q--}),!0)})),at=function(t){if(!t._lazyRace){var e,n=V.test(t.nodeName),r=n&&(t.getAttribute(i.sizesAttr)||t.getAttribute("sizes")),o="auto"==r;(!o&&R||!n||!t.getAttribute("src")&&!t.srcset||t.complete||g(t,i.errorClass)||!g(t,i.lazyClass))&&(e=b(t,"lazyunveilread").detail,o&&T.updateElem(t,!0,t.offsetWidth),t._lazyRace=!0,Q++,st(t,e,o,r,n))}},ut=A((function(){i.loadMode=3,et()})),ct=function(){3==i.loadMode&&(i.loadMode=2),ut()},lt=function(){R||(n.now()-q<999?u(lt,999):(R=!0,i.loadMode=3,et(),a("scroll",ct,!0)))},{_:function(){q=n.now(),r.elements=e.getElementsByClassName(i.lazyClass),L=e.getElementsByClassName(i.lazyClass+" "+i.preloadClass),a("scroll",et,!0),a("resize",et,!0),a("pageshow",(function(t){if(t.persisted){var n=e.querySelectorAll("."+i.loadingClass);n.length&&n.forEach&&c((function(){n.forEach((function(t){t.complete&&at(t)}))}))}})),t.MutationObserver?new MutationObserver(et).observe(o,{childList:!0,subtree:!0,attributes:!0}):(o.addEventListener("DOMNodeInserted",et,!0),o.addEventListener("DOMAttrModified",et,!0),setInterval(et,999)),a("hashchange",et,!0),["focus","mouseover","click","load","transitionend","animationend"].forEach((function(t){e.addEventListener(t,et,!0)})),/d$|^c/.test(e.readyState)?lt():(a("load",lt),e.addEventListener("DOMContentLoaded",et),u(lt,2e4)),r.elements.length?(tt(),S._lsFlush()):et()},checkElems:et,unveil:at,_aLSL:ct}),T=(N=C((function(t,e,n,r){var i,o,s;if(t._lazysizesWidth=r,r+="px",t.setAttribute("sizes",r),h.test(e.nodeName||""))for(o=0,s=(i=e.getElementsByTagName("source")).length;o0)&&"visible"!=_(i,"overflow")&&(r=i.getBoundingClientRect(),s=z>r.left&&Fr.top-1&&H500&&o.clientWidth>500?500:370:i.expand,r._defEx=d,p=d*i.expFactor,g=i.hFac,U=null,W2&&D>2&&!e.hidden?(W=p,X=0):W=D>1&&X>1&&Q<6?d:0),f!==c&&($=innerWidth+c*g,M=innerHeight+c,l=-1*c,f=c),s=m[n].getBoundingClientRect(),(B=s.bottom)>=l&&(H=s.top)<=M&&(z=s.right)>=l*g&&(F=s.left)<=$&&(B||z||F||H)&&(i.loadHidden||Z(m[n]))&&(R&&Q<3&&!h&&(D<3||X<4)||Y(m[n],c))){if(at(m[n]),u=!0,Q>9)break}else!u&&R&&!a&&Q<4&&X<4&&D>2&&(L[0]||i.preloadAfterLoad)&&(L[0]||!h&&(B||z||F||H||"auto"!=m[n].getAttribute(i.sizesAttr)))&&(a=L[0]||m[n]);a&&!u&&at(a)}},et=function(t){var e,r=0,o=i.throttleDelay,s=i.ricTimeout,a=function(){e=!1,r=n.now(),t()},c=l&&s>49?function(){l(a,{timeout:s}),s!==i.ricTimeout&&(s=i.ricTimeout)}:C((function(){u(a)}),!0);return function(t){var i;(t=!0===t)&&(s=33),e||(e=!0,(i=o-(n.now()-r))<0&&(i=0),t||i<9?c():u(c,i))}}(tt),nt=function(t){var e=t.target;e._lazyCache?delete e._lazyCache:(G(t),m(e,i.loadedClass),y(e,i.loadingClass),v(e,it),b(e,"lazyloaded"))},rt=C(nt),it=function(t){rt({target:t.target})},ot=function(t){var e,n=t.getAttribute(i.srcsetAttr);(e=i.customMedia[t.getAttribute("data-media")||t.getAttribute("media")])&&t.setAttribute("media",e),n&&t.setAttribute("srcset",n)},st=C((function(t,e,n,r,o){var s,a,c,l,f,d;(f=b(t,"lazybeforeunveil",e)).defaultPrevented||(r&&(n?m(t,i.autosizesClass):t.setAttribute("sizes",r)),a=t.getAttribute(i.srcsetAttr),s=t.getAttribute(i.srcAttr),o&&(l=(c=t.parentNode)&&h.test(c.nodeName||"")),d=e.firesLoad||"src"in t&&(a||s||l),f={target:t},m(t,i.loadingClass),d&&(clearTimeout(P),P=u(G,2500),v(t,it,!0)),l&&p.call(c.getElementsByTagName("source"),ot),a?t.setAttribute("srcset",a):s&&!l&&(K.test(t.nodeName)?function(t,e){var n=t.getAttribute("data-load-mode")||i.iframeLoadMode;0==n?t.contentWindow.location.replace(e):1==n&&(t.src=e)}(t,s):t.src=s),o&&(a||l)&&w(t,{src:s})),t._lazyRace&&delete t._lazyRace,y(t,i.lazyClass),S((function(){var e=t.complete&&t.naturalWidth>1;d&&!e||(e&&m(t,i.fastLoadedClass),nt(f),t._lazyCache=!0,u((function(){"_lazyCache"in t&&delete t._lazyCache}),9)),"lazy"==t.loading&&Q--}),!0)})),at=function(t){if(!t._lazyRace){var e,n=V.test(t.nodeName),r=n&&(t.getAttribute(i.sizesAttr)||t.getAttribute("sizes")),o="auto"==r;(!o&&R||!n||!t.getAttribute("src")&&!t.srcset||t.complete||g(t,i.errorClass)||!g(t,i.lazyClass))&&(e=b(t,"lazyunveilread").detail,o&&T.updateElem(t,!0,t.offsetWidth),t._lazyRace=!0,Q++,st(t,e,o,r,n))}},ut=A((function(){i.loadMode=3,et()})),ct=function(){3==i.loadMode&&(i.loadMode=2),ut()},lt=function(){R||(n.now()-q<999?u(lt,999):(R=!0,i.loadMode=3,et(),a("scroll",ct,!0)))},{_:function(){q=n.now(),r.elements=e.getElementsByClassName(i.lazyClass),L=e.getElementsByClassName(i.lazyClass+" "+i.preloadClass),a("scroll",et,!0),a("resize",et,!0),a("pageshow",(function(t){if(t.persisted){var n=e.querySelectorAll("."+i.loadingClass);n.length&&n.forEach&&c((function(){n.forEach((function(t){t.complete&&at(t)}))}))}})),t.MutationObserver?new MutationObserver(et).observe(o,{childList:!0,subtree:!0,attributes:!0}):(o.addEventListener("DOMNodeInserted",et,!0),o.addEventListener("DOMAttrModified",et,!0),setInterval(et,999)),a("hashchange",et,!0),["focus","mouseover","click","load","transitionend","animationend"].forEach((function(t){e.addEventListener(t,et,!0)})),/d$|^c/.test(e.readyState)?lt():(a("load",lt),e.addEventListener("DOMContentLoaded",et),u(lt,2e4)),r.elements.length?(tt(),S._lsFlush()):et()},checkElems:et,unveil:at,_aLSL:ct}),T=(N=C((function(t,e,n,r){var i,o,s;if(t._lazysizesWidth=r,r+="px",t.setAttribute("sizes",r),h.test(e.nodeName||""))for(o=0,s=(i=e.getElementsByTagName("source")).length;o1&&void 0!==arguments[1]?arguments[1]:{container:document.body},n="";return"string"==typeof t?n=h(t,e):t instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(null==t?void 0:t.type)?n=h(t.value,e):(n=u()(t),c("copy")),n};function p(t){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var d=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.action,n=void 0===e?"copy":e,r=t.container,i=t.target,o=t.text;if("copy"!==n&&"cut"!==n)throw new Error('Invalid "action" value, use either "copy" or "cut"');if(void 0!==i){if(!i||"object"!==p(i)||1!==i.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===n&&i.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===n&&(i.hasAttribute("readonly")||i.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes')}return o?f(o,{container:r}):i?"cut"===n?l(i):f(i,{container:r}):void 0};function g(t){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function m(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{container:document.body};return f(t,e)}},{key:"cut",value:function(t){return l(t)}},{key:"isSupported",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],e="string"==typeof t?[t]:t,n=!!document.queryCommandSupported;return e.forEach((function(t){n=n&&!!document.queryCommandSupported(t)})),n}}],(n=[{key:"resolveOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===g(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=s()(t,"click",(function(t){return e.onClick(t)}))}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget,n=this.action(e)||"copy",r=d({action:n,container:this.container,target:this.target(e),text:this.text(e)});this.emit(r?"success":"error",{action:n,text:r,trigger:e,clearSelection:function(){e&&e.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(t){return _("action",t)}},{key:"defaultTarget",value:function(t){var e=_("target",t);if(e)return document.querySelector(e)}},{key:"defaultText",value:function(t){return _("text",t)}},{key:"destroy",value:function(){this.listener.destroy()}}])&&m(e.prototype,n),r&&m(e,r),o}(i())},828:function(t){if("undefined"!=typeof Element&&!Element.prototype.matches){var e=Element.prototype;e.matches=e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector}t.exports=function(t,e){for(;t&&9!==t.nodeType;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}},438:function(t,e,n){var r=n(828);function i(t,e,n,r,i){var s=o.apply(this,arguments);return t.addEventListener(n,s,i),{destroy:function(){t.removeEventListener(n,s,i)}}}function o(t,e,n,i){return function(n){n.delegateTarget=r(n.target,e),n.delegateTarget&&i.call(t,n)}}t.exports=function(t,e,n,r,o){return"function"==typeof t.addEventListener?i.apply(null,arguments):"function"==typeof n?i.bind(null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),Array.prototype.map.call(t,(function(t){return i(t,e,n,r,o)})))}},879:function(t,e){e.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},e.nodeList=function(t){var n=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===n||"[object HTMLCollection]"===n)&&"length"in t&&(0===t.length||e.node(t[0]))},e.string=function(t){return"string"==typeof t||t instanceof String},e.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},370:function(t,e,n){var r=n(879),i=n(438);t.exports=function(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!r.string(e))throw new TypeError("Second argument must be a String");if(!r.fn(n))throw new TypeError("Third argument must be a Function");if(r.node(t))return function(t,e,n){return t.addEventListener(e,n),{destroy:function(){t.removeEventListener(e,n)}}}(t,e,n);if(r.nodeList(t))return function(t,e,n){return Array.prototype.forEach.call(t,(function(t){t.addEventListener(e,n)})),{destroy:function(){Array.prototype.forEach.call(t,(function(t){t.removeEventListener(e,n)}))}}}(t,e,n);if(r.string(t))return function(t,e,n){return i(document.body,t,e,n)}(t,e,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}},817:function(t){t.exports=function(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName){var n=t.hasAttribute("readonly");n||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),n||t.removeAttribute("readonly"),e=t.value}else{t.hasAttribute("contenteditable")&&t.focus();var r=window.getSelection(),i=document.createRange();i.selectNodeContents(t),r.removeAllRanges(),r.addRange(i),e=r.toString()}return e}},279:function(t){function e(){}e.prototype={on:function(t,e,n){var r=this.e||(this.e={});return(r[t]||(r[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var r=this;function i(){r.off(t,i),e.apply(n,arguments)}return i._=e,this.on(t,i,n)},emit:function(t){for(var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),r=0,i=n.length;r";var r=document.createElement("div");r.appendChild(document.createTextNode(e)),n=n||"";var i=document.createElement("div");i.appendChild(document.createTextNode(n));var s=document.createElement("div");return s.appendChild(document.createTextNode(t)),s.innerHTML.replace(RegExp(o(r.innerHTML),"g"),e).replace(RegExp(o(i.innerHTML),"g"),n)}}},function(t,e,n){"use strict";t.exports={element:null}},function(t,e){var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString;t.exports=function(t,e,i){if("[object Function]"!==r.call(e))throw new TypeError("iterator must be a function");var o=t.length;if(o===+o)for(var s=0;s was loaded but did not call our provided callback"),JSONPScriptError:o("JSONPScriptError"," +``` + +Rendered: + + +```html + +``` + +To avoid escaping by Go's [html/template] package: + +```go-html-template +{{ $title := "Lilo & Stitch" }} + +``` + +Rendered: + +```html + +``` + +[html/template]: https://pkg.go.dev/html/template diff --git a/content/en/functions/safeURL.md b/content/en/functions/safe/URL.md similarity index 89% rename from content/en/functions/safeURL.md rename to content/en/functions/safe/URL.md index b21de4953..edc62ff9d 100644 --- a/content/en/functions/safeURL.md +++ b/content/en/functions/safe/URL.md @@ -1,13 +1,24 @@ --- -title: safeURL +title: safe.URL +linkTitle: safeURL description: Declares the provided string as a safe URL or URL substring. -keywords: [strings,urls] categories: [functions] +keywords: [] menu: docs: parent: functions -signature: ["safeURL INPUT"] -relatedfuncs: [] +function: + aliases: [safeURL] + returnType: template.URL + signatures: [safe.URL INPUT] +relatedFunctions: + - safe.CSS + - safe.HTML + - safe.HTMLAttr + - safe.JS + - safe.JSStr + - safe.URL +aliases: [/functions/safeurl] --- `safeURL` declares the provided string as a "safe" URL or URL substring (see [RFC 3986]). A URL like `javascript:checkThatFormNotEditedBeforeLeavingPage()` from a trusted source should go in the page, but by default dynamic `javascript:` URLs are filtered out since they are a frequently exploited injection vector. diff --git a/content/en/functions/sha.md b/content/en/functions/sha.md deleted file mode 100644 index 1f6cf8da0..000000000 --- a/content/en/functions/sha.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: sha -description: Hashes the given input and returns either an SHA1 or SHA256 checksum. -categories: [functions] -menu: - docs: - parent: functions -keywords: [sha,checksum] -signature: ["sha1 INPUT", "sha256 INPUT"] -relatedfuncs: [md5] -aliases: [sha1, sha256] ---- - -`sha1` hashes the given input and returns its SHA1 checksum. - -```go-html-template -{{ sha1 "Hello world, gophers!" }} - -``` - -`sha256` hashes the given input and returns its SHA256 checksum. - -```go-html-template -{{ sha256 "Hello world, gophers!" }} - -``` diff --git a/content/en/functions/singularize.md b/content/en/functions/singularize.md deleted file mode 100644 index 4e56684b9..000000000 --- a/content/en/functions/singularize.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: singularize -description: Converts a word according to a set of common English singularization rules. -categories: [functions] -menu: - docs: - parent: functions -keywords: [strings,singular] -signature: ["singularize INPUT"] -relatedfuncs: [] ---- - -`{{ "cats" | singularize }}` → "cat" - -See also the `.Data.Singular` [taxonomy variable](/variables/taxonomy/) for singularizing taxonomy names. diff --git a/content/en/functions/site.md b/content/en/functions/site.md deleted file mode 100644 index b408f7141..000000000 --- a/content/en/functions/site.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: site -description: The `site` function provides global access to the same data as the `.Site` page method. -keywords: [] -categories: [functions] -menu: - docs: - parent: functions -toc: -signature: ["site"] -relatedfuncs: ["hugo"] ---- - -`site` is a global function which returns the same data as the `.Site` page method. See: [Site Variables](/variables/site). diff --git a/content/en/functions/site/index.md b/content/en/functions/site/index.md new file mode 100644 index 000000000..3341bff98 --- /dev/null +++ b/content/en/functions/site/index.md @@ -0,0 +1,35 @@ +--- +title: site +description: Provides global access to the .Site object. +categories: [functions] +keywords: [] +menu: + docs: + parent: functions +function: + aliases: [] + returnType: + signatures: [site] +relatedFunctions: + - hugo + - page + - site +aliases: [/functions/site] +--- + +At the top level of a template that receives the `Site` object in context, these are equivalent: + +```go-html-template +{{ .Site.Params.foo }} +{{ site.Params.foo }} +``` + +When the `Site` object is not in context, use the global `site` function: + +```go-html-template +{{ site.Params.foo }} +``` + +{{% note %}} +To simplify your templates, use the global `site` function regardless of whether the `Site` object is in context. +{{% /note %}} diff --git a/content/en/functions/slice.md b/content/en/functions/slice.md deleted file mode 100644 index d2ef62861..000000000 --- a/content/en/functions/slice.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -title: slice -description: Creates a slice (array) of all passed arguments. -categories: [functions] -menu: - docs: - parent: functions -keywords: [slice, array, interface] -signature: ["slice ITEM..."] -relatedfuncs: [] ---- - -One use case is the concatenation of elements in combination with the [`delimit` function]: - -{{< code file="slice.html" >}} -{{ $sliceOfStrings := slice "foo" "bar" "buzz" }} - -{{ delimit ($sliceOfStrings) ", " }} - -{{< /code >}} - - -[`delimit` function]: /functions/delimit/ diff --git a/content/en/functions/slicestr.md b/content/en/functions/slicestr.md deleted file mode 100644 index bbdf95696..000000000 --- a/content/en/functions/slicestr.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: slicestr -description: Creates a slice of a half-open range, including start and end indices. -categories: [functions] -menu: - docs: - parent: functions -keywords: [strings] -signature: - - "slicestr STRING START [END]" - - "strings.SliceString STRING START [END]" -relatedfuncs: [] ---- - -For example, 1 and 4 creates a slice including elements 1 through 3. -The `end` index can be omitted; it defaults to the string's length. - -* `{{ slicestr "BatMan" 3 }}` → "Man" -* `{{ slicestr "BatMan" 0 3 }}` → "Bat" diff --git a/content/en/functions/split.md b/content/en/functions/split.md deleted file mode 100644 index d2f3cc8b3..000000000 --- a/content/en/functions/split.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -title: split -description: Returns a slice of strings by splitting STRING by DELIM. -categories: [functions] -menu: - docs: - parent: functions -keywords: [strings] -signature: ["split STRING DELIM"] -relatedfuncs: [] ---- - -Examples: - -```go-html-template -{{ split "tag1,tag2,tag3" "," }} → ["tag1", "tag2", "tag3"] -{{ split "abc" "" }} → ["a", "b", "c"] -``` - - -{{% note %}} -`split` essentially does the opposite of [delimit](/functions/delimit). While `split` creates a slice from a string, `delimit` creates a string from a slice. -{{% /note %}} diff --git a/content/en/functions/strings.Contains.md b/content/en/functions/strings.Contains.md deleted file mode 100644 index 44cb73b81..000000000 --- a/content/en/functions/strings.Contains.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: strings.Contains -description: Reports whether a string contains a substring. -categories: [functions] -menu: - docs: - parent: functions -keywords: [string strings substring contains] -signature: ["strings.Contains STRING SUBSTRING"] -relatedfuncs: [strings.ContainsAny] ---- - - {{ strings.Contains "Hugo" "go" }} → true - -The check is case sensitive: - - {{ strings.Contains "Hugo" "Go" }} → false diff --git a/content/en/functions/strings.ContainsAny.md b/content/en/functions/strings.ContainsAny.md deleted file mode 100644 index 36fa8701b..000000000 --- a/content/en/functions/strings.ContainsAny.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: strings.ContainsAny -description: Reports whether a string contains any character from a given string. -categories: [functions] -menu: - docs: - parent: functions -keywords: [string strings substring contains any] -signature: ["strings.ContainsAny STRING CHARACTERS"] -relatedfuncs: [strings.Contains] ---- - - {{ strings.ContainsAny "Hugo" "gm" }} → true - -The check is case sensitive: - - {{ strings.ContainsAny "Hugo" "Gm" }} → false diff --git a/content/en/functions/strings.Count.md b/content/en/functions/strings.Count.md deleted file mode 100644 index 7c3945693..000000000 --- a/content/en/functions/strings.Count.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: strings.Count -description: Returns the number of non-overlapping instances of a substring within a string. -categories: [functions] -menu: - docs: - parent: functions -keywords: [count, counting, character count] -signature: ["strings.Count SUBSTR STRING"] -relatedfuncs: [] ---- - -If `SUBSTR` is an empty string, this function returns 1 plus the number of Unicode code points in `STRING`. - -Example|Result -:--|:-- -`{{ "aaabaab" \| strings.Count "a" }}`|5 -`{{ "aaabaab" \| strings.Count "aa" }}`|2 -`{{ "aaabaab" \| strings.Count "aaa" }}`|1 -`{{ "aaabaab" \| strings.Count "" }}`|8 diff --git a/content/en/functions/strings.FirstUpper.md b/content/en/functions/strings.FirstUpper.md deleted file mode 100644 index fab82a2dc..000000000 --- a/content/en/functions/strings.FirstUpper.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: strings.FirstUpper -description: Capitalizes the first character of a given string. -categories: [functions] -menu: - docs: - parent: functions -keywords: [strings capitalize uppercase first] -signature: ["strings.FirstUpper STRING"] ---- - - {{ strings.FirstUpper "foo" }} → "Foo" diff --git a/content/en/functions/strings.HasPrefix.md b/content/en/functions/strings.HasPrefix.md deleted file mode 100644 index 70317a4c1..000000000 --- a/content/en/functions/strings.HasPrefix.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: strings.HasPrefix -description: Tests whether a string begins with prefix. -categories: [functions] -menu: - docs: - parent: functions -keywords: [strings] -signature: ["hasPrefix STRING PREFIX","strings.HasPrefix STRING PREFIX"] -relatedfuncs: [hasSuffix] -aliases: [/functions/hasprefix/] ---- - -```go-html-template -{{ hasPrefix "Hugo" "Hu" }} → true -``` diff --git a/content/en/functions/strings.HasSuffix.md b/content/en/functions/strings.HasSuffix.md deleted file mode 100644 index 3ead121a3..000000000 --- a/content/en/functions/strings.HasSuffix.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: strings.HasSuffix -description: Tests whether a string ends with suffix. -categories: [functions] -menu: - docs: - parent: functions -keywords: [strings] -signature: ["hasSuffix STRING SUFFIX","strings.HasSuffix STRING SUFFIX"] -relatedfuncs: [hasPrefix] -aliases: [/functions/hassuffix/] ---- - -```go-html-template -{{ hasSuffix "Hugo" "go" }} → true -``` diff --git a/content/en/functions/strings.Repeat.md b/content/en/functions/strings.Repeat.md deleted file mode 100644 index 99b2fe5a5..000000000 --- a/content/en/functions/strings.Repeat.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: strings.Repeat -description: Returns INPUT repeated COUNT times. -categories: [functions] -menu: - docs: - parent: functions -keywords: [strings] -signature: ["strings.Repeat COUNT INPUT"] -relatedfuncs: [] ---- - -```go-html-template -{{ strings.Repeat 3 "yo" }} → "yoyoyo" -{{ "yo" | strings.Repeat 3 }} → "yoyoyo" -``` diff --git a/content/en/functions/strings.RuneCount.md b/content/en/functions/strings.RuneCount.md deleted file mode 100644 index 3a72e339a..000000000 --- a/content/en/functions/strings.RuneCount.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: strings.RuneCount -description: Determines the number of runes in a string. -categories: [functions] -menu: - docs: - parent: functions -keywords: [counting, character count, length, rune length, rune count] -signature: ["strings.RuneCount INPUT"] -relatedfuncs: ["len", "countrunes"] ---- - -In contrast with `strings.CountRunes` function, which strips HTML and whitespace before counting runes, `strings.RuneCount` simply counts all the runes in a string. It relies on the Go [`utf8.RuneCountInString`] function. - -```go-html-template -{{ "Hello, 世界" | strings.RuneCount }} - -``` - -[`utf8.RuneCount`]: https://golang.org/pkg/unicode/utf8/#RuneCount diff --git a/content/en/functions/strings.TrimLeft.md b/content/en/functions/strings.TrimLeft.md deleted file mode 100644 index b0271c8a8..000000000 --- a/content/en/functions/strings.TrimLeft.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: strings.TrimLeft -description: Returns a slice of a given string with all leading characters contained in the cutset removed. -categories: [functions] -menu: - docs: - parent: functions -keywords: [strings] -signature: ["strings.TrimLeft CUTSET STRING"] -relatedfuncs: [strings.TrimRight] ---- - -Given the string `"abba"`, leading `"a"`'s can be removed a follows: - - {{ strings.TrimLeft "a" "abba" }} → "bba" - -Numbers can be handled as well: - - {{ strings.TrimLeft 12 1221341221 }} → "341221" diff --git a/content/en/functions/strings.TrimPrefix.md b/content/en/functions/strings.TrimPrefix.md deleted file mode 100644 index c3f702961..000000000 --- a/content/en/functions/strings.TrimPrefix.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: strings.TrimPrefix -description: Returns a given string s without the provided leading prefix string. If s doesn't start with prefix, s is returned unchanged. -categories: [functions] -menu: - docs: - parent: functions -keywords: [strings] -signature: ["strings.TrimPrefix PREFIX STRING"] -relatedfuncs: [strings.TrimSuffix] ---- - -Given the string `"aabbaa"`, the specified prefix is only removed if `"aabbaa"` starts with it: - - {{ strings.TrimPrefix "a" "aabbaa" }} → "abbaa" - {{ strings.TrimPrefix "aa" "aabbaa" }} → "bbaa" - {{ strings.TrimPrefix "aaa" "aabbaa" }} → "aabbaa" diff --git a/content/en/functions/strings.TrimRight.md b/content/en/functions/strings.TrimRight.md deleted file mode 100644 index e61b884cd..000000000 --- a/content/en/functions/strings.TrimRight.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: strings.TrimRight -description: Returns a slice of a given string with all trailing characters contained in the cutset removed. -categories: [functions] -menu: - docs: - parent: functions -keywords: [strings] -signature: ["strings.TrimRight CUTSET STRING"] -relatedfuncs: [strings.TrimRight] ---- - -Given the string `"abba"`, trailing `"a"`'s can be removed a follows: - - {{ strings.TrimRight "a" "abba" }} → "abb" - -Numbers can be handled as well: - - {{ strings.TrimRight 12 1221341221 }} → "122134" diff --git a/content/en/functions/strings.TrimSuffix.md b/content/en/functions/strings.TrimSuffix.md deleted file mode 100644 index 05bb92400..000000000 --- a/content/en/functions/strings.TrimSuffix.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: strings.TrimSuffix -description: Returns a given string s without the provided trailing suffix string. If s doesn't end with suffix, s is returned unchanged. -categories: [functions] -menu: - docs: - parent: functions -keywords: [strings] -signature: ["strings.TrimSuffix SUFFIX STRING"] -relatedfuncs: [strings.TrimPrefix] ---- - -Given the string `"aabbaa"`, the specified suffix is only removed if `"aabbaa"` ends with it: - - {{ strings.TrimSuffix "a" "aabbaa" }} → "aabba" - {{ strings.TrimSuffix "aa" "aabbaa" }} → "aabb" - {{ strings.TrimSuffix "aaa" "aabbaa" }} → "aabbaa" diff --git a/content/en/functions/strings/Chomp.md b/content/en/functions/strings/Chomp.md new file mode 100644 index 000000000..22e2b546b --- /dev/null +++ b/content/en/functions/strings/Chomp.md @@ -0,0 +1,31 @@ +--- +title: chomp +linkTitle: chomp +description: Removes any trailing newline characters. +categories: [functions] +keywords: [] +menu: + docs: + parent: functions +function: + aliases: [chomp] + returnType: any + signatures: [strings.Chomp STRING] +relatedFunctions: + - strings.Chomp + - strings.Trim + - strings.TrimLeft + - strings.TrimPrefix + - strings.TrimRight + - strings.TrimSuffix +aliases: [/functions/chomp] +--- + +If the argument is of type template.HTML, returns template.HTML, else returns a string. + + +Useful in a pipeline to remove newlines added by other processing (e.g., [`markdownify`](/functions/transform/markdownify)). + +```go-html-template +{{ chomp "

Blockhead

\n" }} → "

Blockhead

" +``` diff --git a/content/en/functions/strings/Contains.md b/content/en/functions/strings/Contains.md new file mode 100644 index 000000000..66a90aeea --- /dev/null +++ b/content/en/functions/strings/Contains.md @@ -0,0 +1,29 @@ +--- +title: strings.Contains +description: Reports whether the string contains a substring. +categories: [functions] +keywords: [] +menu: + docs: + parent: functions +function: + aliases: [] + returnType: bool + signatures: [strings.Contains STRING SUBSTRING] +relatedFunctions: + - strings.Contains + - strings.ContainsAny + - strings.ContainsNonSpace + - strings.HasPrefix + - strings.HasSuffix +aliases: [/functions/strings.contains] +--- + +```go-html-template +{{ strings.Contains "Hugo" "go" }} → true +``` +The check is case sensitive: + +```go-html-template +{{ strings.Contains "Hugo" "Go" }} → false +``` diff --git a/content/en/functions/strings/ContainsAny.md b/content/en/functions/strings/ContainsAny.md new file mode 100644 index 000000000..4f324358a --- /dev/null +++ b/content/en/functions/strings/ContainsAny.md @@ -0,0 +1,30 @@ +--- +title: strings.ContainsAny +description: Reports whether a string contains any character from a given string. +categories: [functions] +keywords: [] +menu: + docs: + parent: functions +function: + aliases: [] + returnType: bool + signatures: [strings.ContainsAny STRING CHARACTERS] +relatedFunctions: + - strings.Contains + - strings.ContainsAny + - strings.ContainsNonSpace + - strings.HasPrefix + - strings.HasSuffix +aliases: [/functions/strings.containsany] +--- + +```go-html-template +{{ strings.ContainsAny "Hugo" "gm" }} → true +``` + +The check is case sensitive: + +```go-html-template +{{ strings.ContainsAny "Hugo" "Gm" }} → false +``` diff --git a/content/en/functions/strings.ContainsNonSpace.md b/content/en/functions/strings/ContainsNonSpace.md similarity index 68% rename from content/en/functions/strings.ContainsNonSpace.md rename to content/en/functions/strings/ContainsNonSpace.md index eafe292f5..d2e6114b3 100644 --- a/content/en/functions/strings.ContainsNonSpace.md +++ b/content/en/functions/strings/ContainsNonSpace.md @@ -2,12 +2,21 @@ title: strings.ContainsNonSpace description: Reports whether a string contains any non-space characters as defined by Unicode’s White Space property. categories: [functions] +keywords: [] menu: docs: parent: functions -keywords: [whitespace space] -signature: ["strings.ContainsNonSpace STRING"] -relatedfuncs: ["strings.Contains","strings.ContainsAny"] +function: + aliases: [] + returnType: bool + signatures: [strings.ContainsNonSpace STRING] +relatedFunctions: + - strings.Contains + - strings.ContainsAny + - strings.ContainsNonSpace + - strings.HasPrefix + - strings.HasSuffix +aliases: [/functions/strings.containsnonspace] --- ```go-html-template diff --git a/content/en/functions/strings/Count.md b/content/en/functions/strings/Count.md new file mode 100644 index 000000000..25ea58967 --- /dev/null +++ b/content/en/functions/strings/Count.md @@ -0,0 +1,29 @@ +--- +title: strings.Count +description: Returns the number of non-overlapping instances of a substring within a string. +categories: [functions] +keywords: [] +menu: + docs: + parent: functions +function: + aliases: [] + returnType: int + signatures: [strings.Count SUBSTR STRING] +relatedFunctions: + - len + - strings.Count + - strings.CountRunes + - strings.CountWords + - strings.RuneCount +aliases: [/functions/strings.count] +--- + +If `SUBSTR` is an empty string, this function returns 1 plus the number of Unicode code points in `STRING`. + +```go-html-template +{{ "aaabaab" | strings.Count "a" }} → 5 +{{ "aaabaab" | strings.Count "aa" }} → 2 +{{ "aaabaab" | strings.Count "aaa" }} → 1 +{{ "aaabaab" | strings.Count "" }} → 8 +``` diff --git a/content/en/functions/strings/CountRunes.md b/content/en/functions/strings/CountRunes.md new file mode 100644 index 000000000..4a17d04ab --- /dev/null +++ b/content/en/functions/strings/CountRunes.md @@ -0,0 +1,29 @@ +--- +title: strings.CountRunes +linkTitle: countrunes +description: Returns the number of runes in a string excluding whitespace. +categories: [functions] +keywords: [] +menu: + docs: + parent: functions +function: + aliases: [countrunes] + returnType: int + signatures: [strings.CountRunes INPUT] +relatedFunctions: + - len + - strings.Count + - strings.CountRunes + - strings.CountWords + - strings.RuneCount +aliases: [/functions/countrunes] +--- + +In contrast with the [`strings.RuneCount`] function, which counts every rune in a string, `strings.CountRunes` excludes whitespace. + +```go-html-template +{{ "Hello, 世界" | strings.CountRunes }} → 8 +``` + +[`strings.RuneCount`]: /functions/strings/runecount diff --git a/content/en/functions/countwords.md b/content/en/functions/strings/CountWords.md similarity index 54% rename from content/en/functions/countwords.md rename to content/en/functions/strings/CountWords.md index 33dcbcaef..e6915e6cd 100644 --- a/content/en/functions/countwords.md +++ b/content/en/functions/strings/CountWords.md @@ -1,13 +1,23 @@ --- -title: countwords +title: strings.CountWords +linkTitle: countwords description: Counts the number of words in a string. categories: [functions] +keywords: [] menu: docs: parent: functions -keywords: [counting, word count] -signature: ["countwords INPUT"] -relatedfuncs: [countrunes] +function: + aliases: [countwords] + returnType: int + signatures: [strings.CountWords INPUT] +relatedFunctions: + - len + - strings.Count + - strings.CountRunes + - strings.CountWords + - strings.RuneCount +aliases: [/functions/countwords] --- The template function works similar to the [.WordCount page variable][pagevars]. diff --git a/content/en/functions/findresubmatch.md b/content/en/functions/strings/FindRESubmatch.md similarity index 82% rename from content/en/functions/findresubmatch.md rename to content/en/functions/strings/FindRESubmatch.md index f51ccdb97..5a0410fdb 100644 --- a/content/en/functions/findresubmatch.md +++ b/content/en/functions/strings/FindRESubmatch.md @@ -1,20 +1,27 @@ --- -title: findRESubmatch +title: strings.FindRESubmatch +linkTitle: findRESubmatch description: Returns a slice of all successive matches of the regular expression. Each element is a slice of strings holding the text of the leftmost match of the regular expression and the matches, if any, of its subexpressions. categories: [functions] +keywords: [] menu: docs: parent: functions -keywords: [regex] -signature: - - "findRESubmatch PATTERN INPUT [LIMIT]" - - "strings.FindRESubmatch PATTERN INPUT [LIMIT]" -relatedfuncs: [findRE, replaceRE] +function: + aliases: [findRESubmatch] + returnType: '[]string' + signatures: ['strings.FindRESubmatch PATTERN INPUT [LIMIT]'] +relatedFunctions: + - strings.FindRE + - strings.FindRESubmatch + - strings.Replace + - strings.ReplaceRE +aliases: [/functions/findresubmatch] --- By default, `findRESubmatch` finds all matches. You can limit the number of matches with an optional LIMIT argument. A return value of nil indicates no match. -{{% readfile file="/functions/common/regular-expressions.md" %}} +{{% readfile file="/functions/_common/regular-expressions.md" %}} ## Demonstrative examples diff --git a/content/en/functions/findRe.md b/content/en/functions/strings/FindRe.md similarity index 69% rename from content/en/functions/findRe.md rename to content/en/functions/strings/FindRe.md index 104db0f27..4a7811f3d 100644 --- a/content/en/functions/findRe.md +++ b/content/en/functions/strings/FindRe.md @@ -1,19 +1,26 @@ --- -title: findRE +title: strings.FindRE +linkTitle: findRE description: Returns a slice of strings that match the regular expression. categories: [functions] +keywords: [] menu: docs: parent: functions -keywords: [regex] -signature: - - "findRE PATTERN INPUT [LIMIT]" - - "strings.FindRE PATTERN INPUT [LIMIT]" -relatedfuncs: [findRESubmatch, replaceRE] +function: + aliases: [findRE] + returnType: string + signatures: ['strings.FindRE PATTERN INPUT [LIMIT]'] +relatedFunctions: + - strings.FindRE + - strings.FindRESubmatch + - strings.Replace + - strings.ReplaceRE +aliases: [/functions/findre] --- By default, `findRE` finds all matches. You can limit the number of matches with an optional LIMIT argument. -{{% readfile file="/functions/common/regular-expressions.md" %}} +{{% readfile file="/functions/_common/regular-expressions.md" %}} This example returns a slice of all second level headings (`h2` elements) within the rendered `.Content`: diff --git a/content/en/functions/strings/FirstUpper.md b/content/en/functions/strings/FirstUpper.md new file mode 100644 index 000000000..320f01eda --- /dev/null +++ b/content/en/functions/strings/FirstUpper.md @@ -0,0 +1,23 @@ +--- +title: strings.FirstUpper +description: Capitalizes the first character of a given string. +categories: [functions] +keywords: [] +menu: + docs: + parent: functions +function: + aliases: [] + returnType: string + signatures: [strings.FirstUpper STRING] +relatedFunctions: + - strings.FirstUpper + - strings.Title + - strings.ToLower + - strings.ToUpper +aliases: [/functions/strings.firstupper] +--- + +```go-html-template +{{ strings.FirstUpper "foo" }} → "Foo" +``` diff --git a/content/en/functions/strings/HasPrefix.md b/content/en/functions/strings/HasPrefix.md new file mode 100644 index 000000000..88a79a935 --- /dev/null +++ b/content/en/functions/strings/HasPrefix.md @@ -0,0 +1,24 @@ +--- +title: strings.HasPrefix +description: Reports whether a string begins with prefix. +categories: [functions] +keywords: [] +menu: + docs: + parent: functions +function: + aliases: [hasPrefix] + returnType: bool + signatures: [strings.HasPrefix STRING PREFIX] +relatedFunctions: + - strings.Contains + - strings.ContainsAny + - strings.ContainsNonSpace + - strings.HasPrefix + - strings.HasSuffix +aliases: [/functions/hasprefix,/functions/strings.hasprefix] +--- + +```go-html-template +{{ hasPrefix "Hugo" "Hu" }} → true +``` diff --git a/content/en/functions/strings/HasSuffix.md b/content/en/functions/strings/HasSuffix.md new file mode 100644 index 000000000..d11f3e8cf --- /dev/null +++ b/content/en/functions/strings/HasSuffix.md @@ -0,0 +1,24 @@ +--- +title: strings.HasSuffix +description: Reports whether a string ends with suffix. +categories: [functions] +keywords: [] +menu: + docs: + parent: functions +function: + aliases: [hasSuffix] + returnType: bool + signatures: [strings.HasSuffix STRING SUFFIX] +relatedFunctions: + - strings.Contains + - strings.ContainsAny + - strings.ContainsNonSpace + - strings.HasPrefix + - strings.HasSuffix +aliases: [/functions/hassuffix,/functions/strings/hassuffix] +--- + +```go-html-template +{{ hasSuffix "Hugo" "go" }} → true +``` diff --git a/content/en/functions/strings/Repeat.md b/content/en/functions/strings/Repeat.md new file mode 100644 index 000000000..718f24984 --- /dev/null +++ b/content/en/functions/strings/Repeat.md @@ -0,0 +1,20 @@ +--- +title: strings.Repeat +description: Returns a new string consisting of zero or more copies of another string. +categories: [functions] +keywords: [] +menu: + docs: + parent: functions +function: + aliases: [] + returnType: string + signatures: [strings.Repeat COUNT INPUT] +relatedFunctions: [] +aliases: [/functions/strings.repeat] +--- + +```go-html-template +{{ strings.Repeat 3 "yo" }} → "yoyoyo" +{{ "yo" | strings.Repeat 3 }} → "yoyoyo" +``` diff --git a/content/en/functions/replace.md b/content/en/functions/strings/Replace.md similarity index 53% rename from content/en/functions/replace.md rename to content/en/functions/strings/Replace.md index 4c150bfef..8d5e54859 100644 --- a/content/en/functions/replace.md +++ b/content/en/functions/strings/Replace.md @@ -1,22 +1,29 @@ --- -title: replace +title: strings.Replace +linkTitle: replace description: Replaces all occurrences of the search string with the replacement string. categories: [functions] +keywords: [] menu: docs: parent: functions -keywords: [replace] -signature: - - "replace INPUT OLD NEW [LIMIT]" - - "strings.Replace INPUT OLD NEW [LIMIT]" -relatedfuncs: [replaceRE] +function: + aliases: [replace] + returnType: string + signatures: ['strings.Replace INPUT OLD NEW [LIMIT]'] +relatedFunctions: + - strings.FindRE + - strings.FindRESubmatch + - strings.Replace + - strings.ReplaceRE +aliases: [/functions/replace] --- Replace returns a copy of `INPUT` with all occurrences of `OLD` replaced with `NEW`. The number of replacements can be limited with an optional `LIMIT` argument. ``` -`{{ replace "Batman and Robin" "Robin" "Catwoman" }}` +{{ replace "Batman and Robin" "Robin" "Catwoman" }} → "Batman and Catwoman" {{ replace "aabbaabb" "a" "z" 2 }} → "zzbbaabb" diff --git a/content/en/functions/replacere.md b/content/en/functions/strings/ReplaceRE.md similarity index 74% rename from content/en/functions/replacere.md rename to content/en/functions/strings/ReplaceRE.md index 4dba19bfe..247595877 100644 --- a/content/en/functions/replacere.md +++ b/content/en/functions/strings/ReplaceRE.md @@ -1,19 +1,26 @@ --- -title: replaceRE +title: strings.ReplaceRE +linkTitle: replaceRE description: Returns a string, replacing all occurrences of a regular expression with a replacement pattern. categories: [functions] +keywords: [] menu: docs: parent: functions -keywords: [regex] -signature: - - "replaceRE PATTERN REPLACEMENT INPUT [LIMIT]" - - "strings.ReplaceRE PATTERN REPLACEMENT INPUT [LIMIT]" -relatedfuncs: [findRE, FindRESubmatch, replace] +function: + aliases: [replaceRE] + returnType: string + signatures: ['strings.ReplaceRE PATTERN REPLACEMENT INPUT [LIMIT]'] +relatedFunctions: + - strings.FindRE + - strings.FindRESubmatch + - strings.Replace + - strings.ReplaceRE +aliases: [/functions/replacere] --- By default, `replaceRE` replaces all matches. You can limit the number of matches with an optional LIMIT argument. -{{% readfile file="/functions/common/regular-expressions.md" %}} +{{% readfile file="/functions/_common/regular-expressions.md" %}} This example replaces two or more consecutive hyphens with a single hyphen: diff --git a/content/en/functions/strings/RuneCount.md b/content/en/functions/strings/RuneCount.md new file mode 100644 index 000000000..a4d5a8dbe --- /dev/null +++ b/content/en/functions/strings/RuneCount.md @@ -0,0 +1,28 @@ +--- +title: strings.RuneCount +description: Returns the number of runes in a string. +categories: [functions] +keywords: [] +menu: + docs: + parent: functions +function: + aliases: [] + returnType: int + signatures: [strings.RuneCount INPUT] +relatedFunctions: + - len + - strings.Count + - strings.CountRunes + - strings.CountWords + - strings.RuneCount +aliases: [/functions/strings.runecount] +--- + +In contrast with the [`strings.CountRunes`] function, which excludes whitespace, `strings.RuneCount` counts every rune in a string. + +```go-html-template +{{ "Hello, 世界" | strings.RuneCount }} → 9 +``` + +[`strings.CountRunes`]: /functions/strings/countrunes diff --git a/content/en/functions/strings/SliceString.md b/content/en/functions/strings/SliceString.md new file mode 100644 index 000000000..8d26d76e4 --- /dev/null +++ b/content/en/functions/strings/SliceString.md @@ -0,0 +1,24 @@ +--- +title: strings.SliceString +linkTitle: slicestr +description: Creates a slice of a half-open range, including start and end indices. +categories: [functions] +keywords: [] +menu: + docs: + parent: functions +function: + aliases: [slicestr] + returnType: string + signatures: ['strings.SliceString STRING START [END]'] +relatedFunctions: [] +aliases: [/functions/slicestr] +--- + +For example, 1 and 4 creates a slice including elements 1 through 3. +The `end` index can be omitted; it defaults to the string's length. + +```go-html-template +{{ slicestr "BatMan" 3 }}` → "Man" +{{ slicestr "BatMan" 0 3 }}` → "Bat" +``` diff --git a/content/en/functions/strings/Split.md b/content/en/functions/strings/Split.md new file mode 100644 index 000000000..7d15704b2 --- /dev/null +++ b/content/en/functions/strings/Split.md @@ -0,0 +1,30 @@ +--- +title: strings.Split +linkTitle: split +description: Returns a slice of strings by splitting STRING by DELIM. +categories: [functions] +keywords: [] +menu: + docs: + parent: functions +function: + aliases: [split] + returnType: string + signatures: [strings.Split STRING DELIM] +relatedFunctions: + - collections.Delimit + - strings.Split +aliases: [/functions/split] +--- + +Examples: + +```go-html-template +{{ split "tag1,tag2,tag3" "," }} → ["tag1", "tag2", "tag3"] +{{ split "abc" "" }} → ["a", "b", "c"] +``` + + +{{% note %}} +`split` essentially does the opposite of [delimit](/functions/collections/delimit). While `split` creates a slice from a string, `delimit` creates a string from a slice. +{{% /note %}} diff --git a/content/en/functions/substr.md b/content/en/functions/strings/Substr.md similarity index 83% rename from content/en/functions/substr.md rename to content/en/functions/strings/Substr.md index 90ee47b55..9dafa0737 100644 --- a/content/en/functions/substr.md +++ b/content/en/functions/strings/Substr.md @@ -1,15 +1,18 @@ --- -title: substr +title: strings.Substr +linkTitle: substr description: Extracts parts of a string from a specified character's position and returns the specified number of characters. categories: [functions] +keywords: [] menu: docs: parent: functions -keywords: [strings] -signature: - - "substr STRING START [LENGTH]" - - "strings.Substr STRING START [LENGTH]" -relatedfuncs: [] +function: + aliases: [substr] + returnType: string + signatures: ['strings.Substr STRING START [LENGTH]'] +relatedFunctions: [] +aliases: [/functions/substr] --- It normally takes two argument: `start` and `length`. It can also take one argument: `start`, i.e. `length` is omitted, in which case the substring starting from start until the end of the string will be returned. diff --git a/content/en/functions/title.md b/content/en/functions/strings/Title.md similarity index 71% rename from content/en/functions/title.md rename to content/en/functions/strings/Title.md index d8e0f73a4..1e20d1f59 100644 --- a/content/en/functions/title.md +++ b/content/en/functions/strings/Title.md @@ -1,15 +1,22 @@ --- -title: title +title: strings.Title +linkTitle: title description: Converts the provided string to title case. categories: [functions] +keywords: [] menu: docs: parent: functions -keywords: [strings] -signature: - - "title STRING" - - "strings.Title STRING" -relatedfuncs: [] +function: + aliases: [title] + returnType: string + signatures: [strings.Title STRING] +relatedFunctions: + - strings.FirstUpper + - strings.Title + - strings.ToLower + - strings.ToUpper +aliases: [/functions/title] --- ```go-html-template diff --git a/content/en/functions/lower.md b/content/en/functions/strings/ToLower.md similarity index 53% rename from content/en/functions/lower.md rename to content/en/functions/strings/ToLower.md index 9accf999e..cb76462ea 100644 --- a/content/en/functions/lower.md +++ b/content/en/functions/strings/ToLower.md @@ -1,15 +1,22 @@ --- -title: lower +title: strings.ToLower +linkTitle: lower description: Converts all characters in the provided string to lowercase. categories: [functions] +keywords: [] menu: docs: parent: functions -keywords: [strings,casing] -signature: - - "lower INPUT" - - "strings.ToLower INPUT" -relatedfuncs: [] +function: + aliases: [lower] + returnType: string + signatures: [strings.ToLower INPUT] +relatedFunctions: + - strings.FirstUpper + - strings.Title + - strings.ToLower + - strings.ToUpper +aliases: [/functions/lower] --- diff --git a/content/en/functions/upper.md b/content/en/functions/strings/ToUpper.md similarity index 55% rename from content/en/functions/upper.md rename to content/en/functions/strings/ToUpper.md index e11065f79..d46491637 100644 --- a/content/en/functions/upper.md +++ b/content/en/functions/strings/ToUpper.md @@ -1,16 +1,22 @@ --- -title: upper +title: strings.ToUpper +linkTitle: upper description: Converts all characters in a string to uppercase -keywords: [] categories: [functions] +keywords: [] menu: docs: parent: functions -toc: -signature: - - "upper INPUT" - - "strings.ToUpper INPUT" -relatedfuncs: [] +function: + aliases: [upper] + returnType: string + signatures: [strings.ToUpper INPUT] +relatedFunctions: + - strings.FirstUpper + - strings.Title + - strings.ToLower + - strings.ToUpper +aliases: [/functions/upper] --- Note that `upper` can be applied in your templates in more than one way: diff --git a/content/en/functions/trim.md b/content/en/functions/strings/Trim.md similarity index 75% rename from content/en/functions/trim.md rename to content/en/functions/strings/Trim.md index 3d664abea..9eae9ee45 100644 --- a/content/en/functions/trim.md +++ b/content/en/functions/strings/Trim.md @@ -1,15 +1,24 @@ --- -title: trim +title: strings.Trim +linkTitle: trim description: Returns a slice of a passed string with all leading and trailing characters from cutset removed. categories: [functions] +keywords: [] menu: docs: parent: functions -keywords: [strings] -signature: - - "trim INPUT CUTSET" - - "strings.Trim INPUT CUTSET" -relatedfuncs: [] +function: + aliases: [title] + returnType: string + signatures: [strings.Trim INPUT CUTSET] +relatedFunctions: + - strings.Chomp + - strings.Trim + - strings.TrimLeft + - strings.TrimPrefix + - strings.TrimRight + - strings.TrimSuffix +aliases: [/functions/trim] --- ```go-html-template diff --git a/content/en/functions/strings/TrimLeft.md b/content/en/functions/strings/TrimLeft.md new file mode 100644 index 000000000..3924e492f --- /dev/null +++ b/content/en/functions/strings/TrimLeft.md @@ -0,0 +1,33 @@ +--- +title: strings.TrimLeft +description: Returns a slice of a given string with all leading characters contained in the cutset removed. +categories: [functions] +keywords: [] +menu: + docs: + parent: functions +function: + aliases: [] + returnType: string + signatures: [strings.TrimLeft CUTSET STRING] +relatedFunctions: + - strings.Chomp + - strings.Trim + - strings.TrimLeft + - strings.TrimPrefix + - strings.TrimRight + - strings.TrimSuffix +aliases: [/functions/strings.trimleft] +--- + +Given the string `"abba"`, leading `"a"`'s can be removed a follows: + +```go-html-template +{{ strings.TrimLeft "a" "abba" }} → "bba" +``` + +Numbers can be handled as well: + +```go-html-template +{{ strings.TrimLeft 12 1221341221 }} → "341221" +``` diff --git a/content/en/functions/strings/TrimPrefix.md b/content/en/functions/strings/TrimPrefix.md new file mode 100644 index 000000000..37657732d --- /dev/null +++ b/content/en/functions/strings/TrimPrefix.md @@ -0,0 +1,29 @@ +--- +title: strings.TrimPrefix +description: Returns a given string s without the provided leading prefix string. If s doesn't start with prefix, s is returned unchanged. +categories: [functions] +keywords: [] +menu: + docs: + parent: functions +function: + aliases: [] + returnType: string + signatures: [strings.TrimPrefix PREFIX STRING] +relatedFunctions: + - strings.Chomp + - strings.Trim + - strings.TrimLeft + - strings.TrimPrefix + - strings.TrimRight + - strings.TrimSuffix +aliases: [/functions/strings.trimprefix] +--- + +Given the string `"aabbaa"`, the specified prefix is only removed if `"aabbaa"` starts with it: + +```go-html-template +{{ strings.TrimPrefix "a" "aabbaa" }} → "abbaa" +{{ strings.TrimPrefix "aa" "aabbaa" }} → "bbaa" +{{ strings.TrimPrefix "aaa" "aabbaa" }} → "aabbaa" +``` diff --git a/content/en/functions/strings/TrimRight.md b/content/en/functions/strings/TrimRight.md new file mode 100644 index 000000000..fa538b605 --- /dev/null +++ b/content/en/functions/strings/TrimRight.md @@ -0,0 +1,33 @@ +--- +title: strings.TrimRight +description: Returns a slice of a given string with all trailing characters contained in the cutset removed. +categories: [functions] +keywords: [] +menu: + docs: + parent: functions +function: + aliases: [] + returnType: string + signatures: [strings.TrimRight CUTSET STRING] +relatedFunctions: + - strings.Chomp + - strings.Trim + - strings.TrimLeft + - strings.TrimPrefix + - strings.TrimRight + - strings.TrimSuffix +aliases: [/functions/strings.trimright] +--- + +Given the string `"abba"`, trailing `"a"`'s can be removed a follows: + +```go-html-template +{{ strings.TrimRight "a" "abba" }} → "abb" +``` + +Numbers can be handled as well: + +```go-html-template +{{ strings.TrimRight 12 1221341221 }} → "122134" +``` diff --git a/content/en/functions/strings/TrimSuffix.md b/content/en/functions/strings/TrimSuffix.md new file mode 100644 index 000000000..6dc9becfc --- /dev/null +++ b/content/en/functions/strings/TrimSuffix.md @@ -0,0 +1,29 @@ +--- +title: strings.TrimSuffix +description: Returns a given string s without the provided trailing suffix string. If s doesn't end with suffix, s is returned unchanged. +categories: [functions] +keywords: [] +menu: + docs: + parent: functions +function: + aliases: [] + returnType: string + signatures: [strings.TrimSuffix SUFFIX STRING] +relatedFunctions: + - strings.Chomp + - strings.Trim + - strings.TrimLeft + - strings.TrimPrefix + - strings.TrimRight + - strings.TrimSuffix +aliases: [/functions/strings.trimsuffix] +--- + +Given the string `"aabbaa"`, the specified suffix is only removed if `"aabbaa"` ends with it: + +```go-html-template +{{ strings.TrimSuffix "a" "aabbaa" }} → "aabba" +{{ strings.TrimSuffix "aa" "aabbaa" }} → "aabb" +{{ strings.TrimSuffix "aaa" "aabbaa" }} → "aabbaa" +``` diff --git a/content/en/functions/strings/Truncate.md b/content/en/functions/strings/Truncate.md new file mode 100644 index 000000000..0bd78d840 --- /dev/null +++ b/content/en/functions/strings/Truncate.md @@ -0,0 +1,26 @@ +--- +title: strings.Truncate +linkTitle: truncate +description: Truncates a text to a max length without cutting words or leaving unclosed HTML tags. +categories: [functions] +keywords: [] +menu: + docs: + parent: functions +function: + aliases: [truncate] + returnType: template.HTML + signatures: ['strings.Truncate SIZE [ELLIPSIS] INPUT'] +relatedFunctions: [] +aliases: [/functions/truncate] +--- + +Since Go templates are HTML-aware, `truncate` will intelligently handle normal strings vs HTML strings: + +```go-html-template +{{ "Keep my HTML" | safeHTML | truncate 10 }} → Keep my … +``` + +{{% note %}} +If you have a raw string that contains HTML tags you want to remain treated as HTML, you will need to convert the string to HTML using the [`safeHTML` template function](/functions/safe/html) before sending the value to truncate. Otherwise, the HTML tags will be escaped when passed through the `truncate` function. +{{% /note %}} diff --git a/content/en/functions/symdiff.md b/content/en/functions/symdiff.md deleted file mode 100644 index ffc309418..000000000 --- a/content/en/functions/symdiff.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: symdiff -description: "`collections.SymDiff` (alias `symdiff`) returns the symmetric difference of two collections." -categories: [functions] -menu: - docs: - parent: functions -keywords: [collections,intersect,union,complement] -signature: ["COLLECTION | symdiff COLLECTION" ] ---- - -Example: - -```go-html-template -{{ slice 1 2 3 | symdiff (slice 3 4) }} -``` - -The above will print `[1 2 4]`. - -Also see https://en.wikipedia.org/wiki/Symmetric_difference diff --git a/content/en/functions/templates.Exists.md b/content/en/functions/templates/Exists.md similarity index 69% rename from content/en/functions/templates.Exists.md rename to content/en/functions/templates/Exists.md index b9f340c21..d4a8fab76 100644 --- a/content/en/functions/templates.Exists.md +++ b/content/en/functions/templates/Exists.md @@ -1,15 +1,18 @@ --- title: templates.Exists -description: "Checks whether a template file exists under the given path relative to the `layouts` directory." +description: Reports whether a template file exists under the given path relative to the `layouts` directory. categories: [functions] -tags: [] +keywords: [] menu: docs: parent: functions -ns: "" -keywords: ["templates", "template", "layouts"] -signature: ["templates.Exists PATH"] -relatedfuncs: [] +function: + aliases: [] + returnType: bool + signatures: [templates.Exists PATH] +namespace: templates +relatedFunctions: [] +aliases: [/functions/templates.exists] --- A template file is any file living below the `layouts` directories of either the project or any of its theme components including partials and shortcodes. diff --git a/content/en/functions/time.md b/content/en/functions/time/AsTime.md similarity index 85% rename from content/en/functions/time.md rename to content/en/functions/time/AsTime.md index 99182f317..1244eeb5c 100644 --- a/content/en/functions/time.md +++ b/content/en/functions/time/AsTime.md @@ -1,13 +1,23 @@ --- -title: time +title: time.AsTime +linkTitle: time description: Converts a timestamp string into a `time.Time` structure. categories: [functions] +keywords: [] menu: docs: parent: functions -keywords: [dates,time,location] -signature: ["time INPUT [TIMEZONE]"] -relatedfuncs: [] +function: + aliases: [time] + returnType: time.Time + signatures: ['time.AsTime INPUT [TIMEZONE]'] +relatedFunctions: + - time.AsTime + - time.Duration + - time.Format + - time.Now + - time.ParseDuration +aliases: [/functions/time] --- @@ -49,6 +59,6 @@ The following example may be useful when setting up [multilingual sites][multili {{< /code >}} -[int]: /functions/int/ +[int]: /functions/cast/toint [multilingual]: /content-management/multilingual/ -[`printf`]: /functions/printf/ +[`printf`]: /functions/fmt/printf diff --git a/content/en/functions/duration.md b/content/en/functions/time/Duration.md similarity index 58% rename from content/en/functions/duration.md rename to content/en/functions/time/Duration.md index 4dc365ae5..921f25a96 100644 --- a/content/en/functions/duration.md +++ b/content/en/functions/time/Duration.md @@ -1,23 +1,38 @@ --- -title: duration +title: time.Duration +linkTitle: duration description: Returns a `time.Duration` structure, using the given time unit and duration number. categories: [functions] +keywords: [] menu: docs: parent: functions -keywords: [time duration] -signature: ["duration TIME_UNIT DURATION_NUMBER"] +function: + aliases: [duration] + returnType: time.Duration + signatures: [time.Duration TIME_UNIT DURATION_NUMBER] +relatedFunctions: + - time.AsTime + - time.Duration + - time.Format + - time.Now + - time.ParseDuration +aliases: [/functions/duration] --- `time.Duration` converts a given number into a [`time.Duration`](https://pkg.go.dev/time#Duration) structure so you can access its fields. E.g. you can perform [time operations](https://pkg.go.dev/time#Duration) on the returned `time.Duration` value: - {{ printf "There are %.0f seconds in one day." (duration "hour" 24).Seconds }} - +```go-html-template +{{ printf "There are %.0f seconds in one day." (duration "hour" 24).Seconds }} + +``` Make your code simpler to understand by using a [chained pipeline](https://pkg.go.dev/text/template#hdr-Pipelines): - {{ mul 7.75 60 | duration "minute" }} → 7h45m0s - {{ mul 120 60 | mul 1000 | duration "millisecond" }} → 2h0m0s +```go-html-template +{{ mul 7.75 60 | duration "minute" }} → 7h45m0s +{{ mul 120 60 | mul 1000 | duration "millisecond" }} → 2h0m0s +``` You have to specify a time unit for the number given to the function. Valid time units are: diff --git a/content/en/functions/time/Format.md b/content/en/functions/time/Format.md new file mode 100644 index 000000000..3a0b1eb2a --- /dev/null +++ b/content/en/functions/time/Format.md @@ -0,0 +1,76 @@ +--- +title: time.Format +description: Returns a formatted and localized time.Time value. +categories: [functions] +keywords: [] +menu: + docs: + parent: functions +function: + aliases: [dateFormat] + returnType: string + signatures: [time.Format LAYOUT INPUT] +relatedFunctions: + - time.AsTime + - time.Duration + - time.Format + - time.Now + - time.ParseDuration +aliases: [/functions/dateformat] +toc: true +--- + +```go-template +{{ $t := "2023-01-27T23:44:58-08:00" }} +{{ $format := "2 Jan 2006" }} + +{{ $t | time.Format $format }} → 27 Jan 2023 + +{{ $t = time.AsTime $t }} +{{ $t | time.Format $format }} → 27 Jan 2023 +``` + +## Layout string + +{{% readfile file="/functions/_common/time-layout-string.md" %}} + +## Localization + +Use the `time.Format` function to localize `time.Time` values for the current language and region. + +{{% note %}} +{{% readfile file="/functions/_common/locales.md" %}} +{{% /note %}} + + +Use the layout string as described above, or one of the tokens below. For example: + +```go-template +{{ .Date | time.Format ":date_medium" }} → Jan 27, 2023 +``` + +Localized to en-US: + +Token|Result +:--|:-- +`:date_full`|`Friday, January 27, 2023` +`:date_long`|`January 27, 2023` +`:date_medium`|`Jan 27, 2023` +`:date_short`|`1/27/23` +`:time_full`|`11:44:58 pm Pacific Standard Time` +`:time_long`|`11:44:58 pm PST` +`:time_medium`|`11:44:58 pm` +`:time_short`|`11:44 pm` + +Localized to de-DE: + +Token|Result +:--|:-- +`:date_full`|`Freitag, 27. Januar 2023` +`:date_long`|`27. Januar 2023` +`:date_medium`|`27.01.2023` +`:date_short`|`27.01.23` +`:time_full`|`23:44:58 Nordamerikanische Westküsten-Normalzeit` +`:time_long`|`23:44:58 PST` +`:time_medium`|`23:44:58` +`:time_short`|`23:44` diff --git a/content/en/functions/now.md b/content/en/functions/time/Now.md similarity index 79% rename from content/en/functions/now.md rename to content/en/functions/time/Now.md index 68d628f11..74b01ecc5 100644 --- a/content/en/functions/now.md +++ b/content/en/functions/time/Now.md @@ -1,13 +1,23 @@ --- -title: now +title: time.Now +linkTitle: now description: Returns the current local time categories: [functions] +keywords: [] menu: docs: parent: functions -keywords: [dates,time] -signature: ["now"] -relatedfuncs: [Unix,dateFormat] +function: + aliases: [now] + returnType: time.Time + signatures: [time.Now] +relatedFunctions: + - time.AsTime + - time.Duration + - time.Format + - time.Now + - time.ParseDuration +aliases: [/functions/now] --- See [`time.Time`](https://godoc.org/time#Time). diff --git a/content/en/functions/time.ParseDuration.md b/content/en/functions/time/ParseDuration.md similarity index 60% rename from content/en/functions/time.ParseDuration.md rename to content/en/functions/time/ParseDuration.md index 0332c1706..e3abc7c15 100644 --- a/content/en/functions/time.ParseDuration.md +++ b/content/en/functions/time/ParseDuration.md @@ -2,11 +2,21 @@ title: time.ParseDuration description: Parses a given duration string into a `time.Duration` structure. categories: [functions] +keywords: [] menu: docs: parent: functions -keywords: [time parse duration] -signature: ["time.ParseDuration DURATION"] +function: + aliases: [] + returnType: time.Duration + signatures: [time.ParseDuration DURATION] +relatedFunctions: + - time.AsTime + - time.Duration + - time.Format + - time.Now + - time.ParseDuration +aliases: [/functions/time.parseduration] --- `time.ParseDuration` parses a duration string into a [`time.Duration`](https://pkg.go.dev/time#Duration) structure so you can access its fields. @@ -14,5 +24,7 @@ A duration string is a possibly signed sequence of decimal numbers, each with op You can perform [time operations](https://pkg.go.dev/time#Duration) on the returned `time.Duration` value: - {{ printf "There are %.0f seconds in one day." (time.ParseDuration "24h").Seconds }} - +```go-html-template +{{ printf "There are %.0f seconds in one day." (time.ParseDuration "24h").Seconds }} + +``` diff --git a/content/en/functions/transform/CanHighlight.md b/content/en/functions/transform/CanHighlight.md new file mode 100644 index 000000000..eabef933b --- /dev/null +++ b/content/en/functions/transform/CanHighlight.md @@ -0,0 +1,22 @@ +--- +title: transform.CanHighlight +description: Reports whether the given code language is supported by the Chroma highlighter. +categories: [functions] +keywords: [] +menu: + docs: + parent: functions +function: + aliases: [] + returnType: bool + signatures: [transform.CanHighlight LANGUAGE] +relatedFunctions: + - transform.CanHighlight + - transform.Highlight + - transform.HighlightCodeBlock +--- + +```go-html-template +{{ transform.CanHighlight "go" }} → true +{{ transform.CanHighlight "klingon" }} → false +``` diff --git a/content/en/functions/emojify.md b/content/en/functions/transform/Emojify.md similarity index 78% rename from content/en/functions/emojify.md rename to content/en/functions/transform/Emojify.md index beded710a..324c41851 100644 --- a/content/en/functions/emojify.md +++ b/content/en/functions/transform/Emojify.md @@ -1,13 +1,19 @@ --- -title: emojify +title: transform.Emojify +linkTitle: emojify description: Runs a string through the Emoji emoticons processor. categories: [functions] +keywords: [] menu: docs: parent: functions -keywords: [strings,emojis] -signature: ["emojify INPUT"] -relatedfuncs: [] +function: + aliases: [emojify] + returnType: template.HTML + signatures: [transform.Emojify INPUT] +namespace: transform +relatedFunctions: [] +aliases: [/functions/emojify] --- `emojify` runs a passed string through the Emoji emoticons processor. diff --git a/content/en/functions/htmlEscape.md b/content/en/functions/transform/HTMLEscape.md similarity index 57% rename from content/en/functions/htmlEscape.md rename to content/en/functions/transform/HTMLEscape.md index 0ee8fa4d2..62249367b 100644 --- a/content/en/functions/htmlEscape.md +++ b/content/en/functions/transform/HTMLEscape.md @@ -1,13 +1,20 @@ --- -title: htmlEscape +title: transform.HTMLEscape +linkTitle: htmlEscape description: Returns the given string with the reserved HTML codes escaped. categories: [functions] +keywords: [] menu: docs: parent: functions -keywords: [strings, html] -signature: ["htmlEscape INPUT"] -relatedfuncs: [htmlUnescape] +function: + aliases: [htmlEscape] + returnType: string + signatures: [transform.HTMLEscape INPUT] +relatedFunctions: + - transform.HTMLEscape + - transform.HTMLUnescape +aliases: [/functions/htmlescape] --- In the result `&` becomes `&` and so on. It escapes only: `<`, `>`, `&`, `'` and `"`. diff --git a/content/en/functions/htmlUnescape.md b/content/en/functions/transform/HTMLUnescape.md similarity index 62% rename from content/en/functions/htmlUnescape.md rename to content/en/functions/transform/HTMLUnescape.md index e4646b680..c0774232f 100644 --- a/content/en/functions/htmlUnescape.md +++ b/content/en/functions/transform/HTMLUnescape.md @@ -1,17 +1,22 @@ --- -title: htmlUnescape +title: transform.HTMLUnescape +linkTitle: htmlUnescape description: Returns the given string with HTML escape codes un-escaped. categories: [functions] +keywords: [] menu: docs: parent: functions -keywords: [] -signature: ["htmlUnescape INPUT"] -relatedfuncs: [htmlEscape] +function: + aliases: [htmlUnescape] + returnType: string + signatures: [transform.HTMLUnescape INPUT] +relatedFunctions: + - transform.HTMLEscape + - transform.HTMLUnescape +aliases: [/functions/htmlunescape] --- -`htmlUnescape` returns the given string with HTML escape codes un-escaped. - Remember to pass the output of this to `safeHTML` if fully un-escaped characters are desired. Otherwise, the output will be escaped again as normal. ```go-html-template diff --git a/content/en/functions/highlight.md b/content/en/functions/transform/Highlight.md similarity index 91% rename from content/en/functions/highlight.md rename to content/en/functions/transform/Highlight.md index f91c1f562..93043b4a1 100644 --- a/content/en/functions/highlight.md +++ b/content/en/functions/transform/Highlight.md @@ -1,15 +1,25 @@ --- -title: highlight +title: transform.Highlight +linkTitle: highlight description: Renders code with a syntax highlighter. categories: [functions] +keywords: [] menu: docs: parent: functions -keywords: [highlighting,code blocks,syntax] -signature: ["transform.Highlight INPUT LANG [OPTIONS]","highlight INPUT LANG [OPTIONS]"] -relatedfuncs: [] +function: + aliases: [highlight] + returnType: template.HTML + signatures: ['transform.Highlight INPUT LANG [OPTIONS]'] +namespace: transform +relatedFunctions: + - transform.CanHighlight + - transform.Highlight + - transform.HighlightCodeBlock +aliases: [/functions/highlight] toc: true --- + The `highlight` function uses the [Chroma] syntax highlighter, supporting over 200 languages with more than 40 available styles. ## Arguments diff --git a/content/en/functions/transform/HighlightCodeBlock.md b/content/en/functions/transform/HighlightCodeBlock.md new file mode 100644 index 000000000..fa7045641 --- /dev/null +++ b/content/en/functions/transform/HighlightCodeBlock.md @@ -0,0 +1,43 @@ +--- +title: transform.HighlightCodeBlock +description: Highlights code received in context within a code block render hook. +categories: [functions] +keywords: [] +menu: + docs: + parent: functions +function: + aliases: [] + returnType: highlight.HighlightResult + signatures: ['transform.HighlightCodeBlock CONTEXT [OPTIONS]'] +relatedFunctions: + - transform.CanHighlight + - transform.Highlight + - transform.HighlightCodeBlock +--- + +This function is only useful within a code block render hook. + +Given the context passed into a code block render hook, `transform.HighlightCodeBlock` returns a `HighlightResult` object with two methods. + +.Wrapped +: (`template.HTML`) Returns highlighted code wrapped in `
`, `
`, and `` elements. This is identical to the value returned by the transform.Highlight function.
+
+.Inner
+: (`template.HTML`) Returns highlighted code without any wrapping elements, allowing you to create your own wrapper.
+
+
+```go-html-template
+{{ $result := transform.HighlightCodeBlock . }}
+{{ $result.Wrapped }}
+```
+
+To override the default [highlighting options]:
+
+```go-html-template
+{{ $options := merge .Options (dict "linenos" true) }}
+{{ $result := transform.HighlightCodeBlock . $options }}
+{{ $result.Wrapped }}
+```
+
+[highlighting options]: /functions/transform/highlight/#options
diff --git a/content/en/functions/markdownify.md b/content/en/functions/transform/Markdownify.md
similarity index 80%
rename from content/en/functions/markdownify.md
rename to content/en/functions/transform/Markdownify.md
index 9f1f3329e..b0be902ce 100644
--- a/content/en/functions/markdownify.md
+++ b/content/en/functions/transform/Markdownify.md
@@ -1,13 +1,18 @@
 ---
-title: markdownify
+title: transform.Markdownify
+linkTitle: markdownify
 description: Renders markdown to HTML.
-keywords: [markdown,content]
 categories: [functions]
+keywords: []
 menu:
   docs:
     parent: functions
-signature: ["markdownify INPUT"]
-relatedfuncs: []
+function:
+  aliases: [markdownify]
+  returnType: template.HTML
+  signatures: [transform.Markdownify INPUT]
+relatedFunctions: []
+aliases: [/functions/markdownify]
 ---
 
 ```go-html-template
diff --git a/content/en/functions/plainify.md b/content/en/functions/transform/Plainify.md
similarity index 60%
rename from content/en/functions/plainify.md
rename to content/en/functions/transform/Plainify.md
index 8767a460e..163233d4a 100644
--- a/content/en/functions/plainify.md
+++ b/content/en/functions/transform/Plainify.md
@@ -1,13 +1,18 @@
 ---
-title: plainify
+title: transform.Plainify
+linkTitle: plainify
 description: Returns a string with all HTML tags removed.
 categories: [functions]
+keywords: []
 menu:
   docs:
     parent: functions
-keywords: [strings]
-signature: ["plainify INPUT"]
-relatedfuncs: [jsonify]
+function:
+  aliases: [plainify]
+  returnType: string
+  signatures: [transform.Plainify INPUT]
+relatedFunctions: []
+aliases: [/functions/plainify]
 ---
 
 ```go-html-template
diff --git a/content/en/functions/transform.Remarshal.md b/content/en/functions/transform/Remarshal.md
similarity index 88%
rename from content/en/functions/transform.Remarshal.md
rename to content/en/functions/transform/Remarshal.md
index e1605197f..8f6e58247 100644
--- a/content/en/functions/transform.Remarshal.md
+++ b/content/en/functions/transform/Remarshal.md
@@ -2,11 +2,19 @@
 title: transform.Remarshal
 description: Marshals a string of serialized data, or a map, into a string of serialized data in the specified format.
 categories: [functions]
+keywords: []
 menu:
   docs:
     parent: functions
-keywords: []
-signature: [ transform.Remarshal FORMAT INPUT ]
+function:
+  aliases: []
+  returnType: string
+  signatures: [transform.Remarshal FORMAT INPUT]
+relatedFunctions:
+  - encoding.Jsonify
+  - transform.Remarshal
+  - transform.Unmarshal
+aliases: [/functions/transform.remarshal]
 ---
 
 The FORMAT must be one of `json`, `toml`, `yaml`, or `xml`. If the INPUT is a string of serialized data, it must be valid JSON, TOML, YAML, or XML.
diff --git a/content/en/functions/transform.Unmarshal.md b/content/en/functions/transform/Unmarshal.md
similarity index 82%
rename from content/en/functions/transform.Unmarshal.md
rename to content/en/functions/transform/Unmarshal.md
index 7d0920da8..ab32d13de 100644
--- a/content/en/functions/transform.Unmarshal.md
+++ b/content/en/functions/transform/Unmarshal.md
@@ -1,12 +1,22 @@
 ---
 title: transform.Unmarshal
-description: "`transform.Unmarshal` (alias `unmarshal`) parses the input and converts it into a map or an array. Supported formats are JSON, TOML, YAML, XML and CSV."
+description: Parses the input and converts it into a map or an array. Supported formats are JSON, TOML, YAML, XML and CSV.
 categories: [functions]
+keywords: []
 menu:
   docs:
     parent: functions
-keywords: []
-signature: ["RESOURCE or STRING | transform.Unmarshal [OPTIONS]"]
+function:
+  aliases: [unmarshal]
+  returnType: any
+  signatures:
+    - RESOURCE or STRING | transform.Unmarshal [OPTIONS]
+    - RESOURCE or STRING | unmarshal [OPTIONS]
+relatedFunctions:
+  - encoding.Jsonify
+  - transform.Remarshal
+  - transform.Unmarshal
+aliases: [/functions/transform.unmarshal]
 ---
 
 The function accepts either a `Resource` created in [Hugo Pipes](/hugo-pipes/) or via [Page Bundles](/content-management/page-bundles/), or simply a string. The two examples below will produce the same map:
diff --git a/content/en/functions/truncate.md b/content/en/functions/truncate.md
deleted file mode 100644
index cf38a2dfd..000000000
--- a/content/en/functions/truncate.md
+++ /dev/null
@@ -1,23 +0,0 @@
----
-title: truncate
-description: Truncates a text to a max length without cutting words or leaving unclosed HTML tags.
-categories: [functions]
-menu:
-  docs:
-    parent: functions
-keywords: [strings]
-signature:
-  - "truncate SIZE [ELLIPSIS] INPUT"
-  - "strings.Truncate SIZE [ELLIPSIS] INPUT"
-relatedfuncs: []
----
-
-Since Go templates are HTML-aware, `truncate` will intelligently handle normal strings vs HTML strings:
-
-```go-html-template
-{{ "Keep my HTML" | safeHTML | truncate 10 }}` → Keep my …`
-```
-
-{{% note %}}
-If you have a raw string that contains HTML tags you want to remain treated as HTML, you will need to convert the string to HTML using the [`safeHTML` template function](/functions/safehtml) before sending the value to truncate. Otherwise, the HTML tags will be escaped when passed through the `truncate` function.
-{{% /note %}}
diff --git a/content/en/functions/uniq.md b/content/en/functions/uniq.md
deleted file mode 100644
index aecdccf95..000000000
--- a/content/en/functions/uniq.md
+++ /dev/null
@@ -1,15 +0,0 @@
----
-title: uniq
-description: Takes in a slice or array and returns a slice with duplicate elements removed.
-categories: [functions]
-menu:
-  docs:
-    parent: functions
-keywords: [multilingual,i18n,urls]
-signature: [uniq SET]
----
-
-
-```go-html-template
-{{ slice 1 3 2 1 | uniq }} → [1 3 2]
-```
diff --git a/content/en/functions/unix.md b/content/en/functions/unix.md
deleted file mode 100644
index 60fae9248..000000000
--- a/content/en/functions/unix.md
+++ /dev/null
@@ -1,30 +0,0 @@
----
-title: .Unix
-description: Converts a time.Time value to the number of seconds elapsed since the Unix epoch, excluding leap seconds. The Unix epoch is 00:00:00 UTC on 1 January 1970.
-keywords: [dates,time]
-categories: [functions]
-menu:
-  docs:
-    parent: functions
-signature: [".Unix",".UnixMilli",".UnixMicro",".UnixNano"]
-relatedfuncs: [Format,dateFormat,now,time]
----
-
-The `Milli`, `Micro`, and `Nano` variants return the number of milliseconds, microseconds, and nanoseconds (respectively) elapsed since the Unix epoch.
-
-```go-html-template
-.Date.Unix        --> 1637259694
-.ExpiryDate.Unix  --> 1672559999
-.Lastmod.Unix     --> 1637361786
-.PublishDate.Unix --> 1637421261
-
-("1970-01-01T00:00:00-00:00" | time.AsTime).Unix --> 0
-("1970-01-01T00:00:42-00:00" | time.AsTime).Unix --> 42
-("1970-04-11T01:48:29-08:00" | time.AsTime).Unix --> 8675309
-("2026-05-02T20:09:31-07:00" | time.AsTime).Unix --> 1777777771
-
-now.Unix      --> 1637447841
-now.UnixMilli --> 1637447841347
-now.UnixMicro --> 1637447841347378
-now.UnixNano  --> 1637447841347378799
-```
diff --git a/content/en/functions/abslangurl.md b/content/en/functions/urls/AbsLangURL.md
similarity index 88%
rename from content/en/functions/abslangurl.md
rename to content/en/functions/urls/AbsLangURL.md
index 2e1996f7e..ad73bbff0 100644
--- a/content/en/functions/abslangurl.md
+++ b/content/en/functions/urls/AbsLangURL.md
@@ -1,12 +1,22 @@
 ---
-title: absLangURL
+title: urls.AbsLangURL
+linkTitle: absLangURL
 description: Returns an absolute URL with a language prefix, if any.
 categories: [functions]
+keywords: []
 menu:
   docs:
     parent: functions
-keywords: [urls, multilingual,i18n]
-signature: ["absLangURL INPUT"]
+function:
+  aliases: [absLangURL]
+  returnType: template.HTML
+  signatures: [urls.AbsLangURL INPUT]
+relatedFunctions:
+  - urls.AbsLangURL
+  - urls.AbsURL 
+  - urls.RelLangURL
+  - urls.RelURL
+aliases: [/functions/abslangurl]
 ---
 
 Use this function with both monolingual and multilingual configurations. The URL returned by this function depends on:
diff --git a/content/en/functions/absurl.md b/content/en/functions/urls/AbsURL.md
similarity index 84%
rename from content/en/functions/absurl.md
rename to content/en/functions/urls/AbsURL.md
index efea2df75..bb6816f57 100644
--- a/content/en/functions/absurl.md
+++ b/content/en/functions/urls/AbsURL.md
@@ -1,12 +1,22 @@
 ---
-title: absURL
+title: urls.AbsURL 
+linkTitle: absURL
 description: Returns an absolute URL.
 categories: [functions]
+keywords: []
 menu:
   docs:
     parent: functions
-keywords: [urls]
-signature: ["absURL INPUT"]
+function:
+  aliases: [absURL]
+  returnType: template.html
+  signatures: [urls.AbsURL INPUT]
+relatedFunctions:
+  - urls.AbsLangURL
+  - urls.AbsURL 
+  - urls.RelLangURL
+  - urls.RelURL
+aliases: [/functions/absurl]
 ---
 
 With multilingual configurations, use the [`absLangURL`] function instead.  The URL returned by this function depends on:
@@ -34,7 +44,7 @@ With `baseURL = https://example.org/docs/`
 {{ absURL "style.css" }}  →   https://example.org/docs/style.css
 ```
 
-### Input begins with a slash
+#### Input begins with a slash
 
 If the input begins with a slash, the resulting URL will be incorrect when the `baseURL` includes a subdirectory. With a leading slash, the function returns a URL relative to the protocol+host section of the `baseURL`.
 
@@ -58,4 +68,4 @@ With `baseURL = https://example.org/docs/`
 The last three examples are not desirable in most situations. As a best practice, never include a leading slash when using this function.
 {{% /note %}}
 
-[`absLangURL`]: /functions/abslangurl/
+[`absLangURL`]: /functions/urls/abslangurl/
diff --git a/content/en/functions/anchorize.md b/content/en/functions/urls/Anchorize.md
similarity index 81%
rename from content/en/functions/anchorize.md
rename to content/en/functions/urls/Anchorize.md
index 91d6b4fe7..15efe9a5e 100644
--- a/content/en/functions/anchorize.md
+++ b/content/en/functions/urls/Anchorize.md
@@ -1,13 +1,20 @@
 ---
-title: anchorize
+title: urls.Anchorize
+linkTitle: anchorize
 description: Takes a string and sanitizes it the same way as the [`defaultMarkdownHandler`](/getting-started/configuration-markup#default-configuration) does for markdown headers.
 categories: [functions]
+keywords: []
 menu:
   docs:
     parent: functions
-keywords: [markdown,strings]
-signature: ["anchorize INPUT"]
-relatedfuncs: [humanize]
+function:
+  aliases: [anchorize]
+  returnType: string
+  signatures: [urls.Anchorize INPUT]
+relatedFunctions:
+  - urls.Anchorize
+  - urls.URLize
+aliases: [/functions/anchorize]
 ---
 
 If [Goldmark](/getting-started/configuration-markup#goldmark) is set as `defaultMarkdownHandler`, the sanitizing logic adheres to the setting [`markup.goldmark.parser.autoHeadingIDType`](/getting-started/configuration-markup#goldmark).
diff --git a/content/en/functions/urls.JoinPath.md b/content/en/functions/urls/JoinPath.md
similarity index 75%
rename from content/en/functions/urls.JoinPath.md
rename to content/en/functions/urls/JoinPath.md
index f11632367..41adf7ee7 100644
--- a/content/en/functions/urls.JoinPath.md
+++ b/content/en/functions/urls/JoinPath.md
@@ -2,11 +2,18 @@
 title: urls.JoinPath
 description: Joins the provided elements into a URL string and cleans the result of any ./ or ../ elements. If the argument list is empty, JoinPath returns an empty string.
 categories: [functions]
+keywords: []
 menu:
   docs:
     parent: functions
-keywords: [urls,path,join]
-signature: ["urls.JoinPath ELEMENT..."]
+function:
+  aliases: []
+  returnType: string
+  signatures: [urls.JoinPath ELEMENT...]
+relatedFunctions:
+  - path.Join
+  - urls.JoinPath
+aliases: [/functions/urls.joinpath]
 ---
 
 ```go-html-template
@@ -22,4 +29,4 @@ signature: ["urls.JoinPath ELEMENT..."]
 
 Unlike the [`path.Join`] function, `urls.JoinPath` retains consecutive leading slashes.
 
-[`path.Join`]: /functions/path.join/
+[`path.Join`]: /functions/path/join
diff --git a/content/en/functions/urls.Parse.md b/content/en/functions/urls/Parse.md
similarity index 86%
rename from content/en/functions/urls.Parse.md
rename to content/en/functions/urls/Parse.md
index b2d781e7f..17c924d51 100644
--- a/content/en/functions/urls.Parse.md
+++ b/content/en/functions/urls/Parse.md
@@ -2,11 +2,16 @@
 title: urls.Parse
 description: Parses a URL into a URL structure.
 categories: [functions]
+keywords: []
 menu:
   docs:
     parent: functions
-keywords: [urls]
-signature: ["urls.Parse URL"]
+function:
+  aliases: []
+  returnType: URL
+  signatures: [urls.Parse URL]
+relatedFunctions: []
+aliases: [/functions/urls.parse]
 ---
 
 The `urls.Parse` function parses a URL into a [URL structure](https://godoc.org/net/url#URL). The URL may be relative (a path, without a host) or absolute (starting with a [scheme]). Hugo throws an error when parsing an invalid URL.
diff --git a/content/en/functions/ref.md b/content/en/functions/urls/Ref.md
similarity index 87%
rename from content/en/functions/ref.md
rename to content/en/functions/urls/Ref.md
index 2d05ca427..908fd6ca8 100644
--- a/content/en/functions/ref.md
+++ b/content/en/functions/urls/Ref.md
@@ -1,13 +1,20 @@
 ---
-title: ref
+title: urls.Ref
+linkTitle: ref
 description: Returns the absolute permalink to a page.
 categories: [functions]
+keywords: []
 menu:
   docs:
     parent: functions
-keywords: [cross references, anchors]
-signature: ["ref . PAGE"]
-relatedfuncs: [relref]
+function:
+  aliases: [ref]
+  returnType: template.HTML
+  signatures: [urls.Ref . PAGE]
+relatedFunctions:
+  - urls.Ref
+  - urls.RelRef
+aliases: [/functions/ref]
 ---
 
 This function takes two arguments:
diff --git a/content/en/functions/relLangURL.md b/content/en/functions/urls/RelLangURL.md
similarity index 86%
rename from content/en/functions/relLangURL.md
rename to content/en/functions/urls/RelLangURL.md
index 78b823c23..b8850c71d 100644
--- a/content/en/functions/relLangURL.md
+++ b/content/en/functions/urls/RelLangURL.md
@@ -1,12 +1,22 @@
 ---
-title: relLangURL
+title: urls.RelLangURL
+linkTitle: relLangURL
 description: Returns a relative URL with a language prefix, if any.
 categories: [functions]
+keywords: []
 menu:
   docs:
     parent: functions
-keywords: [urls, multilingual,i18n]
-signature: ["relLangURL INPUT"]
+function:
+  aliases: [relLangURL]
+  returnType: template.HTML
+  signatures: [urls.RelLangURL INPUT]
+relatedFunctions:
+  - urls.AbsLangURL
+  - urls.AbsURL 
+  - urls.RelLangURL
+  - urls.RelURL
+aliases: [/functions/rellangurl]
 ---
 
 Use this function with both monolingual and multilingual configurations. The URL returned by this function depends on:
@@ -37,7 +47,7 @@ With `baseURL = https://example.org/docs/`
 {{ relLangURL "style.css" }}  →   /docs/en/style.css
 ```
 
-### Input begins with a slash
+#### Input begins with a slash
 
 If the input begins with a slash, the resulting URL will be incorrect when the `baseURL` includes a subdirectory. With a leading slash, the function returns a URL relative to the protocol+host section of the `baseURL`.
 
diff --git a/content/en/functions/relref.md b/content/en/functions/urls/RelRef.md
similarity index 88%
rename from content/en/functions/relref.md
rename to content/en/functions/urls/RelRef.md
index 98ad724f7..1ff213b70 100644
--- a/content/en/functions/relref.md
+++ b/content/en/functions/urls/RelRef.md
@@ -1,13 +1,20 @@
 ---
-title: relref
+title: urls.RelRef
+linkTitle: relref
 description: Returns the relative permalink to a page.
 categories: [functions]
+keywords: []
 menu:
   docs:
     parent: functions
-keywords: [cross references, anchors]
-signature: ["relref . PAGE"]
-relatedfuncs: [ref]
+function:
+  aliases: [relref]
+  returnType: template.HTML
+  signatures: [urls.RelRef . PAGE]
+relatedFunctions:
+  - urls.Ref
+  - urls.RelRef
+aliases: [/functions/relref]
 ---
 
 This function takes two arguments:
diff --git a/content/en/functions/relurl.md b/content/en/functions/urls/RelURL.md
similarity index 82%
rename from content/en/functions/relurl.md
rename to content/en/functions/urls/RelURL.md
index c8278c9df..fa1f9af73 100644
--- a/content/en/functions/relurl.md
+++ b/content/en/functions/urls/RelURL.md
@@ -1,12 +1,22 @@
 ---
-title: relURL
+title: urls.RelURL
+linkTitle: relURL
 description: Returns a relative URL.
 categories: [functions]
+keywords: []
 menu:
   docs:
     parent: functions
-keywords: [urls]
-signature: ["relURL INPUT"]
+function:
+  aliases: [relURL]
+  returnType: template.HTML
+  signatures: [urls.RelURL INPUT]
+relatedFunctions:
+  - urls.AbsLangURL
+  - urls.AbsURL 
+  - urls.RelLangURL
+  - urls.RelURL
+aliases: [/functions/relurl]
 ---
 
 With multilingual configurations, use the [`relLangURL`] function instead. The URL returned by this function depends on:
@@ -34,7 +44,7 @@ With `baseURL = https://example.org/docs/`
 {{ relURL "style.css" }}  →   /docs/style.css
 ```
 
-### Input begins with a slash
+#### Input begins with a slash
 
 If the input begins with a slash, the resulting URL will be incorrect when the `baseURL` includes a subdirectory. With a leading slash, the function returns a URL relative to the protocol+host section of the `baseURL`.
 
@@ -58,4 +68,4 @@ With `baseURL = https://example.org/docs/`
 The last three examples are not desirable in most situations. As a best practice, never include a leading slash when using this function.
 {{% /note %}}
 
-[`relLangURL`]: /functions/rellangurl/
+[`relLangURL`]: /functions/urls/rellangurl/
diff --git a/content/en/functions/urlize.md b/content/en/functions/urls/URLize.md
similarity index 87%
rename from content/en/functions/urlize.md
rename to content/en/functions/urls/URLize.md
index 7a9cf25e8..3c80a92f8 100644
--- a/content/en/functions/urlize.md
+++ b/content/en/functions/urls/URLize.md
@@ -1,13 +1,20 @@
 ---
-title: urlize
+title: urls.URLize
+linkTitle: urlize
 description: Takes a string, sanitizes it for usage in URLs, and converts spaces to hyphens.
 categories: [functions]
+keywords: []
 menu:
   docs:
     parent: functions
-keywords: [urls,strings]
-signature: ["urlize INPUT"]
-relatedfuncs: []
+function:
+  aliases: [urlize]
+  returnType: string
+  signatures: [urls.URLize INPUT]
+relatedFunctions:
+  - urls.Anchorize
+  - urls.URLize
+aliases: [/functions/urlize]
 ---
 
 The following examples pull from a content file with the following front matter:
diff --git a/content/en/getting-started/configuration-markup.md b/content/en/getting-started/configuration-markup.md
index dca2b3c52..02c4ea998 100644
--- a/content/en/getting-started/configuration-markup.md
+++ b/content/en/getting-started/configuration-markup.md
@@ -12,21 +12,47 @@ slug: configuration-markup
 toc: true
 ---
 
-## Default configuration
+## Default handler
 
-See [Goldmark](#goldmark) for settings related to the default markdown handler in Hugo.
+By default, Hugo uses [Goldmark] to render markdown to HTML.
 
-Below are all markup related configuration in Hugo with their default settings:
+{{< code-toggle file=hugo copy=false >}}
+[markup]
+defaultMarkdownHandler = 'goldmark'
+{{< /code-toggle >}}
 
-{{< code-toggle config="markup" />}}
+Files with the `.md` or `.markdown` extension are processed as markdown, provided that you have not specified a different [content format] using the `markup` field in front matter.
 
-**See each section below for details.**
+To use a different renderer for markdown files, specify one of `asciidocext`, `org`, `pandoc`, or `rst` in your site configuration.
+
+defaultMarkdownHandler|Description
+:--|:--
+`asciidocext`|[AsciiDoc]
+`goldmark`|[Goldmark]
+`org`|[Emacs Org Mode]
+`pandoc`|[Pandoc]
+`rst`|[reStructuredText]
+
+To use Asciidoc, Pandoc, or reStructuredText you must install the relevant renderer and update your [security policy].
+
+{{% note %}}
+Unless you need a unique capability provided by one of the alternate markdown handlers, we strongly recommend that you use the default setting. Goldmark is fast, well maintained, conforms to the [CommonMark] specification, and is compatible with [GitHub Flavored Markdown] (GFM).
+
+[commonmark]: https://spec.commonmark.org/0.30/
+[github flavored markdown]: https://github.github.com/gfm/
+{{% /note %}}
+
+[asciidoc]: https://asciidoc.org/
+[content format]: /content-management/formats/#list-of-content-formats
+[emacs org mode]: https://orgmode.org/
+[goldmark]: https://github.com/yuin/goldmark/
+[pandoc]: https://pandoc.org/
+[restructuredtext]: https://docutils.sourceforge.io/rst.html
+[security policy]: /about/security-model/#security-policy
 
 ## Goldmark
 
-[Goldmark](https://github.com/yuin/goldmark/) is from Hugo 0.60 the default library used for Markdown. It's fast, it's [CommonMark](https://spec.commonmark.org/current/) compliant and it's very flexible.
-
-This is the default configuration:
+This is the default configuration for the Goldmark markdown renderer:
 
 {{< code-toggle config="markup.goldmark" />}}
 
@@ -41,7 +67,21 @@ unsafe
 : By default, Goldmark does not render raw HTML and potentially dangerous links. If you have lots of inline HTML and/or JavaScript, you may need to turn this on.
 
 typographer
-: This extension substitutes punctuations with typographic entities like [smartypants](https://daringfireball.net/projects/smartypants/).
+: The typographer extension replaces certain character combinations with HTML entities as specified below:
+
+Markdown|Replaced by|Description
+:--|:--|:--
+`...`|`…`|horizontal ellipsis
+`'`|`’`|apostrophe
+`--`|`–`|en dash
+`---`|`—`|em dash
+`«`|`«`|left angle quote
+`“`|`“`|left double quote
+`‘`|`‘`|left single quote
+`»`|`»`|right angle quote
+`”`|`”`|right double quote
+`’`|`’`|right single quote
+
 
 attribute
 : Enable custom attribute support for titles and blocks by adding attribute lists inside single curly brackets (`{.myclass class="class1 class2" }`) and placing it _after the Markdown element it decorates_, on the same line for titles and on a new line directly below for blocks.
@@ -80,7 +120,71 @@ Note that attributes in [code fences](/content-management/syntax-highlighting/#h
 ````
 
 autoHeadingIDType ("github")
-: The strategy used for creating auto IDs (anchor names). Available types are `github`, `github-ascii` and `blackfriday`. `github` produces GitHub-compatible IDs, `github-ascii` will drop any non-Ascii characters after accent normalization, and `blackfriday` will make the IDs compatible with Blackfriday, the default Markdown engine before Hugo 0.60. Note that if Goldmark is your default Markdown engine, this is also the strategy used in the [anchorize](/functions/anchorize/) template func.
+: The strategy used for creating auto IDs (anchor names). Available types are `github`, `github-ascii` and `blackfriday`. `github` produces GitHub-compatible IDs, `github-ascii` will drop any non-Ascii characters after accent normalization, and `blackfriday` will make the IDs compatible with Blackfriday, the default Markdown engine before Hugo 0.60. Note that if Goldmark is your default Markdown engine, this is also the strategy used in the [anchorize](/functions/urls/anchorize) template func.
+
+## Asciidoc
+
+This is the default configuration for the AsciiDoc markdown renderer:
+
+{{< code-toggle config="markup.asciidocExt" />}}
+
+attributes
+: (`map`) Variables to be referenced in your AsciiDoc file. This is a list of variable name/value maps. See Asciidoctor’s [attributes].
+
+[attributes]: https://asciidoctor.org/docs/asciidoc-syntax-quick-reference/#attributes-and-substitutions
+
+backend:
+: (`string`) Don’t change this unless you know what you are doing.
+
+extensions
+: (`[]string`) Possible extensions are `asciidoctor-html5s`, `asciidoctor-bibtex`, `asciidoctor-diagram`, `asciidoctor-interdoc-reftext`, `asciidoctor-katex`, `asciidoctor-latex`, `asciidoctor-mathematical`, and `asciidoctor-question`.
+
+failureLevel
+: (`string`) The minimum logging level that triggers a non-zero exit code (failure).
+
+noHeaderOrFooter
+: (`bool`) Output an embeddable document, which excludes the header, the footer, and everything outside the body of the document. Don’t change this unless you know what you are doing.
+
+preserveTOC
+: (`bool`) By default, Hugo removes the table of contents generated by Asciidoctor and provides it through the built-in variable `.TableOfContents` to enable further customization and better integration with the various Hugo themes. This option can be set to true to preserve Asciidoctor’s TOC in the generated page.
+
+safeMode
+: (`string`) Safe mode level `unsafe`, `safe`, `server`, or `secure`. Don’t change this unless you know what you are doing.
+
+sectionNumbers
+: (`bool`) Auto-number section titles.
+
+trace
+: (`bool`) Include backtrace information on errors.
+
+verbose
+: (`bool`) Verbosely print processing information and configuration file checks to stderr.
+
+workingFolderCurrent
+: (`bool`) Sets the working directory to be the same as that of the AsciiDoc file being processed, so that [include] will work with relative paths. This setting uses the asciidoctor cli parameter --base-dir and attribute outdir=. For rendering diagrams with [asciidoctor-diagram], `workingFolderCurrent` must be set to `true`.
+
+[asciidoctor-diagram]: https://asciidoctor.org/docs/asciidoctor-diagram/
+[include]: https://asciidoctor.org/docs/asciidoc-syntax-quick-reference/#include-files
+
+Notice that for security concerns only extensions that do not have path separators (either `\`, `/` or `.`) are allowed. That means that extensions can only be invoked if they are in the Ruby's `$LOAD_PATH` (ie. most likely, the extension has been installed by the user). Any extension declared relative to the website's path will not be accepted.
+
+Example of how to set extensions and attributes:
+
+```yml
+[markup.asciidocExt]
+    extensions = ["asciidoctor-html5s", "asciidoctor-diagram"]
+    workingFolderCurrent = true
+    [markup.asciidocExt.attributes]
+        my-base-url = "https://example.com/"
+        my-attribute-name = "my value"
+```
+
+In a complex Asciidoctor environment it is sometimes helpful to debug the exact call to your external helper with all
+parameters. Run Hugo with `-v`. You will get an output like
+
+```txt
+INFO 2019/12/22 09:08:48 Rendering book-as-pdf.adoc with C:\Ruby26-x64\bin\asciidoctor.bat using asciidoc args [--no-header-footer -r asciidoctor-html5s -b html5s -r asciidoctor-diagram --base-dir D:\prototypes\hugo_asciidoc_ddd\docs -a outdir=D:\prototypes\hugo_asciidoc_ddd\build -] ...
+```
 
 ## Highlight
 
@@ -110,6 +214,6 @@ endLevel
 ordered
 : If `true`, generates an ordered list instead of an unordered list.
 
-## Markdown render hooks
+## Render hooks
 
 See [Markdown Render Hooks](/templates/render-hooks/).
diff --git a/content/en/getting-started/configuration.md b/content/en/getting-started/configuration.md
index d210765ab..e72bb8d3b 100644
--- a/content/en/getting-started/configuration.md
+++ b/content/en/getting-started/configuration.md
@@ -400,7 +400,7 @@ URL to be used as a placeholder when a page reference cannot be found in `ref` o
 Removes [non-spacing marks](https://www.compart.com/en/unicode/category/Mn) from [composite characters](https://en.wikipedia.org/wiki/Precomposed_character) in content paths.
 
 ```text
-content/post/hügó.md --> https://example.org/post/hugo/
+content/post/hügó.md → https://example.org/post/hugo/
 ```
 
 ### rssLimit
@@ -449,7 +449,7 @@ Timeout for generating page contents, specified as a [duration](https://pkg.go.d
 
 ### timeZone
 
-The time zone (or location), e.g. `Europe/Oslo`, used to parse front matter dates without such information and in the [`time` function](/functions/time/). The list of valid values may be system dependent, but should include `UTC`, `Local`, and any location in the [IANA Time Zone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
+The time zone (or location), e.g. `Europe/Oslo`, used to parse front matter dates without such information and in the [`time`] function. The list of valid values may be system dependent, but should include `UTC`, `Local`, and any location in the [IANA Time Zone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
 
 ### title
 
@@ -527,8 +527,6 @@ useResourceCacheWhen
 
 The `build.cachebusters` configuration option was added to support development using Tailwind 3.x's JIT compiler where a `build` configuration may look like this:
 
-
-
 {{< code-toggle file="hugo" >}}
 [build]
   [build.buildStats]
@@ -616,7 +614,7 @@ status = 404
 
 ## Configure title case
 
-Set `titleCaseStyle` to specify the title style used by the [title](/functions/title/) template function and the automatic section titles in Hugo.
+Set `titleCaseStyle` to specify the title style used by the [title](/functions/strings/title) template function and the automatic section titles in Hugo.
 
 Can be one of:
 
@@ -684,10 +682,6 @@ To set configuration parameters, prefix the name with `HUGO_PARAMS_`
 
 If you are using snake_cased variable names, the above will not work. Hugo determines the delimiter to use by the first character after `HUGO`. This allows you to define environment variables on the form `HUGOxPARAMSxAPI_KEY=abcdefgh`, using any [allowed](https://stackoverflow.com/questions/2821043/allowed-characters-in-linux-environment-variable-names#:~:text=So%20names%20may%20contain%20any,not%20begin%20with%20a%20digit.) delimiter.
 
-{{< todo >}}
-Test and document setting parameters via JSON env var.
-{{< /todo >}}
-
 ## Ignore content and data files when rendering
 
 **Note:** This works, but we recommend you use the newer and more powerful [includeFiles and excludeFiles](/hugo-modules/configuration/#module-configuration-mounts) mount options.
@@ -799,7 +793,7 @@ dir
 
 [`.Site.Params`]: /variables/site/
 [directory structure]: /getting-started/directory-structure
-[json]: https://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf "Specification for JSON, JavaScript Object Notation"
+[json]: https://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf
 [lookup order]: /templates/lookup-order/
 [Output Formats]: /templates/output-formats/
 [templates]: /templates/
@@ -821,3 +815,6 @@ If this is not set, Hugo will use, in order of preference:
 1. In a  `hugo_cache_$USER` directory below the OS temp dir.
 
 If you want to know the current value of `cacheDir`, you can run `hugo config`, e.g: `hugo config | grep cachedir`.
+
+
+[`time`]: /functions/time/astime
diff --git a/content/en/getting-started/glossary.md b/content/en/getting-started/glossary.md
index 834f72ec5..c15af5170 100644
--- a/content/en/getting-started/glossary.md
+++ b/content/en/getting-started/glossary.md
@@ -64,6 +64,10 @@ A markup language for creating content. Typically markdown, but may also be HTML
 
 A classification of content inferred from the top-level directory name or the `type` set in [front matter](#front-matter). Pages in the root of the content directory, including the home page, are of type "page". Accessed via `.Page.Type` in [templates](#template). See [details](/content-management/types/).
 
+### content view
+
+A template called with the `.Page.Render` method. See [details](/templates/views/).
+
 ### context
 
 Represented by a period "." within a [template action](#template-action), context is the current location in a data structure. For example, while iterating over a [collection](#collection) of pages, the context within each iteration is the page's data structure. The context received by each template depends on template type and/or how it was called. See [details](/templates/introduction/#the-dot).
@@ -250,7 +254,7 @@ A packaged combination of [archetypes](#archetype), assets, content, data, [temp
 
 ### token
 
-An identifier within a format string, beginning with a colon and replaced with a value when rendered. For example, use tokens in format strings for both [permalinks](/content-management/urls/#permalinks) and [dates](/functions/dateformat/#datetime-formatting-layouts).
+An identifier within a format string, beginning with a colon and replaced with a value when rendered. For example, use tokens in format strings for both [permalinks](/content-management/urls/#permalinks) and [dates](/functions/time/format/#localization).
 
 
 ### type
diff --git a/content/en/hosting-and-deployment/hosting-on-firebase.md b/content/en/hosting-and-deployment/hosting-on-firebase.md
index 3b1ba9dcd..c58f4b752 100644
--- a/content/en/hosting-and-deployment/hosting-on-firebase.md
+++ b/content/en/hosting-and-deployment/hosting-on-firebase.md
@@ -47,26 +47,26 @@ From here:
 
 In new versions of Firebase, some other questions apply:
 
-6. Set up automatic builds and deploys with GitHub? 
+6. Set up automatic builds and deploys with GitHub?
 
 Here you will be redirected to login in your GitHub account to get permissions. Confirm.
 
-7. For which GitHub repository would you like to set up a GitHub workflow? (format: user/repository) 
+7. For which GitHub repository would you like to set up a GitHub workflow? (format: user/repository)
 
 Include the repository you will use in the format above (Account/Repo)
 Firebase script with retrieve credentials, create a service account you can later manage in your GitHub settings.
 
-8. Set up the workflow to run a build script before every deploy? 
+8. Set up the workflow to run a build script before every deploy?
 
 Here is your opportunity to include some commands before you run the deploy.
 
-9. Set up automatic deployment to your site's live channel when a PR is merged? 
+9. Set up automatic deployment to your site's live channel when a PR is merged?
 
 You can let in the default option (main)
 
 After that Firebase has been set in your project with CI/CD. After that run:
 
-```
+```sh
 hugo && firebase deploy
 ```
 
diff --git a/content/en/hugo-modules/use-modules.md b/content/en/hugo-modules/use-modules.md
index 27a1f6051..db269a5db 100644
--- a/content/en/hugo-modules/use-modules.md
+++ b/content/en/hugo-modules/use-modules.md
@@ -142,7 +142,7 @@ A common use case for a workspace is to simplify local development of a site wit
 
 A workspace can be configured in a `*.work` file and activated with the [module.workspace](/hugo-modules/configuration/) setting, which for this use is commonly controlled via the `HUGO_MODULE_WORKSPACE` OS environment variable.
 
-See the [hugo.work](https://github.com/gohugoio/hugo/blob/master/hugo.work) file in the Hugo Docs repo for an example:
+See the [hugo.work](https://github.com/gohugoio/hugo/blob/master/docs/hugo.work) file in the Hugo Docs repo for an example:
 
 ```text
 go 1.19
diff --git a/content/en/hugo-pipes/babel.md b/content/en/hugo-pipes/babel.md
index 222b5116b..44b4e670e 100755
--- a/content/en/hugo-pipes/babel.md
+++ b/content/en/hugo-pipes/babel.md
@@ -8,7 +8,7 @@ menu:
     parent: hugo-pipes
     weight: 70
 weight: 70
-signature: ["resources.Babel RESOURCE [OPTIONS]", "babel RESOURCE [OPTIONS]"]
+signatures: ["resources.Babel RESOURCE [OPTIONS]", "babel RESOURCE [OPTIONS]"]
 ---
 
 ## Usage
diff --git a/content/en/hugo-pipes/bundling.md b/content/en/hugo-pipes/bundling.md
index 8b9899432..f3ff42f9c 100755
--- a/content/en/hugo-pipes/bundling.md
+++ b/content/en/hugo-pipes/bundling.md
@@ -9,7 +9,7 @@ menu:
     parent: hugo-pipes
     weight: 90
 weight: 90
-signature: ["resources.Concat TARGET_PATH SLICE_RESOURCES"]
+signatures: ["resources.Concat TARGET_PATH SLICE_RESOURCES"]
 ---
 
 ## Usage
diff --git a/content/en/hugo-pipes/fingerprint.md b/content/en/hugo-pipes/fingerprint.md
index bdabbe029..c492d4c70 100755
--- a/content/en/hugo-pipes/fingerprint.md
+++ b/content/en/hugo-pipes/fingerprint.md
@@ -9,7 +9,7 @@ menu:
     parent: hugo-pipes
     weight: 100
 weight: 100
-signature: ["resources.Fingerprint RESOURCE [ALGORITHM]", "fingerprint RESOURCE [ALGORITHM]"]
+signatures: ["resources.Fingerprint RESOURCE [ALGORITHM]", "fingerprint RESOURCE [ALGORITHM]"]
 ---
 
 ## Usage
diff --git a/content/en/hugo-pipes/js.md b/content/en/hugo-pipes/js.md
index 86c1564cf..ecf6dc33f 100644
--- a/content/en/hugo-pipes/js.md
+++ b/content/en/hugo-pipes/js.md
@@ -9,7 +9,7 @@ menu:
     parent: hugo-pipes
     weight: 60
 weight: 60
-signature: ["js.Build RESOURCE [OPTIONS]"]
+signatures: ["js.Build RESOURCE [OPTIONS]"]
 ---
 
 ## Usage
diff --git a/content/en/hugo-pipes/minification.md b/content/en/hugo-pipes/minification.md
index a32ef6e6f..74ddfaa89 100755
--- a/content/en/hugo-pipes/minification.md
+++ b/content/en/hugo-pipes/minification.md
@@ -9,7 +9,7 @@ menu:
     parent: hugo-pipes
     weight: 80
 weight: 80
-signature: ["resources.Minify RESOURCE", "minify RESOURCE"]
+signatures: ["resources.Minify RESOURCE", "minify RESOURCE"]
 ---
 
 ## Usage
diff --git a/content/en/hugo-pipes/postcss.md b/content/en/hugo-pipes/postcss.md
index 4e969caf2..2a08c7ad4 100755
--- a/content/en/hugo-pipes/postcss.md
+++ b/content/en/hugo-pipes/postcss.md
@@ -9,7 +9,7 @@ menu:
     weight: 40
 toc: true
 weight: 40
-signature: ["resources.PostCSS RESOURCE [OPTIONS]", "postCSS RESOURCE [OPTIONS]"]
+signatures: ["resources.PostCSS RESOURCE [OPTIONS]", "postCSS RESOURCE [OPTIONS]"]
 ---
 
 ## Setup
diff --git a/content/en/hugo-pipes/postprocess.md b/content/en/hugo-pipes/postprocess.md
index 3b7d5c610..4b3cb8ad4 100755
--- a/content/en/hugo-pipes/postprocess.md
+++ b/content/en/hugo-pipes/postprocess.md
@@ -8,7 +8,7 @@ menu:
     parent: hugo-pipes
     weight: 50
 weight: 50
-signature: ["resources.PostProcess RESOURCE"]
+signatures: ["resources.PostProcess RESOURCE"]
 ---
 
 ## Usage
diff --git a/content/en/hugo-pipes/resource-from-string.md b/content/en/hugo-pipes/resource-from-string.md
index f3f0cda4f..fa472715c 100755
--- a/content/en/hugo-pipes/resource-from-string.md
+++ b/content/en/hugo-pipes/resource-from-string.md
@@ -9,7 +9,7 @@ menu:
     parent: hugo-pipes
     weight: 110
 weight: 110
-signature: ["resources.FromString TARGET_PATH CONTENT"]
+signatures: ["resources.FromString TARGET_PATH CONTENT"]
 ---
 
 ## Usage
diff --git a/content/en/hugo-pipes/resource-from-template.md b/content/en/hugo-pipes/resource-from-template.md
index 4f34817c0..c1c4cb316 100755
--- a/content/en/hugo-pipes/resource-from-template.md
+++ b/content/en/hugo-pipes/resource-from-template.md
@@ -9,7 +9,7 @@ menu:
     parent: hugo-pipes
     weight: 120
 weight: 120
-signature: ["resources.ExecuteAsTemplate TARGET_PATH CONTEXT RESOURCE"]
+signatures: ["resources.ExecuteAsTemplate TARGET_PATH CONTEXT RESOURCE"]
 ---
 
 ## Usage
diff --git a/content/en/hugo-pipes/transpile-sass-to-css.md b/content/en/hugo-pipes/transpile-sass-to-css.md
index bf3d136f1..b09cc165b 100644
--- a/content/en/hugo-pipes/transpile-sass-to-css.md
+++ b/content/en/hugo-pipes/transpile-sass-to-css.md
@@ -9,7 +9,7 @@ menu:
     parent: hugo-pipes
     weight: 30
 weight: 30
-signature: ["resources.ToCSS RESOURCE [OPTIONS]", "toCSS RESOURCE [OPTIONS]"]
+signatures: ["resources.ToCSS RESOURCE [OPTIONS]", "toCSS RESOURCE [OPTIONS]"]
 toc: true
 aliases: [/hugo-pipes/transform-to-css/]
 ---
diff --git a/content/en/installation/common/01-editions.md b/content/en/installation/_common/01-editions.md
similarity index 100%
rename from content/en/installation/common/01-editions.md
rename to content/en/installation/_common/01-editions.md
diff --git a/content/en/installation/common/02-prerequisites.md b/content/en/installation/_common/02-prerequisites.md
similarity index 100%
rename from content/en/installation/common/02-prerequisites.md
rename to content/en/installation/_common/02-prerequisites.md
diff --git a/content/en/installation/common/03-prebuilt-binaries.md b/content/en/installation/_common/03-prebuilt-binaries.md
similarity index 100%
rename from content/en/installation/common/03-prebuilt-binaries.md
rename to content/en/installation/_common/03-prebuilt-binaries.md
diff --git a/content/en/installation/common/05-build-from-source.md b/content/en/installation/_common/04-build-from-source.md
similarity index 100%
rename from content/en/installation/common/05-build-from-source.md
rename to content/en/installation/_common/04-build-from-source.md
diff --git a/content/en/installation/common/homebrew.md b/content/en/installation/_common/homebrew.md
similarity index 100%
rename from content/en/installation/common/homebrew.md
rename to content/en/installation/_common/homebrew.md
diff --git a/content/en/installation/common/index.md b/content/en/installation/_common/index.md
similarity index 100%
rename from content/en/installation/common/index.md
rename to content/en/installation/_common/index.md
diff --git a/content/en/installation/bsd.md b/content/en/installation/bsd.md
index 5fbc4bfad..999e52ad6 100644
--- a/content/en/installation/bsd.md
+++ b/content/en/installation/bsd.md
@@ -9,11 +9,11 @@ menu:
 toc: true
 weight: 50
 ---
-{{% readfile file="/installation/common/01-editions.md" %}}
+{{% readfile file="/installation/_common/01-editions.md" %}}
 
-{{% readfile file="/installation/common/02-prerequisites.md" %}}
+{{% readfile file="/installation/_common/02-prerequisites.md" %}}
 
-{{% readfile file="/installation/common/03-prebuilt-binaries.md" %}}
+{{% readfile file="/installation/_common/03-prebuilt-binaries.md" %}}
 
 ## Repository packages
 
@@ -61,7 +61,7 @@ doas pkg_add hugo
 
 [OpenBSD]: https://www.openbsd.org/
 
-{{% readfile file="/installation/common/05-build-from-source.md" %}}
+{{% readfile file="/installation/_common/04-build-from-source.md" %}}
 
 ## Comparison
 
diff --git a/content/en/installation/common/04-docker.md b/content/en/installation/common/04-docker.md
deleted file mode 100644
index 24f5cd942..000000000
--- a/content/en/installation/common/04-docker.md
+++ /dev/null
@@ -1,10 +0,0 @@
-## Docker
-
-[Erlend Klakegg Bergheim] graciously maintains [Docker images] based on images for Alpine Linux, Busybox, Debian, and Ubuntu.
-
-```sh
-docker pull klakegg/hugo
-```
-
-[Docker images]: https://hub.docker.com/r/klakegg/hugo
-[Erlend Klakegg Bergheim]: https://github.com/klakegg
diff --git a/content/en/installation/linux.md b/content/en/installation/linux.md
index 4056b987a..2dbbd3720 100644
--- a/content/en/installation/linux.md
+++ b/content/en/installation/linux.md
@@ -9,11 +9,11 @@ menu:
 toc: true
 weight: 30
 ---
-{{% readfile file="/installation/common/01-editions.md" %}}
+{{% readfile file="/installation/_common/01-editions.md" %}}
 
-{{% readfile file="/installation/common/02-prerequisites.md" %}}
+{{% readfile file="/installation/_common/02-prerequisites.md" %}}
 
-{{% readfile file="/installation/common/03-prebuilt-binaries.md" %}}
+{{% readfile file="/installation/_common/03-prebuilt-binaries.md" %}}
 
 ## Package managers
 
@@ -47,7 +47,7 @@ sudo snap disconnect hugo:ssh-keys
 [strictly confined]: https://snapcraft.io/docs/snap-confinement
 [Snap]: https://snapcraft.io/
 
-{{% readfile file="/installation/common/homebrew.md" %}}
+{{% readfile file="/installation/_common/homebrew.md" %}}
 
 ## Repository packages
 
@@ -124,20 +124,17 @@ sudo eopkg install hugo
 
 [Solus]: https://getsol.us/
 
-{{% readfile file="/installation/common/04-docker.md" %}}
-
-{{% readfile file="/installation/common/05-build-from-source.md" %}}
+{{% readfile file="/installation/_common/04-build-from-source.md" %}}
 
 ## Comparison
 
-||Prebuilt binaries|Package managers|Repository packages|Docker|Build from source
-:--|:--:|:--:|:--:|:--:|:--:
-Easy to install?|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:
-Easy to upgrade?|:heavy_check_mark:|:heavy_check_mark:|varies|:heavy_check_mark:|:heavy_check_mark:
-Easy to downgrade?|:heavy_check_mark:|:heavy_check_mark: [^1]|varies|:heavy_check_mark:|:heavy_check_mark:
-Automatic updates?|:x:|varies [^2]|:x:|:x: [^3]|:x:
-Latest version available?|:heavy_check_mark:|:heavy_check_mark:|varies|:heavy_check_mark:|:heavy_check_mark:
+||Prebuilt binaries|Package managers|Repository packages|Build from source
+:--|:--:|:--:|:--:|:--:
+Easy to install?|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:
+Easy to upgrade?|:heavy_check_mark:|:heavy_check_mark:|varies|:heavy_check_mark:
+Easy to downgrade?|:heavy_check_mark:|:heavy_check_mark: [^1]|varies|:heavy_check_mark:
+Automatic updates?|:x:|varies [^2]|:x:|:x:
+Latest version available?|:heavy_check_mark:|:heavy_check_mark:|varies|:heavy_check_mark:
 
 [^1]: Easy if a previous version is still installed.
 [^2]: Snap packages are automatically updated. Homebrew requires advanced configuration.
-[^3]: Possible but requires advanced configuration.
diff --git a/content/en/installation/macos.md b/content/en/installation/macos.md
index 9d10642de..ccae90b36 100644
--- a/content/en/installation/macos.md
+++ b/content/en/installation/macos.md
@@ -9,15 +9,15 @@ menu:
 toc: true
 weight: 20
 ---
-{{% readfile file="/installation/common/01-editions.md" %}}
+{{% readfile file="/installation/_common/01-editions.md" %}}
 
-{{% readfile file="/installation/common/02-prerequisites.md" %}}
+{{% readfile file="/installation/_common/02-prerequisites.md" %}}
 
-{{% readfile file="/installation/common/03-prebuilt-binaries.md" %}}
+{{% readfile file="/installation/_common/03-prebuilt-binaries.md" %}}
 
 ## Package managers
 
-{{% readfile file="/installation/common/homebrew.md" %}}
+{{% readfile file="/installation/_common/homebrew.md" %}}
 
 ### MacPorts
 
@@ -29,19 +29,17 @@ sudo port install hugo
 
 [MacPorts]: https://www.macports.org/
 
-{{% readfile file="/installation/common/04-docker.md" %}}
-
-{{% readfile file="/installation/common/05-build-from-source.md" %}}
+{{% readfile file="/installation/_common/04-build-from-source.md" %}}
 
 ## Comparison
 
-||Prebuilt binaries|Package managers|Docker|Build from source
-:--|:--:|:--:|:--:|:--:|:--:
-Easy to install?|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|
-Easy to upgrade?|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:
-Easy to downgrade?|:heavy_check_mark:|:heavy_check_mark: [^1]|:heavy_check_mark:|:heavy_check_mark:
-Automatic updates?|:x:|:x: [^2]|:x: [^2]|:x:
-Latest version available?|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:
+||Prebuilt binaries|Package managers|Build from source
+:--|:--:|:--:|:--:
+Easy to install?|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|
+Easy to upgrade?|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:
+Easy to downgrade?|:heavy_check_mark:|:heavy_check_mark: [^1]|:heavy_check_mark:
+Automatic updates?|:x:|:x: [^2]|:x:
+Latest version available?|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:
 
 [^1]: Easy if a previous version is still installed.
 [^2]: Possible but requires advanced configuration.
diff --git a/content/en/installation/windows.md b/content/en/installation/windows.md
index 92979d9f2..48c5f7006 100644
--- a/content/en/installation/windows.md
+++ b/content/en/installation/windows.md
@@ -9,11 +9,11 @@ menu:
 toc: true
 weight: 40
 ---
-{{% readfile file="/installation/common/01-editions.md" %}}
+{{% readfile file="/installation/_common/01-editions.md" %}}
 
-{{% readfile file="/installation/common/02-prerequisites.md" %}}
+{{% readfile file="/installation/_common/02-prerequisites.md" %}}
 
-{{% readfile file="/installation/common/03-prebuilt-binaries.md" %}}
+{{% readfile file="/installation/_common/03-prebuilt-binaries.md" %}}
 
 ## Package managers
 
@@ -47,9 +47,7 @@ winget install Hugo.Hugo.Extended
 
 [Winget]: https://learn.microsoft.com/en-us/windows/package-manager/
 
-{{% readfile file="/installation/common/04-docker.md" %}}
-
-{{% readfile file="/installation/common/05-build-from-source.md" %}}
+{{% readfile file="/installation/_common/04-build-from-source.md" %}}
 
 {{% note %}}
 See these [detailed instructions](https://discourse.gohugo.io/t/41370) to install GCC on Windows.
@@ -57,13 +55,13 @@ See these [detailed instructions](https://discourse.gohugo.io/t/41370) to instal
 
 ## Comparison
 
-||Prebuilt binaries|Package managers|Docker|Build from source
-:--|:--:|:--:|:--:|:--:|:--:
-Easy to install?|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|
-Easy to upgrade?|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:
-Easy to downgrade?|:heavy_check_mark:|:heavy_check_mark: [^2]|:heavy_check_mark:|:heavy_check_mark:
-Automatic updates?|:x:|:x: [^1]|:x: [^1]|:x:
-Latest version available?|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:
+||Prebuilt binaries|Package managers|Build from source
+:--|:--:|:--:|:--:
+Easy to install?|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|
+Easy to upgrade?|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:
+Easy to downgrade?|:heavy_check_mark:|:heavy_check_mark: [^2]|:heavy_check_mark:
+Automatic updates?|:x:|:x: [^1]|:x:
+Latest version available?|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:
 
 [^1]: Possible but requires advanced configuration.
 [^2]: Easy if a previous version is still installed.
diff --git a/content/en/readfiles/README.md b/content/en/readfiles/README.md
deleted file mode 100644
index 4b10f0e47..000000000
--- a/content/en/readfiles/README.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# readdirs Directory for Reusable Content
-
-Files in this directory are:
-
-1. Used in *more than one place* within the Hugo docs
-2. Used in Examples of readdir (i.e. in local file templates)
-
-These files are called using the [`readfile` shortcode (source)](../layouts/readfile.html).
-
-You can call this shortcode in the docs as follows:
-
-
-{{% readfile file="/path/to/file.txt" markdown="true" %}}
-
-
-`markdown="true"` is optional (default = `"false"`) and parses the string through the Blackfriday renderer.
diff --git a/content/en/readfiles/dateformatting.md b/content/en/readfiles/dateformatting.md
deleted file mode 100644
index e6c395151..000000000
--- a/content/en/readfiles/dateformatting.md
+++ /dev/null
@@ -1,87 +0,0 @@
-Go templates [format your dates][time] according to a single reference time:
-
-```txt
-Mon Jan 2 15:04:05 MST 2006
-```
-
-You can think of `MST` as `07`, thus making the reference format string a sequence of numbers. The following is [taken directly from the Go docs][gdex]:
-
-```txt
-Jan 2 15:04:05 2006 MST
-  1 2  3  4  5    6  -7
-```
-
-### Hugo date templating reference
-
-Each of the following examples show the reference formatting string followed by the string Hugo will output in your HTML.
-
-Note that the examples were rendered and tested in [CST] and pull from a single example date you might have in your content's front matter:
-
-```yml
-date: 2017-03-03T14:15:59-06:00
-```
-
-`.Date` (i.e. called via [page variable][pagevars])
-: **Returns**: `2017-03-03 14:15:59 -0600 CST`
-
-`"Monday, January 2, 2006"`
-: **Returns**: `Friday, March 3, 2017`
-
-`"Mon Jan 2 2006"`
-: **Returns**: `Fri Mar 3 2017`
-
-`"January 2nd"`
-: **Returns**: `March 3rd`
-
-`"January 2006"`
-: **Returns**: `March 2017`
-
-`"2006-01-02"`
-: **Returns**: `2017-03-03`
-
-`"Monday"`
-: **Returns**: `Friday`
-
-`"02 Jan 06 15:04 MST"` (RFC822)
-: **Returns**: `03 Mar 17 14:15 CST`
-
-`"02 Jan 06 15:04 -0700"` (RFC822Z)
-: **Returns**: `03 Mar 17 14:15 -0600`
-
-`"Mon, 02 Jan 2006 15:04:05 MST"` (RFC1123)
-: **Returns**: `Fri, 03 Mar 2017 14:15:59 CST`
-
-`"Mon, 02 Jan 2006 15:04:05 -0700"` (RFC339)
-: **Returns**: `Fri, 03 Mar 2017 14:15:59 -0600`
-
-### Cardinal numbers and ordinal abbreviations
-
-Spelled-out cardinal numbers (e.g. "one", "two", and "three") and ordinal abbreviations (e.g. "1st", "2nd", and "3rd") are not currently supported.
-
-To continue with the example above:
-
-```go-html-template
-{{ .Date.Format "Jan 2nd 2006" }}
-```
-
-Hugo assumes you want to append `nd` as a string to the day of the month and outputs the following:
-
-```txt
-Mar 2nd 2017
-```
-
-### Use `.Local` and `.UTC`
-
-In conjunction with the [`dateFormat` function][dateFormat], you can also convert your dates to `UTC` or to local timezones:
-
-`{{ dateFormat "02 Jan 06 15:04 MST" .Date.UTC }}`
-: **Returns**: `03 Mar 17 20:15 UTC`
-
-`{{ dateFormat "02 Jan 06 15:04 MST" .Date.Local }}`
-: **Returns**: `03 Mar 17 14:15 CST`
-
-[CST]: https://en.wikipedia.org/wiki/Central_Time_Zone
-[dateFormat]: /functions/dateformat/
-[gdex]: https://golang.org/pkg/time/#example_Time_Format
-[pagevars]: /variables/page/
-[time]: https://golang.org/pkg/time/
diff --git a/content/en/readfiles/index.md b/content/en/readfiles/index.md
deleted file mode 100644
index 3d65eaa0f..000000000
--- a/content/en/readfiles/index.md
+++ /dev/null
@@ -1,3 +0,0 @@
----
-headless: true
----
\ No newline at end of file
diff --git a/content/en/readfiles/sectionvars.md b/content/en/readfiles/sectionvars.md
deleted file mode 100644
index 45aaff1f3..000000000
--- a/content/en/readfiles/sectionvars.md
+++ /dev/null
@@ -1,23 +0,0 @@
-.CurrentSection
-: The page's current section. The value can be the page itself if it is a section or the homepage.
-
-.FirstSection
-: The page's first section below root, e.g. `/docs`, `/blog` etc.
-
-.InSection $anotherPage
-: Whether the given page is in the current section.
-
-.IsAncestor $anotherPage
-: Whether the current page is an ancestor of the given page.
-
-.IsDescendant $anotherPage
-: Whether the current page is a descendant of the given page.
-
-.Parent
-: A section's parent section or a page's section.
-
-.Section
-: The [section](/content-management/sections/) this content belongs to. **Note:** For nested sections, this is the first path element in the directory, for example, `/blog/funny/mypost/ => blog`.
-
-.Sections
-: The [sections](/content-management/sections/) below this content.
diff --git a/content/en/readfiles/testing.txt b/content/en/readfiles/testing.txt
deleted file mode 100644
index 6428710e3..000000000
--- a/content/en/readfiles/testing.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-##### Hello World!
-
-Testing one, **two**, *three*. Don't delete this sample file used in the [templates](/templates/) section of the Hugo docs.
\ No newline at end of file
diff --git a/content/en/showcase/overmindstudios/bio.md b/content/en/showcase/overmindstudios/bio.md
new file mode 100644
index 000000000..1bd870984
--- /dev/null
+++ b/content/en/showcase/overmindstudios/bio.md
@@ -0,0 +1,7 @@
+
+**Overmind Studios** is a visual effects studio headquartered in Southern Germany.
+
+The site is built by:
+
+* [Tobias Kummer](https://www.overmind-studios.de/about/)
+
diff --git a/content/en/showcase/overmindstudios/featured.png b/content/en/showcase/overmindstudios/featured.png
new file mode 100644
index 000000000..c3eaaaf4c
Binary files /dev/null and b/content/en/showcase/overmindstudios/featured.png differ
diff --git a/content/en/showcase/overmindstudios/index.md b/content/en/showcase/overmindstudios/index.md
new file mode 100644
index 000000000..3208b2b72
--- /dev/null
+++ b/content/en/showcase/overmindstudios/index.md
@@ -0,0 +1,13 @@
+---
+title: Overmind Studios
+description: "A fresh start to make things easier in the future."
+siteURL: https://www.overmind-studios.de/
+byline: "[tobkum](https://github.com/tobkum), Co-Founder Overmind Studios"
+---
+After many years of running our site on WordPress, we decided to switch to Hugo.
+
+WordPress is a great CMS for many people, but it has some downsides, especially for those who need a fast, secure, and customizable site. Plugins can become outdated, customization can be difficult, and bloat can slow down page loading times.
+
+Hugo is a static site generator that addresses many of these problems. It is fast to build and iterate, does not require PHP, is highly customizable, and is easy to learn and use. It is also secure, as it does not have a backend or MySQL database that can be hacked.
+
+We are very happy with our switch to Hugo. It is easy to update our site with new projects, and our Lighthouse score and loading times are both excellent. We now have more time to be creative instead of troubleshooting WordPress quirks and updates.
diff --git a/content/en/templates/data-templates.md b/content/en/templates/data-templates.md
index 0aadbb9ae..cf835af44 100644
--- a/content/en/templates/data-templates.md
+++ b/content/en/templates/data-templates.md
@@ -20,7 +20,7 @@ Hugo supports loading data from YAML, JSON, XML, and TOML files located in the `
 
 ## The data folder
 
-The `data` folder should store additional data for Hugo to use when generating your site. 
+The `data` folder should store additional data for Hugo to use when generating your site.
 
 Data files are not for generating standalone pages. They should supplement content files by:
 
@@ -37,7 +37,7 @@ To access the data using the `site.Data.filename` notation, the file name must b
 - `x123.json` - Valid
 - `_123.json` - Valid
 
-To access the data using the [`index`](/functions/index-function/) function, the file name is irrelevant. For example:
+To access the data using the [`index`](/functions/collections/indexfunction) function, the file name is irrelevant. For example:
 
 Data file|Template code
 :--|:--
@@ -130,8 +130,7 @@ You can use the following code to render the `Short Description` in your layout:
 
Short Description of {{ .Site.Data.User0123.Name }}:

{{ index .Site.Data.User0123 "Short Description" | markdownify }}

``` -Note the use of the [`markdownify` template function][markdownify]. This will send the description through the Markdown rendering engine. - +Note the use of the [`markdownify`] function. This will send the description through the Markdown rendering engine. ## Get remote data @@ -255,10 +254,10 @@ If you change any local file and the LiveReload is triggered, Hugo will read the [config]: /getting-started/configuration/ [csv]: https://tools.ietf.org/html/rfc4180 [customize]: /hugo-modules/theme-components/ -[json]: https://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf "Specification for JSON, JavaScript Object Notation" +[json]: https://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf [LiveReload]: /getting-started/usage/#livereload [lookup]: /templates/lookup-order/ -[markdownify]: /functions/markdownify/ +[`markdownify`]: /functions/transform/markdownify [OAuth]: https://en.wikipedia.org/wiki/OAuth [partials]: /templates/partials/ [toml]: https://toml.io/en/latest diff --git a/content/en/templates/files.md b/content/en/templates/files.md index 7b058d531..2e82688c0 100644 --- a/content/en/templates/files.md +++ b/content/en/templates/files.md @@ -14,11 +14,11 @@ toc: true ## Traverse local files -With Hugo's [`readDir`][readDir] and [`readFile`][readFile] template functions, you can traverse your website's files on your server. +With Hugo's [`readDir`] and [`readFile`] template functions, you can traverse your website's files on your server. ## Use `readDir` -The [`readDir` function][readDir] returns an array of [`os.FileInfo`][osfileinfo]. It takes the file's `path` as a single string argument. This path can be to any directory of your website (i.e., as found on your server's file system). +The [`readDir`] function returns an array of [`os.FileInfo`] structures. It takes the file's `path` as a single string argument. This path can be to any directory of your website (i.e., as found on your server's file system). Whether the path is absolute or relative does not matter because---at least for `readDir`---the root of your website (typically `./public/`) in effect becomes both: @@ -27,7 +27,7 @@ Whether the path is absolute or relative does not matter because---at least for ## Use `readFile` -The [`readfile` function][readFile] reads a file from disk and converts it into a string to be manipulated by other Hugo functions or added as-is. `readFile` takes the file, including path, as an argument passed to the function. +The [`readfile`] function reads a file from disk and converts it into a string to be manipulated by other Hugo functions or added as-is. `readFile` takes the file, including path, as an argument passed to the function. To use the `readFile` function in your templates, make sure the path is relative to your *Hugo project's root directory*: @@ -48,10 +48,9 @@ If you are going to create [custom shortcodes](/templates/shortcode-templates/) {{% /note %}} [called directly in the Hugo docs]: https://github.com/gohugoio/hugoDocs/blob/master/content/en/templates/files.md -[osfileinfo]: https://golang.org/pkg/os/#FileInfo -[readDir]: /functions/readdir/ -[readFile]: /functions/readfile/ +[`os.FileInfo`]: https://pkg.go.dev/io/fs#FileInfo +[`readDir`]: /functions/os/readdir +[`readFile`]: /functions/os/readfile [sc]: /content-management/shortcodes/ [sct]: /templates/shortcode-templates/ [readfilesource]: https://github.com/gohugoio/hugoDocs/blob/master/layouts/shortcodes/readfile.html -[testfile]: https://github.com/gohugoio/hugoDocs/blob/master/content/en/readfiles/testing.txt diff --git a/content/en/templates/introduction.md b/content/en/templates/introduction.md index 5d60e9ed1..93666de28 100644 --- a/content/en/templates/introduction.md +++ b/content/en/templates/introduction.md @@ -301,7 +301,7 @@ Below example is "Example 1" rewritten using `if`: #### Example 4: `if` .. `else` Below example is "Example 2" rewritten using `if` .. `else`, and using -[`isset` function][isset] + `.Params` variable (different from the +[`isset`] + `.Params` variable (different from the [`.Param` **function**][param]) instead: ```go-html-template @@ -355,7 +355,7 @@ The following two examples are functionally the same: ### Example 2: `index` -The following accesses the page parameter called "disqus_url" and escapes the HTML. This example also uses the [`index` function](/functions/index-function/), which is built into Go Templates: +The following accesses the page parameter called "disqus_url" and escapes the HTML. This example also uses the [`index`] function, which is built into Go Templates: ```go-html-template {{ index .Params "disqus_url" | html }} @@ -569,7 +569,7 @@ params: sidebarrecentlimit: 5 {{< /code >}} -Within a footer layout, you might then declare a `