{"id":29150087,"url":"https://github.com/humanmade/static-page","last_synced_at":"2025-06-30T23:09:26.070Z","repository":{"id":14062970,"uuid":"75684064","full_name":"humanmade/Static-Page","owner":"humanmade","description":"Static Page offloading","archived":false,"fork":false,"pushed_at":"2024-07-31T03:02:41.000Z","size":68,"stargazers_count":40,"open_issues_count":3,"forks_count":4,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-06-30T16:14:56.740Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/humanmade.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-06T01:54:58.000Z","updated_at":"2025-03-21T16:06:13.000Z","dependencies_parsed_at":"2022-07-21T00:28:55.040Z","dependency_job_id":null,"html_url":"https://github.com/humanmade/Static-Page","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/humanmade/Static-Page","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humanmade%2FStatic-Page","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humanmade%2FStatic-Page/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humanmade%2FStatic-Page/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humanmade%2FStatic-Page/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/humanmade","download_url":"https://codeload.github.com/humanmade/Static-Page/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humanmade%2FStatic-Page/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262864197,"owners_count":23376458,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-30T23:09:24.119Z","updated_at":"2025-06-30T23:09:26.041Z","avatar_url":"https://github.com/humanmade.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Static Page Generator for WordPress\n\nExport / save static copies of all your WordPress URLs.\n\nThis plugin is very specific in what it offers, that is - saving (almost) all URLs that can be publicly viewed\non a WordPress site to another directory. This can be used in conjunction with different Stream Wrappers to\nupload to locations on S3, FTP etc.\n\nThe plugin essentials works like so:\n\n1. Get all the URLs that exist on the site via `get_posts`, `get_terms` etc etc.\n1. Generate the public markup from each URL.\n1. Perform any replacements on the content such as transforming URLs.\n1. Save the pages to a directory, preserving the original path.\n\nThis can be triggered via WP CLI Commands, or via cron when content on the WordPress site is updated.\n\n### WP CLI Commands\n\n**Get the output of a single page, for testing**\n\n```bash\nwp static-page output http://wordpress.dev/ [--replace-from=\u003cfrom\u003e] [--replace-to=\u003cto\u003e]\n```\n\n**List all URLs that Static Page knows about**\n\n```bash\nwp static-page urls\n```\n\n**Save the site to static files**\n\n```bash\nwp static-page save [--replace-from=\u003cfrom\u003e] [--replace-to=\u003cto\u003e]\n```\n\n**List all assets that Static Page knows about**\n\n```bash\nwp static-page assets\n```\n\n**Save all assets out**\n\n```bash\nwp static-page save-assets\n```\n\n### Configuration\n\nStatic Page is meant to be require little configuration, in the case than you _do_ need to configure this, you can use\nthe following hooks:\n\n**Add / remove URLs that are generated**\n\n```php\nadd_filter( 'static_page_site_urls', function ( $urls ) {\n\t$urls[] = site_url( '/my-hidden-url/' );\n\treturn $urls;\n});\n```\n\n**Make custom URL replacements on the contents of pages**\n\n```php\nadd_filter( 'static_page_replace_urls_in_content', function ( $page_markup ) {\n\treturn str_replace( site_url(), 'https://my-cdn.example.com/', $page_markup );\n});\n```\n\n**Add / remove assets directories to be copied on `save-assets`**\n\nAll files of type `jpg`, `css`, `js`, `png`, `gif` will be copied from the directories.\n\n```php\nadd_filter( 'static_page_assets_dirs', function ( $dirs ) {\n\t$dirs[] = plugin_dir( 'akismet' );\n\treturn $dirs;\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhumanmade%2Fstatic-page","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhumanmade%2Fstatic-page","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhumanmade%2Fstatic-page/lists"}