├── .github └── workflows │ ├── check-dead-links.yml │ └── static.yml ├── .gitignore ├── .watchmanconfig ├── README.md ├── __init__.py ├── app.py ├── content └── index.md ├── data └── extensions.json ├── dead_links.py ├── htmx_extensions ├── __init__.py └── management │ ├── __init__.py │ └── commands │ ├── __init__.py │ └── build.py ├── new_official_extensions.py ├── output.json ├── output ├── extensions.json ├── index.html ├── rss.xml ├── sitemap.xml └── static │ ├── css │ └── mvp.css │ └── svg │ ├── check.svg │ └── x.svg ├── poetry.lock ├── pyproject.toml ├── sort_extensions.py ├── static └── svg │ ├── check.svg │ └── x.svg └── templates └── coltrane └── base.html /.github/workflows/check-dead-links.yml: -------------------------------------------------------------------------------- 1 | name: Check Dead Links 2 | 3 | on: 4 | push: 5 | workflow_dispatch: 6 | schedule: 7 | - cron: "0 12 * * 0" 8 | 9 | jobs: 10 | check-links: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - name: Checkout code 14 | uses: actions/checkout@v3 15 | 16 | - name: "Set up Python" 17 | uses: actions/setup-python@v3 18 | with: 19 | python-version: "3.x" 20 | 21 | - name: Check dead links 22 | run: python dead_links.py 23 | -------------------------------------------------------------------------------- /.github/workflows/static.yml: -------------------------------------------------------------------------------- 1 | # Simple workflow for deploying static content to GitHub Pages 2 | name: Deploy static content to Pages 3 | 4 | on: 5 | # Runs on pushes targeting the default branch 6 | push: 7 | branches: ["main"] 8 | 9 | # Allows you to run this workflow manually from the Actions tab 10 | workflow_dispatch: 11 | 12 | # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages 13 | permissions: 14 | contents: read 15 | pages: write 16 | id-token: write 17 | 18 | # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. 19 | # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. 20 | concurrency: 21 | group: "pages" 22 | cancel-in-progress: false 23 | 24 | jobs: 25 | # Single deploy job since we're just deploying 26 | deploy: 27 | environment: 28 | name: github-pages 29 | url: ${{ steps.deployment.outputs.page_url }} 30 | runs-on: ubuntu-latest 31 | steps: 32 | - name: Checkout 33 | uses: actions/checkout@v3 34 | - name: Setup Pages 35 | uses: actions/configure-pages@v3 36 | - name: Install Python dependencies 37 | run: | 38 | python -m pip install coltrane 39 | - name: Run Coltrane record 40 | run: |- 41 | coltrane record --force --threads 2 42 | env: 43 | COLTRANE_SITE_URL: ${{ vars.COLTRANE_SITE_URL }} 44 | ALLOWED_HOSTS: ${{ vars.ALLOWED_HOSTS }} 45 | COLTRANE_DESCRIPTION: ${{ vars.COLTRANE_DESCRIPTION }} 46 | COLTRANE_TITLE: ${{ vars.COLTRANE_TITLE }} 47 | DEBUG: ${{ vars.DEBUG }} 48 | - name: Upload artifact 49 | uses: actions/upload-pages-artifact@v2 50 | with: 51 | # Upload entire repository 52 | path: 'output' 53 | - name: Deploy to GitHub Pages 54 | id: deployment 55 | uses: actions/deploy-pages@v2 56 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | pip-wheel-metadata/ 24 | share/python-wheels/ 25 | *.egg-info/ 26 | .installed.cfg 27 | *.egg 28 | MANIFEST 29 | 30 | # PyInstaller 31 | # Usually these files are written by a python script from a template 32 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 33 | *.manifest 34 | *.spec 35 | 36 | # Installer logs 37 | pip-log.txt 38 | pip-delete-this-directory.txt 39 | 40 | # Unit test / coverage reports 41 | htmlcov/ 42 | .tox/ 43 | .nox/ 44 | .coverage 45 | .coverage.* 46 | .cache 47 | nosetests.xml 48 | coverage.xml 49 | *.cover 50 | *.py,cover 51 | .hypothesis/ 52 | .pytest_cache/ 53 | 54 | # Translations 55 | *.mo 56 | *.pot 57 | 58 | # Django stuff: 59 | *.log 60 | local_settings.py 61 | db.sqlite3 62 | db.sqlite3-journal 63 | 64 | # Flask stuff: 65 | instance/ 66 | .webassets-cache 67 | 68 | # Scrapy stuff: 69 | .scrapy 70 | 71 | # Sphinx documentation 72 | docs/_build/ 73 | 74 | # PyBuilder 75 | target/ 76 | 77 | # Jupyter Notebook 78 | .ipynb_checkpoints 79 | 80 | # IPython 81 | profile_default/ 82 | ipython_config.py 83 | 84 | # pyenv 85 | .python-version 86 | 87 | # pipenv 88 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 89 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 90 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 91 | # install all needed dependencies. 92 | #Pipfile.lock 93 | 94 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow 95 | __pypackages__/ 96 | 97 | # Celery stuff 98 | celerybeat-schedule 99 | celerybeat.pid 100 | 101 | # SageMath parsed files 102 | *.sage.py 103 | 104 | # Environments 105 | .env 106 | .venv 107 | env/ 108 | venv/ 109 | ENV/ 110 | env.bak/ 111 | venv.bak/ 112 | 113 | # Spyder project settings 114 | .spyderproject 115 | .spyproject 116 | 117 | # Rope project settings 118 | .ropeproject 119 | 120 | # mkdocs documentation 121 | /site 122 | 123 | # mypy 124 | .mypy_cache/ 125 | .dmypy.json 126 | dmypy.json 127 | 128 | # Pyre type checker 129 | .pyre/ 130 | 131 | .DS_Store 132 | .idea/ 133 | .idea/sonarlint/ -------------------------------------------------------------------------------- /.watchmanconfig: -------------------------------------------------------------------------------- 1 | { 2 | "ignore_dirs": ["node_modules"] 3 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Htmx Extensions 2 | 3 | [![Deploy static content to Pages](https://github.com/Tobi-De/htmx_extensions/actions/workflows/static.yml/badge.svg)](https://github.com/Tobi-De/htmx_extensions/actions/workflows/static.yml) 4 | 5 | A registry of htmx extensions, both official and third-party. 6 | 7 | Modify the `data/extensions.json` file to add or update an extension. -------------------------------------------------------------------------------- /__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tobi-De/htmx_extensions/c79d09ed7b34a9de8d5b4954768c997882077f24/__init__.py -------------------------------------------------------------------------------- /app.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from django.core.management import execute_from_command_line 4 | 5 | from coltrane import initialize 6 | 7 | wsgi = initialize( 8 | **{ 9 | "INSTALLED_APPS": ["htmx_extensions"], 10 | } 11 | ) 12 | 13 | if __name__ == "__main__": 14 | execute_from_command_line() 15 | -------------------------------------------------------------------------------- /content/index.md: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | {% for name, ext in data.extensions.items %} 19 | 20 | 21 | 22 | 33 | 36 | 37 | {% endfor %} 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 |
NameDescriptionCoreDownload
{{name}}{{ext.description}} 23 | {% if ext.is_official is True %} 24 |
25 | 26 |
27 | {% elif ext.is_official is False %} 28 |
29 | 30 |
31 | {% endif %} 32 |
34 | Download 35 |
NameDescriptionCoreDownload
48 | 49 | -------------------------------------------------------------------------------- /data/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "head-support": { 3 | "download_url": "https://unpkg.com/htmx-ext-head-support@2.0.0/head-support.js", 4 | "description": "Support for merging the head tag from responses into the existing documents head.", 5 | "doc_url": "https://github.com/bigskysoftware/htmx-extensions/blob/main/src/head-support/README.md", 6 | "is_official": true 7 | }, 8 | "idiomorph": { 9 | "download_url": "https://unpkg.com/idiomorph/dist/idiomorph-ext.min.js", 10 | "description": "An extension for using the morphdom library as the swapping mechanism in htmx.", 11 | "doc_url": "https://github.com/bigskysoftware/idiomorph#htmx", 12 | "is_official": true 13 | }, 14 | "htmx-1-compat": { 15 | "download_url": "https://unpkg.com/htmx-ext-htmx-1-compat@2.0.0/htmx-1-compat.js", 16 | "description": "Rolls back most of the behavioral changes of htmx 2 to the htmx 1 defaults. ", 17 | "doc_url": "https://github.com/bigskysoftware/htmx-extensions/blob/main/src/htmx-1-compat/README.md", 18 | "is_official": true 19 | }, 20 | "preload": { 21 | "download_url": "https://unpkg.com/htmx-ext-preload@2.0.0/preload.js", 22 | "description": "Preloads selected href and hx-get targets based on rules you control.", 23 | "doc_url": "https://github.com/bigskysoftware/htmx-extensions/blob/main/src/preload/README.md", 24 | "is_official": true 25 | }, 26 | "response-targets": { 27 | "download_url": "https://unpkg.com/htmx-ext-response-targets@2.0.0/response-targets.js", 28 | "description": "Allows to specify different target elements to be swapped when different HTTP response codes are received.", 29 | "doc_url": "https://github.com/bigskysoftware/htmx-extensions/blob/main/src/response-targets/README.md", 30 | "is_official": true 31 | }, 32 | "sse": { 33 | "download_url": "https://unpkg.com/htmx-ext-sse@2.0.0/sse.js", 34 | "description": "Uni-directional server push messaging via EventSource.", 35 | "doc_url": "https://github.com/bigskysoftware/htmx-extensions/blob/main/src/sse/README.md", 36 | "is_official": true 37 | }, 38 | "web-sockets": { 39 | "download_url": "https://unpkg.com/htmx-ext-ws@2.0.0/ws.js", 40 | "description": "Bi-directional connection to WebSocket servers.", 41 | "doc_url": "https://github.com/bigskysoftware/htmx-extensions/blob/main/src/ws/README.md", 42 | "is_official": true 43 | }, 44 | "no-cache": { 45 | "download_url": "https://github.com/craigharman/htmx-ext-no-cache/blob/master/no-cache.js", 46 | "description": "Bypass caching for selected HTMX requests.", 47 | "doc_url": "https://github.com/craigharman/htmx-ext-no-cache", 48 | "is_official": true 49 | }, 50 | "ajax-header": { 51 | "download_url": "https://unpkg.com/htmx-ext-ajax-header@2.0.1/ajax-header.js", 52 | "description": "Includes the commonly-used X-Requested-With header that identifies ajax requests in many backend frameworks.", 53 | "doc_url": "https://github.com/bigskysoftware/htmx-extensions/blob/main/src/ajax-header/README.md", 54 | "is_official": false 55 | }, 56 | "alpine-morph": { 57 | "download_url": "https://unpkg.com/htmx-ext-alpine-morph@2.0.0/alpine-morph.js", 58 | "description": "An extension for using the Alpine.js morph plugin as the swapping mechanism in htmx.", 59 | "doc_url": "https://github.com/bigskysoftware/htmx-extensions/blob/main/src/alpine-morph/README.md", 60 | "is_official": false 61 | }, 62 | "class-tools": { 63 | "download_url": "https://unpkg.com/htmx-ext-class-tools@2.0.0/class-tools.js", 64 | "description": "An extension for manipulating timed addition and removal of classes on HTML elements.", 65 | "doc_url": "https://github.com/bigskysoftware/htmx-extensions/blob/main/src/class-tools/README.md", 66 | "is_official": false 67 | }, 68 | "client-side-templates": { 69 | "download_url": "https://unpkg.com/htmx-ext-client-side-templates@2.0.0/client-side-templates.js", 70 | "description": "Support for client side template processing of JSON/XML responses.", 71 | "doc_url": "https://github.com/bigskysoftware/htmx-extensions/blob/main/src/client-side-templates/README.md", 72 | "is_official": false 73 | }, 74 | "debug": { 75 | "download_url": "https://unpkg.com/htmx-ext-debug@2.0.0/debug.js", 76 | "description": "An extension for debugging of a particular element using htmx.", 77 | "doc_url": "https://github.com/bigskysoftware/htmx-extensions/blob/main/src/debug/README.md", 78 | "is_official": false 79 | }, 80 | "event-header": { 81 | "download_url": "https://unpkg.com/htmx-ext-event-header@2.0.0/event-header.js", 82 | "description": "Includes a JSON serialized version of the triggering event, if any.", 83 | "doc_url": "https://github.com/bigskysoftware/htmx-extensions/blob/main/src/event-header/README.md", 84 | "is_official": false 85 | }, 86 | "include-vals": { 87 | "download_url": "https://unpkg.com/htmx-ext-include-vals@2.0.0/include-vals.js", 88 | "description": "Allows you to include additional values in a request.", 89 | "doc_url": "https://github.com/bigskysoftware/htmx-extensions/blob/main/src/include-vals/README.md", 90 | "is_official": false 91 | }, 92 | "json-enc": { 93 | "download_url": "https://unpkg.com/htmx-ext-json-enc@2.0.0/json-enc.js", 94 | "description": "Use JSON encoding in the body of requests, rather than the default x-www-form-urlencoded.", 95 | "doc_url": "https://github.com/bigskysoftware/htmx-extensions/blob/main/src/json-enc/README.md", 96 | "is_official": false 97 | }, 98 | "json-enc-custom": { 99 | "download_url": "https://github.com/Emtyloc/json-enc-custom/blob/main/json-enc-custom.js", 100 | "description": "This extension works similarly to json-enc but allows for very complex structures, such as embedding JSON objects, lists, or handling indexes, just by using the name attribute.", 101 | "doc_url": "https://github.com/Emtyloc/json-enc-custom/blob/main/README.md", 102 | "is_official": false 103 | }, 104 | "replace-params": { 105 | "download_url": "https://github.com/fanelfaa/htmx-ext-replace-params/blob/main/htmx-ext-replace-params.js", 106 | "description": "This extension uses request parameters to replace existing parameters. If given value is empty string ('') then parameter will be deleted. This extension will be usefull in situation like pagination, search that you only want to replace only few params instead of all.", 107 | "doc_url": "https://github.com/fanelfaa/htmx-ext-replace-params/blob/main/README.md", 108 | "is_official": false 109 | }, 110 | "loading-states": { 111 | "download_url": "https://unpkg.com/htmx-ext-loading-states@2.0.0/loading-states.js", 112 | "description": "Allows you to disable inputs, add and remove CSS classes to any element while a request is in-flight.", 113 | "doc_url": "https://github.com/bigskysoftware/htmx-extensions/blob/main/src/loading-states/README.md", 114 | "is_official": false 115 | }, 116 | "method-override": { 117 | "download_url": "https://unpkg.com/htmx-ext-method-override@2.0.0/method-override.js", 118 | "description": "Use the X-HTTP-Method-Override header for non-GET and POST requests.", 119 | "doc_url": "https://github.com/bigskysoftware/htmx-extensions/blob/main/src/method-override/README.md", 120 | "is_official": false 121 | }, 122 | "morphdom-swap": { 123 | "download_url": "https://unpkg.com/htmx-ext-morphdom-swap@2.0.0/morphdom-swap.js", 124 | "description": "An extension for using the morphdom library as the swapping mechanism in htmx.", 125 | "doc_url": "https://github.com/bigskysoftware/htmx-extensions/blob/main/src/morphdom-swap/README.md", 126 | "is_official": false 127 | }, 128 | "multi-swap": { 129 | "download_url": "https://unpkg.com/htmx-ext-multi-swap@2.0.0/multi-swap.js", 130 | "description": "Allows to swap multiple elements with different swap methods.", 131 | "doc_url": "https://github.com/bigskysoftware/htmx-extensions/blob/main/src/multi-swap/README.md", 132 | "is_official": false 133 | }, 134 | "path-deps": { 135 | "download_url": "https://unpkg.com/htmx-ext-path-deps@2.0.0/path-deps.js", 136 | "description": "An extension for expressing path-based dependencies similar to intercoolerjs.", 137 | "doc_url": "https://github.com/bigskysoftware/htmx-extensions/blob/main/src/path-deps/README.md", 138 | "is_official": false 139 | }, 140 | "path-params": { 141 | "download_url": "https://unpkg.com/htmx-ext-path-params@2.0.0/path-params.js", 142 | "description": "This extension uses request parameters to populate path variables.", 143 | "doc_url": "https://github.com/bigskysoftware/htmx-extensions/blob/main/src/path-params/README.md", 144 | "is_official": false 145 | }, 146 | "remove-me": { 147 | "download_url": "https://unpkg.com/htmx-ext-remove-me@2.0.0/remove-me.js", 148 | "description": "Allows you to remove an element after a given amount of time", 149 | "doc_url": "https://github.com/bigskysoftware/htmx-extensions/blob/main/src/remove-me/README.md", 150 | "is_official": false 151 | }, 152 | "restored": { 153 | "download_url": "https://unpkg.com/htmx-ext-restored@2.0.0/restored.js", 154 | "description": "Allows you to trigger events when the back button has been pressed.", 155 | "doc_url": "https://github.com/bigskysoftware/htmx-extensions/blob/main/src/restored/", 156 | "is_official": false 157 | }, 158 | "hx-take": { 159 | "download_url": "https://raw.githubusercontent.com/oriol-martinez/hx-take/main/dist/hx-take.min.js", 160 | "description": "An htmx extension that allows to select and swap existing elements.", 161 | "doc_url": "https://github.com/oriol-martinez/hx-take", 162 | "is_official": false 163 | }, 164 | "htmx-template": { 165 | "download_url": "https://raw.githubusercontent.com/KatrinaKitten/htmx-template/master/htmx-template.min.js", 166 | "description": "HTMX extension enabling it to retrieve the contents of