Skip to content

HugoWXRExporter is a tool for converting content created with Hugo static site generator to WordPress Extended RSS (WXR) format. This facilitates the easy migration of content from Hugo to WordPress.

License

Notifications You must be signed in to change notification settings

riaf/hugowxrexporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HugoWXRExporter

Overview

HugoWXRExporter is a tool for converting content created with Hugo static site generator to WordPress Extended RSS (WXR) format. This facilitates the easy migration of content from Hugo to WordPress.

Features

  • Recursively reads Hugo markdown files
  • Parses metadata and content, converting them into WordPress WXR format
  • Utilizes Docker to eliminate environment dependencies

Environment Variables

You can customize the behavior of the script using the following environment variables:

  • HUGO_WXR_CREATOR: Set the creator name for the WXR file. Default is 'admin'.
  • HUGO_WXR_GUID: Set the base URL for GUID. The unique part of GUID will be appended to this base URL. Default is 'http://example.com/'.

Usage

Prerequisites

Docker must be installed to use this tool.

Running the Tool

Pull the public Docker image and execute the Docker container, specifying the path to your Hugo content directory and optionally setting environment variables.

docker pull ghcr.io/riaf/hugowxrexporter:latest
docker run -v /path/to/hugo/content:/app/content -e HUGO_WXR_CREATOR="YourName" -e HUGO_WXR_GUID="http://yourwebsite.com/" ghcr.io/riaf/hugowxrexporter:latest /app/content

Replace /path/to/hugo/content with the actual path to your Hugo content directory. Adjust the environment variables as needed.

License

This project is made available under the Apache License 2.0.

About

HugoWXRExporter is a tool for converting content created with Hugo static site generator to WordPress Extended RSS (WXR) format. This facilitates the easy migration of content from Hugo to WordPress.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages