More Premium Hugo Themes Premium Hugo Themes

Contentful Export

Extract Contentful to Hugo

Contentful Export

Extract Contentful to Hugo

Author Avatar Theme by friends-of-hugo
Github Stars Github Stars: 22
Last Commit Last Commit: Jun 13, 2020 -
First Commit Created: Dec 18, 2023 -
Contentful Export screenshot

Overview

The Contentful Hugo Extractor is a tool that allows users to extract all content from their Contentful space and make it easily usable by Hugo. It can be run locally or as part of a CI server like Travis.

Features

  • Extracts all content from Contentful space and makes it consumable by Hugo.
  • Stores all content under the /content directory.
  • Creates a subdirectory for each content type and a markdown file for each item.
  • Special cases include storing items of type Homepage as /content/_index and using fields named mainContent for the main content of the markdown file.
  • Allows configuration through TOML configuration files.
  • Supports YAML output format.
  • Allows configuration of Hugo Page Bundles by dropping a file named _index.md in the section’s content directory.
  • Can generate the index.md file for configuring sections automatically.

Installation

To install the Contentful Hugo Extractor, follow these steps:

  1. Ensure that Go (1.10+) is installed as well as dep.
  2. Use the following command to install the tool: <code snippet>
  3. Set up the necessary environment variables or command line flags for the contentful space id and API key.
  4. Run the tool to extract the content and store it under the /content directory.

Summary

The Contentful Hugo Extractor is a useful tool for seamlessly exporting content from Contentful and integrating it with the Hugo static site generator. Its features like directory organization, main content handling, and Hugo Page Bundles configuration make it efficient and configurable to suit different needs. With easy installation and compatibility with CI servers, it offers a convenient solution for content management and development workflow.