{"id":37402471,"url":"https://github.com/svandragt/htmxpress","last_synced_at":"2026-01-16T05:47:41.923Z","repository":{"id":55098608,"uuid":"522880733","full_name":"svandragt/htmxpress","owner":"svandragt","description":"WIP plugin to power WordPress with HTMX","archived":false,"fork":false,"pushed_at":"2025-06-04T13:13:02.000Z","size":67,"stargazers_count":137,"open_issues_count":5,"forks_count":6,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-10-09T11:55:46.775Z","etag":null,"topics":["htmx","prototype","wordpress","wordpress-plugin"],"latest_commit_sha":null,"homepage":"","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/svandragt.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-08-09T09:17:42.000Z","updated_at":"2025-09-02T15:43:54.000Z","dependencies_parsed_at":"2025-06-04T10:45:11.021Z","dependency_job_id":"dd3fe094-7cda-4c0f-bf8c-199ebc4bb4ec","html_url":"https://github.com/svandragt/htmxpress","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/svandragt/htmxpress","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svandragt%2Fhtmxpress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svandragt%2Fhtmxpress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svandragt%2Fhtmxpress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svandragt%2Fhtmxpress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/svandragt","download_url":"https://codeload.github.com/svandragt/htmxpress/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svandragt%2Fhtmxpress/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28477404,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T03:13:13.607Z","status":"ssl_error","status_checked_at":"2026-01-16T03:11:47.863Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["htmx","prototype","wordpress","wordpress-plugin"],"created_at":"2026-01-16T05:47:41.483Z","updated_at":"2026-01-16T05:47:41.908Z","avatar_url":"https://github.com/svandragt.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HTMXpress\n\n[HTMX](https://htmx.org/) for WordPress!\n\nBy using the [Rewrite Endpoints API](https://make.wordpress.org/plugins/2012/06/07/rewrite-endpoints-api/) to create a\ncustom endpoint; and a bit of custom template logic, we can output a serverside partial or custom theme template.\n\nUsing this setup, WordPress can leverage HTML over the wire solutions such as HTMX.\n\nHTMX then allows us to do dynamic serverside based rendering; live search and other features without the overhead and\ncomplexity of reactive JavaScript frameworks, whilst benefiting from trusted object and full page caching solutions.\nThis repository is exploring the opportunities.\n\n## Demo\n\n1. Activate plugin (or run `wp-env start` to spin up a WP environment with the plugin activated).\n2. go to `/htmx` (Endpoint test)\n3. go to `/htmx/ascii` and `/html/partial-ascii` (template loader test)\n4. Inspect html source of theme (enqueued script test)\n5. go to `/htmx/demo`\n\nWhat else can you do?\n\n- CSS Transitions https://htmx.org/docs/#css_transitions\n- Boosting https://htmx.org/docs/#boosting\n- Polling + Server Sent Events https://htmx.org/docs/#sse\n- Progressbars (eg serverside file upload processing) https://htmx.org/examples/progress-bar/\n- More examples https://htmx.org/examples/\n\n## Screencast of Demo\n\nhttps://user-images.githubusercontent.com/594871/183612860-b2eb29f7-cfa0-4de1-97fc-b2a5f393cfd2.mp4\n\n# Project use\n\n1. __By default HTMX is loaded from an external CDN__. While the CDN approach is extremely simple, you may want\n   to [consider not using CDNs in production](https://blog.wesleyac.com/posts/why-not-javascript-cdn): Download a \n   [minified copy of htmx](https://unpkg.com/htmx.org/dist/htmx.min.js) and put it into\nthe `mytheme/third-party/` folder so WordPress can find it, updating the version number.\n\n```php\n# mytheme/functions.php\nconst PRIORITY_AFTER_HTMX = 20;\nadd_action( 'wp_enqueue_scripts', function() {\n    wp_dequeue_script( 'htmx');\n    wp_enqueue_script( 'htmx', trailingslashit( dirname( __FILE__ ) ) . 'third-party/htmx.min.js', '', '1.9.2' );\n}, PRIORITY_AFTER_HTMX );\n```\n\n\n2. __Add your own templates to the htmx endpoint__: Here's how to add to the template paths to point to your site's templates. The demo HTMXpress templates are only registered if the filter is unused:\n\n```php\n# mytheme/functions.php\nadd_filter( 'htmx.template_paths', static function ( $paths ) {\n\t$paths[] = __DIR__ . '/templates';\n\n\treturn $paths;\n} );\n\n# A template mytheme/templates/example.php will then be accessible from `/htmx/example`\n```\n\n# See Also\n\n- [HTMXpress Serverside Block](https://github.com/svandragt/htmxpress-serverside-block/) A scaffolded serverside block HTMXpress implementation example.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvandragt%2Fhtmxpress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsvandragt%2Fhtmxpress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvandragt%2Fhtmxpress/lists"}