leonstafford / static-html-output
WordPress Static HTML Output Plugin.
Installs: 31
Dependents: 0
Suggesters: 0
Security: 0
Stars: 125
Watchers: 9
Forks: 34
Type:wordpress-plugin
Requires
- php: >=7.3
- guzzlehttp/guzzle: ^6.5
- pear/net_url2: ^2.1.2
- sabberworm/php-css-parser: ^8.3.0
Requires (Dev)
- dev-develop
- 6.6.23
- 6.6.22
- 6.6.21
- 6.6.20
- 6.6.19
- 6.6.18
- 6.6.17
- 6.6.16
- 6.6.15
- 6.6.14
- 6.6.13
- 6.6.12
- 6.6.10
- 6.6.9
- 6.6.8
- dev-dependabot/composer/guzzlehttp/psr7-1.9.1
- dev-dependabot/composer/guzzlehttp/guzzle-6.5.8
- dev-master
- dev-winpath_fix
- dev-handle_update
- dev-infinite-crawl
- dev-progress
- dev-unicode-filename-support
- dev-logo
- dev-debug-doc-offline-urls
- dev-dev_staging_production_ui
This package is auto-updated.
Last update: 2024-11-20 00:46:41 UTC
README
WordPress plugin to generate a static copy of your site and deploy to GitHub Pages, S3, Netlify, etc. Increase security, pageload speed and hosting options. Connect WordPress into your CI/CD workflow.
Other WordPress SSGs I mantain
WP-CLI commands
wp statichtmloutput COMMAND
Where COMMAND
can be any of:
options
generate
deploy
deploy_cache
Get help for any command by appending --help
Hooks
Modify the initial list of URLs to crawl
statichtmloutput_modify_initial_crawl_list
- Filter hook
signature
apply_filters( 'statichtmloutput_modify_initial_crawl_list', $url_queue );
example usage
function add_additional_urls( $url_queue ) { $additional_urls = [ 'http://mydomain.com/custom_link_1/', 'http://mydomain.com/custom_link_2/', ]; $url_queue = array_merge( $url_queue, $additional_urls ); return $url_queue; } add_filter( 'statichtmloutput_modify_initial_crawl_list', 'add_additional_urls' );
Post-deployment hook
statichtmloutput_post_deploy_trigger
- Action hook
signature
do_action( 'statichtmloutput_post_deploy_trigger', $archive );
example usage
function printArchiveInfo( $archive ) { error_log( print_r( $archive, true ) ); } add_filter( 'statichtmloutput_post_deploy_trigger', 'printArchiveInfo' );
example response
Archive Object
(
[settings] => Array
(
[selected_deployment_option] => github
[baseUrl] => https://leonstafford.github.io/demo-site-wordpress-static-html-output/
[wp_site_url] => http://example.test/
[wp_site_path] => /srv/www/example.com/current/web/wp/
[wp_uploads_path] => /srv/www/example.com/current/web/app/uploads
[wp_uploads_url] => http://example.test/app/uploads
[wp_active_theme] => /wp/wp-content/themes/twentyseventeen
[wp_themes] => /srv/www/example.com/current/web/app/themes
[wp_uploads] => /srv/www/example.com/current/web/app/uploads
[wp_plugins] => /srv/www/example.com/current/web/app/plugins
[wp_content] => /srv/www/example.com/current/web/app
[wp_inc] => /wp-includes
[crawl_increment] => 1
)
[path] => /srv/www/example.com/current/web/app/uploads/wp-static-html-output-1547668758/
[name] => wp-static-html-output-1547668758
[crawl_list] =>
[export_log] =>
)
Contributing / development
Contributions are very much welcome! Please don't be intimidated to file an issue, create a Pull Request or email me (Leon) me@ljs.dev.
Developing
git clone git@github.com:WP2Static/static-html-output.git
cd static-html-output
composer install
composer test
composer coverage
(optional coverage generation, requires Xdebug)
Building an install .zip file
composer build INSTALLER_FILENAME
This will create the installer and place in your $HOME/Downloads
directory.
On Windows, you will need the zip
utility available to build an installer. I recommend using Git Bash shell and then manually installing the zip utility as per these instructions
Localisation / translations
Localisation within the plugin isn't supported. Rather, it's recommended to use a browser extension if you need help translating the UI or you can run our documentation pages through any translation service.
Support
Please raise an issue here on GitHub or on the plugin's support forum.