Hugo is static site generator written in golang. Wordpress is a tool for remote access to your server ;-) ❗️Contributions welcome!
Hugo is static site generator written in golang. Wordpress is a tool for remote access to your server ;-) ❗️Contributions welcome!
Hugo a static site generator written in GoLang: https://gohugo.io
This repo is based on https://github.com/benbalter/wordpress-to-jekyll-exporter
One-click WordPress plugin that converts all posts, pages, taxonomies, metadata, and settings to Markdown and YAML which can be dropped into Hugo.
the_content filter prior to export, allowing third-party plugins to
modify the output)post_content to Markdown Extra (using Markdownify)post_meta and fields within the wp_posts table to YAML front
matter for parsing by Hugo.comments as part of their posts. This features needs to be
enabled manually by editing the PHP source code. See file hugo-export.php at
line ~40.config.yaml with all settings in the wp_options tableconfig.yaml, pages, and post folder
containing .md files for each post in the proper Hugo naming convention./wp-content/plugins/ folderextension=zip.so line is uncommented in your php.iniExport to Hugo from the Tools menu(I've never tried it, because not a wp.com user)
Export to Hugo command. If that fails go to the
command line run the CLI script with memory_limit=-1, means unlimited memory
usage.Re Docker: It should be very easy to create a Dockerfile containing everything above mentioned for a one time conversion of the XML file to the Hugo format.
Add New.Export to Hugo command.If you're having trouble with your web server timing out before the export is complete, or if you just like terminal better, you may enjoy the command-line tool.
It works just like the plugin, but produces the zipfile at /tmp/wp-hugo.zip:
php hugo-export-cli.phpIf you want to offer a folder (say a mount point to a huge drive) other than using /tmp in OS, pass it as the first argument to the script:
php hugo-export-cli.php /YOUR_PATH_TO_TMP_FOLDER/For folder-only exports (skip the zip archive and leave files under /YOUR_PATH_TO_TMP_FOLDER/hugo-export-files), append --no-zip. You can further limit the export to content updated since the previous folder export by adding --incremental (must be combined with --no-zip). Incremental mode looks for a .last_sync marker file inside the export folder and will only regenerate posts changed since that timestamp (with a 5-minute safety window). The marker is updated automatically after each folder export.
Alternatively, if you have WP-CLI installed, you can run:
wp hugo-export > export.zipThe WP-CLI version will provide greater compatibility for alternate WordPress
environments, such as when wp-content isn't in the usual location.
The exported files fit as input for Hugo. Please proceed with Hugo's Quick start guide.
Updates the markdownify library, removes lots of unused code, AFAIK. Include GPL.
with tiny fixes
The project is licensed under the GPLv3 or later
No open issues yet, or sync has not completed.