From b6d4089bc8db863d361e21759469c2fcbfcd854c Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Mon, 20 Apr 2026 13:22:38 +0200 Subject: feat: add search index JSON generation template Generates /search-index.json at build time containing title, url, date, and summary for all articles. Template uses Hugo's jsonify and plainify filters for safe JSON output. Includes outputFormats configuration in hugo.toml to enable JSON output format. Co-Authored-By: Claude Haiku 4.5 --- hugo.toml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'hugo.toml') diff --git a/hugo.toml b/hugo.toml index 0b7963b..0a7a233 100644 --- a/hugo.toml +++ b/hugo.toml @@ -4,6 +4,20 @@ title = "danix.xyz" theme = "danix-xyz-hacker" enableRobotsTXT = true +# Output format definitions +[outputFormats] + [outputFormats.JSON] + name = "JSON" + mediaType = "application/json" + baseName = "search-index" + isPlainText = true + +# Output formats +[outputs] + home = ["HTML", "JSON"] + section = ["HTML"] + page = ["HTML"] + # Hugo Pipes [minify] minifyOutput = false -- cgit v1.2.3