Skip to content

Releases: hexojs/hexo-migrator-wordpress

2.1.2

03 Sep 00:09
1340e89
Compare
Choose a tag to compare

Fix

  • fix(import-image): regex and image slug [#103]
    • replacing image embed link in a post should now also works within a paragraph that has a pair of bracket "()".
  • fix(parseFeed): sanitize input [#106]
    • xml parser camaro may throw error if there is an unprintable character in the input. Those unsafe characters are now removed before being parsed by camaro.

2.1.1

26 Aug 07:36
e3d96c6
Compare
Choose a tag to compare

Fix

  • fix: avoid handling non-post asset [#99]
    • A post may embeds external images and they should not be processed by import-image.

2.1.0

02 Aug 07:41
9cb2811
Compare
Choose a tag to compare

Breaking change

  • Drop support of Node 13 due to compatibility issue; this doesn't prevent npm from installing this plugin in Node 13, it shows warning instead. [#96]
    • Nodejs has officially dropped support of Node 13 since 1 Jun 2020.
  • fix(turndown): headingStyle: 'atx' & codeBlockStyle: 'fenced' [#65]
    • More in-line with markdown style preferred by Hexo.

Feature

  • feat: import excerpt with markup [#64]
    • Retain original markup of excerpt
    title: foo bar
    date: 2020-01-01 00:00:00
    ---
    
    Lorem ipsum [dolor](http://example.com/) sit amet, **nam** ex putant _intellegat_ reprehendunt.
    
    <!-- more -->
    
    Cu nulla aeterno nec, tibique deterruisset an eam, ea pro dolorem vituperata.
    
  • Option to import image attachments (original WP link must be up) [#69] [#70] [#72] [#73] [#78] [#85] [#91]
    • All attachments are imported by default, including original-sized and resized.
      • Usage: $ hexo migrate wordpress /path/export.xml --import-image
    • There is an option to import original-size images only.
      • Usage: $ hexo migrate wordpress /path/export.xml --import-image original
  • Import nested categories [#89]
    • Imported categories are also no longer nested anymore if the original are not.
  • feat: 'default-category' option [#93]
    • Uncategorized category is now skipped by default.
    • A default category can be set for posts without any category.
      $ hexo migrate wordpress /path/export.xml --default-category 'unknown'
    • Category name defaults to the value set in user configuration:
    # _config.yml
    default_category: uncategorized

Fix

  • fix: unescape title if escaped [#82]
    • A post could be entitled Some&quot;Title&quot;, the fix is to detect the pattern and unescape it when necessary.
  • fix: stricter excerpt regex [#88]
    • Now only the following variants of excerpt tag are valid.
    1. <!--more-->
    2. <!-- more-->
    3. <!--more -->
    4. <!-- more -->
  • fix: handle title with double quotes [#67]
    • Escape double quote before passing to yml parser
  • fix: restore paragraph [#79]
  • Import tags and categories separately [#81]

Documentation

  • Add export instruction for Wordpress v5 [#84]

2.0.0

24 Jun 10:35
d59d65f
Compare
Choose a tag to compare

v2 is a complete rewrite to utilize modern APIs. By no means it is feature-complete, please test it on your wordpress.xml and report any item that did not get imported.

Breaking change

  • Requires Node 12+, drop support < Node 12 [#61]

Feature

  • --skipduplicate option to skip importing posts which have similar title as existing ones. [#57]
    • Disabled by default
    • Usage: hexo migrate wordpress /path/to/wordpress.xml --skipduplicate
  • --limit [number] option to set the maximum number of posts to import. [#57]
    • Default to importing all posts.
    • Usage: hexo migrate wordpress /path/to/wordpress.xml --limit 3
  • --alias option to redirect post to wordpress-hosted post. [#57]

Refactor

  • Complete rewrite to utilize modern API/library. It enables more flexible parsing of input xml with the ability to support custom elements and future formats. [#57]

Dependency

  • Upgrade turndown from 4.0.2 to 6.0.0 [#41] [#58]