https://github.com/riaf/hugowxrexporter
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.
https://github.com/riaf/hugowxrexporter
export hugo markdown wordpress wxr xml
Last synced: 2 months ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/riaf/hugowxrexporter
- Owner: riaf
- License: apache-2.0
- Created: 2023-12-03T11:37:53.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-03T13:40:52.000Z (over 2 years ago)
- Last Synced: 2025-06-19T08:43:52.166Z (about 1 year ago)
- Topics: export, hugo, markdown, wordpress, wxr, xml
- Language: Python
- Homepage:
- Size: 17.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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.
```bash
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.