Convert a WordPress xml export to Hugo posts and Staticman comment-files.
Short | Long | Description |
---|---|---|
-i | --input | Required. Location of XML export from WordPress to convert. |
-o | --output | Required. Location where hugo-files will be written. |
-c | --content | Location(s) of wp-contents folder(s) where images from WordPress can be found. |
-p | --pageresources | Use page resources as location to store images (instead of 'uploads' folder). |
-s | --shortcodeimage | Hugo Shortcode used for rendering images in front-matter. If not specified a Markdown image tag will be used. |
--help | Display help screen. | |
--version | Display version information. |
dotnet wordpress-to-hugo-and-staticman-converter.dll -i "..\blogname.wordpress.2018-08-01.xml" -o "..\Output" -c "..\wp-content","..\wp-content\weblog" -pageresources -s "img \"{0}\" \"{1}\" \"{2}\""
Based my code on wordpress-to-hugo-exporter from Cyrill Schumacher which is a WordPress plugin (php) to export posts to Hugo files. Added staticman comments files based on Hugo + Staticman: Nested Replies and E-mail Notifications by Dan C Williams.
- Parse caption-tag in post-content; convert to figcaption
- Replace 'e' in text with Markdown unrelated to font-size
- Rename WordpressWXR12 library to WordPressWXR12
- Improve WordpressWXR12 library with enums for field values
- Extract WordpressWXR12 library into it's own library and NuGet-package
- Validate images referenced in posts are presents in static content folder
- Validate links in posts referencing images in site are present in static content folder (example 'DSC01373.jpg' in '2010/09/27/terugvlucht-naar-nederland')
- Remove context dependency from AutoMapper Profile class (ConverterLibraryAutoMapperProfile) using DI example by Jan de Vries
-
Add AppVeyor build tag -
Write comments to own file -
Convert post and comment HTML to Markdown -
Add banner-property to Hugo-markdown based on WordPress postmeta-key "_thumbnail_id" -
Save blogs in Page Resources/Bundles instead of all .md files in one directory -
Parse gallery-tag in post-content into page-resources (specified in the header) -
Add option to generate images using Hugo custom shortcode (for example 'imgproc') instead of regular markdown for an image -
Fix spaces in image names bacause Hugo crashes when these are used in Page Resources -
Check location of images when not using shortcode -
Check location of images when not using Page Resources -
Build using Microsoft Azure DevOps instead of AppVeyor