GithubHelp home page GithubHelp logo

gijsvdh / wordpress-to-jekyll-exporter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from benbalter/wordpress-to-jekyll-exporter

0.0 1.0 0.0 234 KB

One-click WordPress plugin that converts all posts, pages, taxonomies, metadata, and settings to Markdown and YAML which can be dropped into Jekyll

wordpress-to-jekyll-exporter's Introduction

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 Jekyll.

Features

  • Converts all posts, pages, and settings from WordPress for use in Jekyll
  • Export what your users see, not what the database stores (runs post content through the_content filter prior to export, allowing third-party plugins to modify the output)
  • Converts all post_content to Markdown Extra (using Markdownify)
  • Converts all post_meta and fields within the wp_posts table to YAML front matter for parsing by Jekyll
  • Generates a _config.yml with all settings in the wp_options table
  • Outputs a single zip file with _config.yml, pages, and _posts folder containing .md files for each post in the proper Jekyll naming convention
  • No settings. Just a single click.

Usage

  1. Place plugin in /wp-content/plugins/ folder
  2. Make sure extension=zip.so line is uncommented in your php.ini
  3. Activate plugin in WordPress dashboard
  4. Select Export to Jekyll from the Tools menu

Command-line Usage

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 on STDOUT:

php jekyll-export-cli.php > jekyll-export.zip

Alternatively, if you have WP-CLI installed, you can run:

wp jekyll-export > export.zip

The WP-CLI version will provide greater compatibility for alternate WordPress environments, such as when wp-content isn't in the usual location.

Changelog

View Past Releases

1.4

  • Made license explicit
  • Removed word-wrap from YAML export to prevent breaking permalinks

1.3

  • Use fork of Markdownify rather than external API to convert content from HTML to markdown
  • Better memory utilization for larger sites, props @ghelleks

1.2

  • Commmand-line support, props @ghelleks and @scribu

1.1

  • Use WP_Filesystem for better compatability
  • 1.1.1 - Use heckyeahmarkdown to prevent PHP errors when Markdownify chokes on malformed HTML
  • 1.1.2 - clarify zip.so requirement in readme

1.0

  • Initial Release

License

The project is licensed under the GPLv3 or later

wordpress-to-jekyll-exporter's People

Contributors

benbalter avatar scribu avatar ghelleks avatar jiehanzheng avatar markjaquith avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.