Static Site Generator

Descripziun

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 and month.
  • Outputs a category archive page.
  • 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.
<a href="...">
<img src="...">
<img srcset="...">
<video src="...">
<audio src="...">
<link href="...">
<script src="...">
<iframe src="...">

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="feed/index.xml" --orgurl1="https://site.com/feed/" : file1 -> Output filename | orgurl1 -> Original url
  • optional argument5(string) : --file2="ja/feed/index.xml" --orgur2="https://site.com/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

  • 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 „/“.

  • Example3 wp static /home/www/localhost.test https://localhost.test --file="feed/index.xml" --orgurl="https://site.com/feed/"
    Retrieve https://site.com/feed/ and generate https://localhost.test/feed/index.xml.

Maletgs dal visur

  • WP-CLI help screen
  • WP-CLI execution screen

Installaziun

  1. Upload static-site-generator directory to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‚Plugins‘ menu in WordPress

FAQ

none

Reviews

There are no reviews for this plugin.

Contributors & Developers

“Static Site Generator” is open source software. The following people have contributed to this plugin.

Contributors

“Static Site Generator” has been translated into 1 locale. Thank you to the translators for their contributions.

Translate “Static Site Generator” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

[1.04] 2025/03/28

  • Fix – Handling of redirects.

[1.03] 2025/03/27

  • Fix – Problems getting the srcset attribute.

[1.02] 2025/03/26

  • Fix – Handling of redirects.

[1.01] 2025/03/25

  • Fix – Problems getting the srcset attribute.

[1.00] 2025/03/23

Initial release.