npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

hexo-migrator-wordpress

v2.1.2

Published

WordPress migrator plugin for Hexo

Downloads

382

Readme

hexo-migrator-wordpress

Build Status NPM version

Migrate your blog from WordPress to Hexo.

Install

In your blog folder, add this npm dependencie to your project:

$ npm install hexo-migrator-wordpress --save

Usage

Export your WordPress in "Tools" → "Export" → "All Content" in your dashboard.

Execute the following command after installed. source is the file path or URL of WordPress export file.

$ hexo migrate wordpress <source> [--options]
  • alias: Populates the alias setting in the front-matter, for use with the hexo-generator-alias module. This is useful for generating redirects.
  • limit: Maximum number of posts to import from the input file. All posts are imported by default.
    • Example:
    $ hexo migrate wordpress /path/export.xml --limit 3
    • This doesn't apply to pages, all pages will be imported.
  • skipduplicate: Skip posts with similar title as existing ones.
    • If the input contains a post titled 'Foo Bar' and there is an existing post named 'Foo-Bar.md', then that post will not be migrated.
    • The comparison is case-insensitive; a post titled 'FOO BAR' will be skipped if 'foo-bar.md' exists.
    • Without this option (default), this plugin will continue to migrate that post and create a post named 'Foo-Bar-1.md'
  • import-image: Download all image attachments from your Wordpress.
    • Downloaded images will be saved based on the original directories.
      • Example: http://yourwordpress.com/wp-content/uploads/2020/07/image.jpg => source/2020/07/image.jpg => http://yourhexo.com/2020/07/image.jpg.
      • Image embed link will be automatically replaced with a new path.
        • Example: ![title](http://yourwordpress.com/wp-content/uploads/2020/07/image.jpg) => ![title](/2020/07/image.jpg)
    • If post_asset_folder is enabled before migration, images will be saved according to their associated post.
      • Example: http://yourwordpress.com/wp-content/uploads/2020/07/image.jpg is associated with http://yourwordpress.com/2020/07/04/foo-post/ post.
      • http://yourwordpress.com/wp-content/uploads/2020/07/image.jpg => source/_posts/foo-post/image.jpg => http://yourhexo.com/2020/07/04/foo-post/image.jpg.
      • Image embed link will be automatically replaced with a new path.
        • Example: ![title](http://yourwordpress.com/wp-content/uploads/2020/07/image.jpg) => ![title](image.jpg)
      • Note that the images are only valid when viewing individual post, not in index page. If you prefer to have them viewable on the index page too and you are using hexo-renderer-marked 3.1.0+, enables the postAsset: option.
    • Limited to JPEG, PNG, GIF and WebP images only.
    • This also applies to resized images.
      • Example: http://yourwordpress.com/wp-content/uploads/2020/07/image-500x300.jpg => source/2020/07/image-500x300.jpg => http://yourhexo.com/2020/07/image-500x300.jpg.
      • Compatible with post_asset_folder: http://yourwordpress.com/wp-content/uploads/2020/07/image-500x300.jpg => source/_posts/foo-post/image-500x300.jpg => http://yourhexo.com/2020/07/04/foo-post/image-500x300.jpg.
    • Usage: $ hexo migrate wordpress /path/export.xml --import_image
    • original: Download original image attachments only.
      • Resized image embed will be replaced with original-sized image.
      • Example: http://yourwordpress.com/wp-content/uploads/2020/07/image-500x300.jpg => source/2020/07/image.jpg => http://yourhexo.com/2020/07/image.jpg.
      • Usage: $ hexo migrate wordpress /path/export.xml --import_image original
  • paragraph-fix: If you used Wordpress classic editor to write posts, you may find imported posts do not have the original paragraphs. Use this option to restore the paragraphs.
  • default-category: Set a default category for posts without any category.
    • Usage: $ hexo migrate wordpress /path/export.xml --default-category 'unknown'
    • Defaults to the value set in user configuration:
    # _config.yml
    default_category: uncategorized