[WordPress] 外掛分享: Static Site Generator

首頁外掛目錄 › Static Site Generator
全新外掛
安裝啟用
尚無評分
113 天前
最後更新
問題解決
WordPress 6.6+ PHP 8.0+ v2.04 上架:2025-03-22

內容簡介

總結:這個外掛只支持使用 WP-CLI 命令行來執行,可以生成靜態站點、替換內容中的 URL 或字串、支援自訂文章類型等功能,並可從指定 URL 生成文件。

### 問題與答案:
- 這個外掛只支持哪種方式來執行?
- 只支持使用 WP-CLI 命令行。

- 這個外掛可以做什麼?
- 可以生成靜態站點、替換內容中的 URL 或字串、支援自訂文章類型等功能。

- 如果想要生成特定 URL 的文件,該如何執行?
- 使用 `wp static` 命令,並搭配 `--file` 參數及指定的原始 URL 來執行。

外掛標籤

開發者團隊

⬇ 下載最新版 (v2.04) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Static Site Generator」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Requires

This plugin only supports execution from the command line using WP-CLI.

Generate

Generated static site with WP-CLI command.
Replaces URLs or strings in content.
Supports custom post types.
Outputs the archive page for the year, month, and day.
Outputs category archives.
Outputs tag archives.
Outputs author archives.
Outputs feed.
Outputs categories feed.
Outputs tags feed.
Sitemap by default in WordPress.
Generates a file from a specified URL.

Copy

Copy the files that the following tags in the html read to the static site.




WP-CLI

1st argument(string) : /home/www/localhost.test : output path of full path
2nd argument(string) : https://localhost.test : url of output homepage
optional argument1(string) : --cb1="site.com" --ca1="localhost.test" : cb1 -> Original string | ca1 -> Changed string
optional argument2(string) : --cb2="/wordpress" --ca2="/" : cb2 -> Original string | ca2 -> Changed string
optional argument3(bool) : --s : Only arguments 4-7, which directly specify the URL and file name, are executed.
optional argument4(string) : --file1="ja/feed/index.xml" --orgurl1="https://site.com/ja/feed/" : file1 -> Output filename | orgurl1 -> Original url
optional argument5(string) : --file2="ja/category/whatsnew-ja/feed/index.xml" --orgur2="https://site.com/ja/category/whatsnew-ja/feed/" : file2 -> Output filename | orgurl2 -> Original url
optional argument6(string) : --file3="feed/googleimagesitemap/index.xml" --orgurl3="https://site.com/feed/googleimagesitemap/" : file3 -> Output filename | orgurl3 -> Original url
optional argument7(string) : --file4="feed/googlevideossitemap/index.xml" --orgur4="https://site.com/feed/googlevideossitemap/" : file4 -> Output filename | orgurl4 -> Original url

optional argument8(bool) : --c : Outputs file copy status to the console.

Example1 wp static /home/www/localhost.test https://localhost.test

Example2 wp static /home/www/localhost.test https://localhost.test --cb1="site.com" --ca1="localhost.test" --cb2="/wordpress" --ca2="/"
In the html or xml, the original home page is converted to “https://localhost.test”, “site.com” is converted to “localhost.test”, and “/wordpress” is converted to “/”.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon