Skip to content

gethinode/mod-llm

Repository files navigation

Hinode Module - LLM

A Hugo module to expose your Hinode site in machine-readable form for AI agents

About

Logo

Hinode is a clean blog theme for Hugo, an open-source static site generator. Hinode is available as a template, and a main theme. This repository implements the emerging llms.txt convention to expose your Hinode in machine-readable form for AI agents. In addition, it creates a clean Markdown equivalent for each page. Finally, mod-llm optionally generates /llms-components.json, a machine-readable JSON schema of every Hinode shortcode and content block. Visit the Hinode documentation site for installation instructions.

Configuration

mod-llm is a standard Hugo module. Add it as an import to your site's module configuration in hugo.toml.

[[module.imports]]
  path = "github.com/gethinode/mod-llm"

Hugo generates output for each page based on the configured output formats. mod-llm requires two custom formats and supports one optional format. Add the following definitions to your site configuration.

[outputFormats]
  [outputFormats.llmstxt]
    mediaType = "text/plain"
    baseName = "llms"
    isPlainText = true
    notAlternative = true
    rel = "alternate"
    root = true

  [outputFormats.markdown]
    mediaType = "text/markdown"
    baseName = "index"
    isPlainText = true
    isHTML = false
    noUgly = false
    rel = "alternate"

  # Optional: add llmscomponents for Hinode documentation sites
  [outputFormats.llmscomponents]
    mediaType = "application/json"
    baseName = "llms-components"
    isPlainText = true
    notAlternative = true
    root = true

Activate the formats in the [outputs] section of your hugo.toml. Include llmscomponents only if your site is a Hinode documentation site.

[outputs]
  home = ["HTML", "llmstxt", "markdown"]   # add "llmscomponents" for documentation sites
  page = ["HTML", "markdown"]

Note

If your site already defines [outputs], extend the existing lists rather than replacing them. The HTML output must remain to keep the regular site building correctly.

Contributing

This module uses semantic-release to automate the release of new versions. The package uses husky and commitlint to ensure commit messages adhere to the Conventional Commits specification.

About

A Hugo module to expose your Hinode site in machine-readable form for AI agents

Resources

License

Stars

Watchers

Forks

Contributors