npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

strapi-export-to-hugo

v0.3.3

Published

Export hugo file using strapi v5

Readme

Export To Hugo

Provide Strapi v5 to generate your hugo. This plugin is open to everyone and everyone can contribute and modify it. The future of Export To Hugo is decided by each of you.

Features

  • Automatically generate Strapi Content-Type suitable for Hugo, avoiding manual creation and saving time.
  • Export the data of Strapi v5 into the files required by hugo to facilitate hugo operation.
  • Automatically git commit and push to Github

Version

Strapi version: V5 (The following tutorial is based on 5.13.1)

Hugo version: Not Sure. (The following tutorial is based on hugo_extended_0.147.4)

Directory

You need to create a project directory.

There are two folders under the project root directory, one is hugo and the other is strapi. You can't change their names.

Install

git init

Hugo

In the following examples, I use the hugo_extended_0.147.4 as a demonstration.

.\hugo.exe new site hugo

If you have your own template, you can install it via git submodule.

Or you can install your template via any method supported by hugo.

git submodule add https://YOUR_THEME_URL.git hugo/themes/YOUR_THEME_DIRECTORY

Strapi

Run the following command in a terminal:

npx create-strapi@latest strapi

Here is an example, You can set them according to your needs.

? Please log in or sign up. (Use arrow keys)
> Login/Sign up
? Please log in or sign up. Skip
? Do you want to use the default database (sqlite) ? (Y/n)
? Do you want to use the default database (sqlite) ? Yes
? Start with an example structure & data? (y/N)
? Start with an example structure & data? No
? Start with Typescript? (Y/n) n
? Start with Typescript? No
? Install dependencies with npm? (Y/n)
? Install dependencies with npm? Yes
? Initialize a git repository? (Y/n) n
? Initialize a git repository? No

Export To Hugo

Run the following command in a terminal:

cd .\strapi\
npm i strapi-export-to-hugo

Start Strapi

npm run dev

How To Use

Generating Content-Type

After logging into Strapi, on the left side of the menu bar, select export-to-hugo.

Select Content-Type Generator.

After Clicking, you will be prompted that the creation is successful. Then return to Content Manager to see the automatically generated Content-Type.

Then you can complete all your Hugo content, just in Strapi.

Generate Gugo Files

On the left side of the menu bar, select Hugo File Generator.

Click the second button to update the hugo file.

Sync to Github

You need to add something to your .env file.

#Github
GITHUB_REPO=YOUR_GITHUB_NAME/YOUR_GITHUB_REPO
GITHUB_BRANCH=YOUR_REPO_BRANCH
GITHUB_USERNAME=YOUR_GITHUB_NAME
GITHUB_TOKEN=YOUR_GITHUB_TOKEN

On the left side of the menu bar, select Sync to GitHub (The third button)

Just wait patiently for your Github to update. It will automatically commit and push operations.

Start Hugo

cd .\hugo\
.\hugo.exe server --gc

Development

Prerequisites

yalc must be installed globally (with npm install -g yalc or yarn global add yalc).

Local Publishing

In export-to-hugo directory

npm install
npm run build
yalc publish

In strapi directory

npx yalc add --link strapi-export-to-hugo
npm install
yalc update strapi-export-to-hugo
npm run dev

Publishing to npm

npm login
npm publish

Thanks

This project thanks Cursor for his help.