<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hooks &amp; filters on Ananke Documentation</title><link>https://ananke-documentation.netlify.app/customisation/hooks-and-filters/</link><description>Recent content in Hooks &amp; filters on Ananke Documentation</description><generator>Hugo</generator><language>en-gb</language><lastBuildDate>Sun, 17 May 2026 08:00:00 +0700</lastBuildDate><atom:link href="https://ananke-documentation.netlify.app/customisation/hooks-and-filters/index.xml" rel="self" type="application/rss+xml"/><item><title>Introduction to hooks &amp; filters</title><link>https://ananke-documentation.netlify.app/customisation/hooks-and-filters/introduction/</link><pubDate>Sun, 17 May 2026 08:00:00 +0700</pubDate><guid>https://ananke-documentation.netlify.app/customisation/hooks-and-filters/introduction/</guid><description>&lt;a class="f6 link dim br2 ba bw1 ph3 pv2 mb2 dib navy" href="https://github.com/gohugo-ananke/ananke/releases/tag/v2.17.0" target="_blank" rel="noopener"&gt;&#10; since 2.17.0&#10; &lt;/a&gt;&#10;&lt;h2 id="hooks-and-filters"&#10; class="heading-permalink"&#10;&gt;Hooks and filters&#10; &lt;a class="heading-anchor" href="#hooks-and-filters" aria-label="Link to this section"&gt;#&lt;/a&gt;&#10;&lt;/h2&gt;&#10;&lt;p&gt;Ananke provides a small hooks system that lets site projects inject or transform markup without changing the theme templates directly.&lt;/p&gt;&#10;&lt;p&gt;There are two entry points:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;code&gt;hook.html&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;filter.html&lt;/code&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Both entry points look for a matching partial in the &lt;code&gt;hooks/&lt;/code&gt; partial namespace.&lt;/p&gt;&#10;&lt;p&gt;For example, this call:&lt;/p&gt;&#10;&lt;div class="code-block"&gt;&#10; &lt;div class="code-block-header"&gt;&#10; &lt;span class="code-language"&gt;go-html-template&lt;/span&gt;&#10; &lt;button class="code-copy" type="button" aria-label="Copy code to clipboard" hidden&gt;&#10; &lt;span class="code-copy-label" aria-hidden="true"&gt;Copy&lt;/span&gt;&#10; &lt;/button&gt;&#10; &lt;/div&gt;&#10; &lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-go-html-template" data-lang="go-html-template"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;{{-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;partials&lt;/span&gt;&lt;span class="na"&gt;.Include&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#34;hook.html&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#34;site-header&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="cp"&gt;-}}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;looks for a partial in &lt;code&gt;layouts/_partials/hooks/site-header.html&lt;/code&gt;. If the partial exists, it is loaded. If it does not exist, the hook is treated as unused and, if enabled, a CLI debug message is printed.&lt;/p&gt;</description></item><item><title>Hook examples</title><link>https://ananke-documentation.netlify.app/customisation/hooks-and-filters/examples/</link><pubDate>Sun, 17 May 2026 08:00:00 +0700</pubDate><guid>https://ananke-documentation.netlify.app/customisation/hooks-and-filters/examples/</guid><description>&lt;a class="f6 link dim br2 ba bw1 ph3 pv2 mb2 dib navy" href="https://github.com/gohugo-ananke/ananke/releases/tag/v2.17.0" target="_blank" rel="noopener"&gt;&#10; since 2.17.0&#10; &lt;/a&gt;&#10;&lt;p&gt;This page collects worked examples for the theme&amp;rsquo;s hook points. Each one shows the partial you&#10;create, where the output lands, and &lt;strong&gt;why&lt;/strong&gt; you would reach for that particular hook.&lt;/p&gt;&#10;&lt;p&gt;If you have not read it yet, start with the &lt;a href="../introduction/"&gt;introduction&lt;/a&gt; for the call&#10;mechanics, and keep the &lt;a href="../all/"&gt;list of all hooks&lt;/a&gt; handy for the available hook names.&lt;/p&gt;&#10;&lt;h2 id="before-you-start"&#10; class="heading-permalink"&#10;&gt;Before you start&#10; &lt;a class="heading-anchor" href="#before-you-start" aria-label="Link to this section"&gt;#&lt;/a&gt;&#10;&lt;/h2&gt;&#10;&lt;p&gt;Every example below is a file you create in &lt;strong&gt;your site&lt;/strong&gt;, never in the theme:&lt;/p&gt;</description></item><item><title>All hooks &amp; filters</title><link>https://ananke-documentation.netlify.app/customisation/hooks-and-filters/all/</link><pubDate>Sun, 17 May 2026 08:00:00 +0700</pubDate><guid>https://ananke-documentation.netlify.app/customisation/hooks-and-filters/all/</guid><description>&lt;a class="f6 link dim br2 ba bw1 ph3 pv2 mb2 dib navy" href="https://github.com/gohugo-ananke/ananke/releases/tag/v2.17.0" target="_blank" rel="noopener"&gt;&#10; since 2.17.0&#10; &lt;/a&gt;&#10;&lt;p&gt;This page lists every hook point the theme wires into its templates. Each entry is the value you&#10;pass as the &lt;code&gt;hook&lt;/code&gt; key (see the &lt;a href="../introduction/"&gt;introduction&lt;/a&gt; for how to call hooks and&#10;filters).&lt;/p&gt;&#10;&lt;p&gt;A hook point does &lt;strong&gt;nothing&lt;/strong&gt; until your site provides a matching partial at&#10;&lt;code&gt;layouts/_partials/hooks/&amp;lt;name&amp;gt;.html&lt;/code&gt;. Until then the hook is &amp;ldquo;unused&amp;rdquo; — the theme prints an&#10;optional debug notice and renders nothing.&lt;/p&gt;</description></item></channel></rss>