{"id":25418814,"url":"https://github.com/pyvec/elsa","last_synced_at":"2025-10-31T09:31:42.985Z","repository":{"id":56530640,"uuid":"65985710","full_name":"pyvec/elsa","owner":"pyvec","description":"Helper module for hosting Frozen-Flask based websites on GitHub pages","archived":false,"fork":false,"pushed_at":"2020-10-02T16:49:09.000Z","size":121,"stargazers_count":30,"open_issues_count":15,"forks_count":49,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-02-16T13:44:07.944Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pyvec.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-08-18T09:47:58.000Z","updated_at":"2025-02-08T04:19:08.000Z","dependencies_parsed_at":"2022-08-15T20:30:40.420Z","dependency_job_id":null,"html_url":"https://github.com/pyvec/elsa","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyvec%2Felsa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyvec%2Felsa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyvec%2Felsa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyvec%2Felsa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pyvec","download_url":"https://codeload.github.com/pyvec/elsa/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239174859,"owners_count":19594667,"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-02-16T18:28:14.137Z","updated_at":"2025-10-31T09:31:41.426Z","avatar_url":"https://github.com/pyvec.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"elsa\n====\n\nElsa will help you build your `Frozen-Flask \u003chttp://pythonhosted.org/Frozen-Flask/\u003e`_ based website and deploy it to GitHub pages.\nIt's based on scripts from `PyLadies.cz repo \u003chttps://github.com/PyLadiesCZ/pyladies.cz\u003e`_ and is distributed under the terms of the MIT license, see LICENSE (does not apply for the image below). It requires Python 3.\n\n.. figure:: https://raw.githubusercontent.com/pyvec/elsa/master/logo/elsa.png\n   :alt: Elsa\n\n\nBasic usage\n-----------\n\nCreate you Flask app and give it to ``elsa.cli()``:\n\n.. code-block:: python\n\n    from flask import Flask\n\n    app = Flask(...)\n\n    # do stuff with app\n\n    if __name__ == '__main__':\n        from elsa import cli\n        cli(app, base_url='https://example.com')\n\nThis will add command line interface to the script, enabling you to use it like this:\n\n.. code-block:: bash\n\n    python foo.py serve  # serves the site, no freezing, so you can check it quickly\n    python foo.py freeze  # freezes the site, i.e. makes a HTML snapshot\n    python foo.py deploy  # deploys the frozen site to GitHub pages\n\nSee more options with ``--help``.\n\nFollow the `quickstart tutorial\n\u003chttps://github.com/pyvec/elsa/blob/master/QUICKSTART.rst\u003e`_\nfor more information.\n\nTravis CI based deployment\n--------------------------\n\nTravis CI is (in this context) a tool, that allows you to deploy the site automatically to GitHub pages after every push.\nAll you have to do is tell Travis to run Elsa and provide a GitHub token.\nElsa on Travis will freeze the site and deploy it frozen to GitHub pages.\nElsa knows it's being run on Travis and will use the provided GitHub token to gain push permissions.\nElsa will push force to ``gh-pages`` branch in a single commit rewriting the history and all manual changes of that branch.\n\nHere is an example ``.travis.yml`` file for automatic deployment. It assumes elsa and other requirements are in ``requirements.txt`` and that you are familiar with Travis CI (so it's not very verbose):\n\n.. code-block:: yaml\n\n    language: python\n    python:\n        - '3.6'\n    script:\n        - 'python foo.py freeze'\n    env:\n      global:\n        - secure: \"blahblah\"  # gem install travis; travis encrypt GITHUB_TOKEN=xyz --add\n    deploy:\n        provider: script\n        skip_cleanup: true\n        script: 'python foo.py deploy --no-freeze --push'\n        on:\n            branch: master\n            repo: only/yours\n\nTesting\n-------\n\nTo run the test suite, install `tox \u003chttp://tox.readthedocs.io/\u003e`_ and run it::\n\n    tox\n\nElsa uses pytest, so if you are familiar with it, feel free to run  it directly.\n\n\n\nFurther notes\n-------------\n\nURLs\n~~~~\n\nWhen you use URLs without trailing slash (e.g. ``https://example.com/foobar``), GitHub pages would serve the pages with bad Content-Type header\n(``application/octet-stream`` instead of ``text/html``) and the browser would attempt to download it.\nThat's why Elsa will not allow such thing and will treat ``MimetypeMismatchWarning`` from Frozen-Flask as error.\nMake sure to use URLs with trailing slash (e.g. ``https://example.com/foobar/``) instead, so Frozen-Flask will create ``index.html`` in a folder and GitHub pages will use proper content type.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyvec%2Felsa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpyvec%2Felsa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyvec%2Felsa/lists"}