HugoToJSON screenshot

HugoToJSON

Author Avatar Theme by Arranf
Updated: 3 Apr 2021
30 Stars

A Rust utility to produce a JSON representation of the contents of a Hugo static site

Overview

HugoToJSONCircleCI is a powerful utility designed to create a JSON representation of the front matter and content of Hugo documents. Its primary goal is to facilitate search functionality on static Hugo sites by generating JSON compatible with Lunr and similar packages. This tool serves as a modern alternative to the now-discontinued hugo_lunr Node tool, addressing the need for efficient search capabilities in static site generation.

Designed with flexibility and performance in mind, HugoToJSONCircleCI simplifies the process of utilizing Hugo with common formats like Markdown and both YAML and TOML for front matter. Whether you’re building a personal blog or a full-fledged website, this utility is a beneficial addition to your toolset.

Features

  • Versatile Support: Compatible with .md files and supports both YAML and TOML front matter, making it ideal for a variety of Hugo configurations.
  • Efficient JSON Generation: Quickly produces JSON for use with Lunr, enhancing search functionality on static sites.
  • User-Friendly Command: Easy-to-use command syntax allows for straightforward operation, suitable for developers of all skill levels.
  • Flexible Defaults: Defaults to using the current directory structure, offering convenience for quick setup and testing.
  • CI Integration Ready: Designed to seamlessly fit into your continuous integration workflow, ensuring you always use the latest version of the tool.
  • Open for Contribution: Actively encourages community contributions, providing a clear list of goals and areas for improvement as outlined in ToDo.txt.