From db56b28bc2e8d69cc35a84ca40fc315c78d590bb Mon Sep 17 00:00:00 2001 From: Ihor Aleksandrychiev Date: Mon, 19 Oct 2026 22:17:50 +0300 Subject: [PATCH] Added llms.txt and llms-full.txt Generated by the llms-txt Hugo module from gethugothemes https://gethugothemes.com/how-to-add-llms-txt-to-hugo-website Ticket: ENT-14756 Signed-off-by: Ihor Aleksandrychiev (cherry picked from commit c64ee43fecbeefd3a6e62c600f3fe1ec37e55aea) --- generator/build/install_hugo.sh | 8 ++++++-- hugo/config.toml | 20 ++++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/generator/build/install_hugo.sh b/generator/build/install_hugo.sh index 51c96eb19..b9e0ebc13 100644 --- a/generator/build/install_hugo.sh +++ b/generator/build/install_hugo.sh @@ -1,7 +1,11 @@ #!/bin/bash -wget -nv https://github.com/gohugoio/hugo/releases/download/v0.154.2/hugo_0.154.2_Linux-64bit.tar.gz -O hugo.tar.gz - echo "6473b8fe2ff0a5b13af217eb780f3a03aa34d43ba4506314c6156f11074a418d hugo.tar.gz" | sha256sum -c +# go and git are needed by Hugo to download modules (llms-txt) +sudo apt-get install -y -qq golang-1.26-go git +sudo ln -sf /usr/lib/go-1.26/bin/go /usr/local/bin/go + +wget -nv https://github.com/gohugoio/hugo/releases/download/v0.167.0/hugo_0.167.0_Linux-64bit.tar.gz -O hugo.tar.gz + echo "4d84519b9f619e6d4c3fb45a50157abeabeb724f859c60605f44c23def6e1169 hugo.tar.gz" | sha256sum -c if [ $? -eq 1 ]; then exit 2 fi diff --git a/hugo/config.toml b/hugo/config.toml index e5b30da40..b0e67e6ef 100644 --- a/hugo/config.toml +++ b/hugo/config.toml @@ -15,6 +15,8 @@ repositoryUrl = "https://github.com/cfengine/documentation" searchBaseUrl = "/docs/search/%branch%/" searchUrlPrefix = ".." domain = "docs.cfengine.com" +# Used as the summary line in llms.txt +description = "CFEngine %branch% documentation: installation, policy language reference, Masterfiles Policy Framework, Mission Portal and Enterprise API." isLTS = false [params.cfengine] @@ -56,3 +58,21 @@ baseUrl = "https://docs.cfengine.com/docs/%branch%" secondary = "#f5821f" link = "#1d71d3" footer = "#052569" + +# llms.txt (https://llmstxt.org), see +# https://github.com/gethugothemes/hugo-modules/tree/main/llms-txt +# go.mod / go.sum come from nt-docs +[module] +[[module.imports]] +path = "github.com/gethugothemes/hugo-modules/llms-txt" + +[outputs] +home = ["HTML", "RSS", "llms", "llmsfull", "md"] +section = ["HTML", "RSS", "md"] +page = ["HTML", "md"] + +[params.llms] +generate_llms_txt = true +generate_llms_full_txt = true +include = [] +exclude = ["/tags/**"]