{"id":115233,"date":"2020-01-06T19:17:06","date_gmt":"2020-01-06T19:17:06","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/gatsby-markdown-exporter\/"},"modified":"2020-01-16T19:22:36","modified_gmt":"2020-01-16T19:22:36","slug":"wp-gatsby-markdown-exporter","status":"publish","type":"plugin","link":"https:\/\/kk.wordpress.org\/plugins\/wp-gatsby-markdown-exporter\/","author":14440098,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"0.3.3","stable_tag":"trunk","tested":"5.3.21","requires":"4.6","requires_php":"5.6","requires_plugins":"","header_name":"WP Gatsby Markdown Exporter","header_author":"TinaCMS","header_description":"Export WordPress content to Markdown for GatsbyJS","assets_banners_color":"","last_updated":"2020-01-16 19:22:36","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/github.com\/tinacms\/wp-gatsby-markdown-exporter","header_author_uri":"https:\/\/www.tinacms.org","rating":5,"author_block_rating":0,"active_installs":100,"downloads":4602,"num_ratings":2,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":{"":"<p>n\/a<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":2},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":[],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":"2223048","resolution":"1","location":"assets","locale":""}},"screenshots":{"1":"The export options form allows for customization of the exported Zip file."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[1859,172190,169165,4608],"plugin_category":[59],"plugin_contributors":[180431],"plugin_business_model":[],"class_list":["post-115233","plugin","type-plugin","status-publish","hentry","plugin_tags-export","plugin_tags-gatsby","plugin_tags-jamstack","plugin_tags-markdown","plugin_category-utilities-and-tools","plugin_contributors-mitchmac","plugin_committers-franktldr","plugin_committers-mitchmac"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/wp-gatsby-markdown-exporter.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/wp-gatsby-markdown-exporter\/assets\/screenshot-1.png?rev=2223048","caption":"The export options form allows for customization of the exported Zip file."}],"raw_content":"<!--section=description-->\n<p>The plugin creates zip files containing posts converted to Markdown. A WP-CLI command exists to handle exporting sites with a large amount of content.<\/p>\n\n<ul>\n<li>Move WordPress content to Gatsby-friendly Markdown.<\/li>\n<li>Customize the export! Remap and restructure exported fields.<\/li>\n<li>CLI: Avoid PHP timeouts by using the command line with WP-CLI.<\/li>\n<li>CLI: Export progress bar (great for large sites)!<\/li>\n<\/ul>\n\n<blockquote>\n  <p>Reminder: always keep a backup of the WordPress database and files in case your export doesn't work as expected!<\/p>\n<\/blockquote>\n\n<h3>Working with Gatsby<\/h3>\n\n<p>If you're just getting started with Gatsby, we recommend experimenting with a Markdown based Gatsby starter like <a href=\"https:\/\/github.com\/tinacms\/tina-starter-grande\">Tina Grande<\/a>. Installation is as easy as:<\/p>\n\n<pre><code>git clone https:\/\/github.com\/tinacms\/tina-starter-grande.git\n\ncd tina-starter-grande\n\nyarn install &amp;&amp; gatsby develop\n<\/code><\/pre>\n\n<p>Then copy your exported WordPress Markdown into the <code>content<\/code> directory or point the wp gatsby-markdown-export command at the content directory.<\/p>\n\n<p>Want to port your WordPress or HTML theme to Gatsby? Checkout <a href=\"https:\/\/www.gatsbyjs.org\/docs\/porting-an-html-site-to-gatsby\/\">Porting an HTML Site to Gatsby<\/a> for tips.<\/p>\n\n<h3>Command Line Usage<\/h3>\n\n<p>The command line functionality uses WP-CLI to interact with WordPress. <a href=\"https:\/\/wp-cli.org\/#installing\">WP-CLI is easy to install<\/a> if you haven't already.<\/p>\n\n<p>Once it's installed, you can export content to a directory like this:<\/p>\n\n<pre><code>wp gatsby-markdown-export --directory=\/example\/gatsby-starter\/src\/content\n<\/code><\/pre>\n\n<p>All CLI arguments are optional.<\/p>\n\n\n\n\n  Option\n  Description\n  Default value\n\n\n\n\n  <code>--help<\/code>\n  get help\n  \n\n\n  <code>--directory=<\/code>\n  export output directory\n  random temp directory\n\n\n  <code>--post_types=<\/code>\n  post types to export, see: https:\/\/developer.wordpress.org\/reference\/classes\/wp_query\/#post-type-parameters\n  page,post\n\n\n  <code>--post_status=<\/code>\n  post status to export, see: https:\/\/developer.wordpress.org\/reference\/classes\/wp_query\/#status-parameters\n  any\n\n\n  <code>--fields_to_markdown=<\/code>\n  fields to convert to Markdown\n  excerpt\n\n\n  <code>--excluded_front_matter=<\/code>\n  fields to exclude from front matter\n  \n\n\n  <code>--post_date_format=<\/code>\n  format for post publish date, see: https:\/\/www.php.net\/manual\/en\/function.date.php\n  c\n\n\n  <code>--upload_dir=<\/code>\n  directory in the export to copy WordPress uploads\n  uploads\n\n\n  <code>--remap_fields=<\/code>\n  remap front matter field names, example: find1,replace1;find2,replace2\n  \n\n\n  <code>--fields_to_array=<\/code>\n  convert single value front matter fields to arrays\n  \n\n\n  <code>--include_private_fields=<\/code>\n  private post meta fields to include (they start with _)\n  \n\n\n  <code>--skip_copy_uploads<\/code>\n  flag, skips copying WordPress uploads to the export\n  \n\n\n  <code>--skip_original_images<\/code>\n  flag, skips the use of original dimension images\n  \n\n\n  <code>--skip_enforce_charset<\/code>\n  flag, skips use of blog_charset for the XML charset\n  \n\n\n  <code>--create_type_directory<\/code>\n  flag, creates directories based on post type\n\n<!--section=installation-->\n<ol>\n<li>Upload the plugin files to the <code>\/wp-content\/plugins\/plugin-name<\/code> directory, or install the plugin through the WordPress plugins screen directly.<\/li>\n<li>Activate the plugin through the 'Plugins' screen in WordPress<\/li>\n<li>Use the Settings-&gt;Export to Gatsby screen to export content<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt>What does `Warning: The markdown converter encountered invalid HTML and could not convert the content at:` mean?<\/dt>\n<dd><p>This means that the markdown converter couldn't convert the referenced post to markdown, so we will just copy the HTML as it is.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>0.3.3<\/h4>\n\n<ul>\n<li>Support including private post meta fields (like Yoast)<\/li>\n<\/ul>","raw_excerpt":"Export WordPress content to Markdown for GatsbyJS.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/kk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/115233","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/kk.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/kk.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=115233"}],"author":[{"embeddable":true,"href":"https:\/\/kk.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/mitchmac"}],"wp:attachment":[{"href":"https:\/\/kk.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=115233"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/kk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=115233"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/kk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=115233"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/kk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=115233"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/kk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=115233"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/kk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=115233"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}