前言介紹
- 這款 WordPress 外掛「WP Gatsby Markdown Exporter」是 2020-01-05 上架。
- 目前有 100 個安裝啟用數。
- 上一次更新是 2020-01-16,距離現在已有 1934 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 4.6 以上版本才可以安裝。
- 外掛要求網站主機運作至少需要 PHP 版本 5.6 以上。
- 有 2 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
mitchmac |
外掛標籤
export | gatsby | jamstack | markdown |
內容簡介
這個外掛可以建立包含已轉換為 Markdown 格式的文章的 zip 檔案。此外,還可以使用 WP-CLI 命令進行網站的大量內容匯出。其他的功能包括:
- 將 WordPress 內容轉換為 Gatsby 友好的 Markdown。
- 自訂匯出!可以重新映射和重組匯出的欄位。
- CLI:使用 WP-CLI 進行命令行操作,避免 PHP 超時問題。
- CLI:匯出進度條(非常適用於大型網站)!
提醒:匯出內容前,請務必備份 WordPress 的資料庫和檔案,以防匯出不如預期。
與 Gatsby 合作:
如果您剛開始使用 Gatsby,建議嘗試使用基於 Markdown 的 Gatsby 起始器,如 Tina Grande。安裝過程非常簡單,只要複製匯出的 WordPress Markdown 到 content 目錄,或者將 wp gatsby-markdown-export 命令指向 content 目錄即可。
如果您想將 WordPress 或 HTML 主題移植到 Gatsby,可以查看 "Porting an HTML Site to Gatsby" 以獲取更多提示。
命令行使用:
命令行功能使用 WP-CLI 與 WordPress 進行交互。如果您尚未安裝 WP-CLI,可以輕鬆安裝。
安裝完成後,可以像這樣將內容匯出到目錄:
wp gatsby-markdown-export --directory=/example/gatsby-starter/src/content
所有命令行參數均為可選。詳細的參數說明如下:
原文外掛簡介
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.
Move WordPress content to Gatsby-friendly Markdown.
Customize the export! Remap and restructure exported fields.
CLI: Avoid PHP timeouts by using the command line with WP-CLI.
CLI: Export progress bar (great for large sites)!
Reminder: always keep a backup of the WordPress database and files in case your export doesn’t work as expected!
Working with Gatsby
If you’re just getting started with Gatsby, we recommend experimenting with a Markdown based Gatsby starter like Tina Grande. Installation is as easy as:
git clone https://github.com/tinacms/tina-starter-grande.git
cd tina-starter-grande
yarn install && gatsby develop
Then copy your exported WordPress Markdown into the content directory or point the wp gatsby-markdown-export command at the content directory.
Want to port your WordPress or HTML theme to Gatsby? Checkout Porting an HTML Site to Gatsby for tips.
Command Line Usage
The command line functionality uses WP-CLI to interact with WordPress. WP-CLI is easy to install if you haven’t already.
Once it’s installed, you can export content to a directory like this:
wp gatsby-markdown-export --directory=/example/gatsby-starter/src/content
All CLI arguments are optional.
Option
Description
Default value
--help
get help
--directory=
export output directory
random temp directory
--post_types=
post types to export, see: https://developer.wordpress.org/reference/classes/wp_query/#post-type-parameters
page,post
--post_status=
post status to export, see: https://developer.wordpress.org/reference/classes/wp_query/#status-parameters
any
--fields_to_markdown=
fields to convert to Markdown
excerpt
--excluded_front_matter=
fields to exclude from front matter
--post_date_format=
format for post publish date, see: https://www.php.net/manual/en/function.date.php
c
--upload_dir=
directory in the export to copy WordPress uploads
uploads
--remap_fields=
remap front matter field names, example: find1,replace1;find2,replace2
--fields_to_array=
convert single value front matter fields to arrays
--include_private_fields=
private post meta fields to include (they start with _)
--skip_copy_uploads
flag, skips copying WordPress uploads to the export
--skip_original_images
flag, skips the use of original dimension images
--skip_enforce_charset
flag, skips use of blog_charset for the XML charset
--create_type_directory
flag, creates directories based on post type
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「WP Gatsby Markdown Exporter」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
延伸相關外掛(你可能也想知道)
Simply Static – The WordPress Static Site Generator 》Simply Static 是一個靜態網站生成器,可以將現有的 WordPress 網站轉換為靜態網站,並放置在您的伺服器、靜態主機提供者或 CDN 上。它可以大幅改善您網站的...。
WPGatsby 》, , , , , , WPGatsby 是一個免費的開源 WordPress 外掛,可將你的 WordPress 網站優化為 Gatsby 的資料來源。, 此外,此外掛必須與 gatsby-source-w...。
Headless Mode 》Headless 模式為所有嘗試訪問網站的用戶設置重定向。僅允許訪問 REST API、WP GraphQL API 或任何已登錄的用戶嘗試訪問無頭安裝以編輯或創建文章的請求。。
JAMstack Deployments 》請參考 Github 的存儲庫crgeary/wp-jamstack-deployments以獲取使用指南,以及技術支援。。
Jamstack Preview and Deployments 》此外掛讓您可以從 WordPress 管理介面預覽 JAMstack 網站並從 WordPress 管理介面開始建置。, 注意:此外掛並不會自動使您的 Web 應用程式預覽功能運作。您仍...。
Generate WpGraphql Image DataUrl 》此外掛在 WPGraphQL 中生成 MediaItem 的 DataUrl。, 這是 awsome WPGraphQL 外掛 (https://github.com/wp-graphql/wp-graphql) 的擴充功能,可以生成 MediaI...。
VueFront PWA & SPA 》VueFront 是一個現代化的前端框架,可使任何 WordPress 和 Woocommerce 網站成為快速的單頁應用程序 (SPA) 和漸進式 Web App (PWA)。, DEMO: VueFront Web Ap...。
Sitesauce 》這個外掛讓你能夠將 WordPress 站點與 Sitesauce 整合,每當你的內容更新時都會通知 Sitesauce 建立掛鉤。要使用這個外掛,你需要先擁有 Sitesauce 帳號。 。
QuantCDN 》QuantCDN 是專門為靜態網頁製作的 CDN。此外掛程式作為靜態網站產生器,讓您輕鬆地透過單一點擊來推送整個 WordPress 網站的靜態副本。任何進行中的內容更改...。
WP Spark Connector 》如果您喜歡這個外掛,那麼考慮檢查我們的其他項目:, , WidgetKit For Elementor – 最先進和功能強大的 Elementor 外掛套件,通過添加更多元素和佈局增...。
JAMStackPress 》JAMStackPress – 提升你的 WordPress 後端功能, 這個外掛程式透過擴展 WP-JSON API,在 WP-JSON API 回應中新增一組有用的欄位,讓你的前端開發更容易...。