{"id":31566236,"url":"https://github.com/a-nau/password-protected-website-template","last_synced_at":"2025-10-05T07:27:21.806Z","repository":{"id":46883503,"uuid":"512452513","full_name":"a-nau/password-protected-website-template","owner":"a-nau","description":"Template to create and host a simple password-protected website with Github Pages. ","archived":false,"fork":false,"pushed_at":"2024-12-04T18:00:48.000Z","size":3732,"stargazers_count":47,"open_issues_count":0,"forks_count":16,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-12-04T19:18:27.253Z","etag":null,"topics":["encryption","github-pages","password-protected","website","website-template"],"latest_commit_sha":null,"homepage":"https://a-nau.github.io/password-protected-website-template/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/a-nau.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2022-07-10T14:13:39.000Z","updated_at":"2024-12-04T18:00:52.000Z","dependencies_parsed_at":"2024-06-24T00:19:29.705Z","dependency_job_id":"4146bcfe-c59b-4d7f-aac8-faa82d72f0c7","html_url":"https://github.com/a-nau/password-protected-website-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/a-nau/password-protected-website-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-nau%2Fpassword-protected-website-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-nau%2Fpassword-protected-website-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-nau%2Fpassword-protected-website-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-nau%2Fpassword-protected-website-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/a-nau","download_url":"https://codeload.github.com/a-nau/password-protected-website-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-nau%2Fpassword-protected-website-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278424888,"owners_count":25984679,"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","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["encryption","github-pages","password-protected","website","website-template"],"created_at":"2025-10-05T07:27:20.744Z","updated_at":"2025-10-05T07:27:21.799Z","avatar_url":"https://github.com/a-nau.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Template for Encrypted Single Page Website\n\nThis template repository makes it easy to create a password protected page that is hosted on Github pages.\nThis can be useful for information or events that should not be available to everyone, e.g. for your birthday, wedding or a corporate event.\n\nTo check the [demo](https://a-nau.github.io/password-protected-website-template) use the password `test`.\n\n![Demo](assets/hidden/demo.gif)\n\n**Disclaimer**: Please be aware, that I (or the dependencies) might have missed something, so do not assume this to be bullet proof. Do not share bank information or similar this way.\n\n## Usage\n\n- [Create a repository from a template](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template) by clicking the `use this template` button\n- Select a repository name (your URL will be `{GITHUB-ACCOUNT-NAME}.github.io/{REPOSITORY-NAME}`)\n- Choose the repository to be **private**, if you don't want people to be able to access the contents without the password\n- [Create a Github secret](https://docs.github.com/en/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository) named `DECRYPTION_PASSPHRASE` and set the `value` to your desired password (note that the CI pipeline will fail on the first attempt due to the missing password)\n- [Set the publishing source](https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#choosing-a-publishing-source) to the `main` branch in order to activate hosting with Github Pages\n\nTo customize the website:\n\n- You can customize the login page\n\n  - adjust the [encrypt_with_assets.yml](.github/workflows/encrypt_with_assets.yml), i.e. the \"Encrypt index\" step to set the title, instructions and button name\n\n    ```yaml\n    - name: Encrypt index\n      run: \u003e\n        staticrypt index.html -p ${{ secrets.DECRYPTION_PASSPHRASE }} --short\n        --template \"password_template.html\"\n        --template-title \"Login\"\n        --template-instructions \"This is a test website, use the password 'test' to enter.\"\n        --template-button \"Open Page\"\n        --template-color-primary \"#113e9f\"\n        --template-color-secondary \"#e4e4e4\"\n    ```\n\n  - For details and to change the full layout, see [StatiCrypt](https://github.com/robinmoisson/staticrypt)\n\n- Edit the `main.html` which will be shown to visitors after encryption (the encrypted version, that is hosted is `index.html`)\n  - Assets can be used as usual and will not be encrypted\n\n### Encrypted Assets\n\nBy default encryption of assets is enabled, since the workflow [`encrypt_with_assets.yml`](.github/workflows/encrypt_with_assets.yml) is active.\nNote, this only replaces all directly linked images, CSS and JavaScript file in the HTML document with an in-place base64 representation.\nThus, your relative links in files will probably not work anymore, since their location changed.\n\nIf you do not want to encrypt assets \n- remove the asset folder from the `exclude`s of the [`_config.yml`](_config.yml),\n- [`encrypt_with_assets.yml`](.github/workflows/encrypt_with_assets.yml) to `encrypt_with_assets._yml`, and \n- rename [`encrypt_without_assets._yml`](.github/workflows/encrypt_without_assets.yml) to `encrypt_with_assets.yml` \n\n\n### Local Usage\n\nIf you don't want to have any of your data (even) in a private repository you can also convert it locally and only upload the `index.html` afterwards.\nTo do this, follow these steps:\n\n- Build the image\n  ```\n  docker build -t ppw .\n  ```\n- Run the encryption\n  ```\n  docker run -it --rm --name ppw -e PASSWORD=test --mount type=bind,source=${PWD},target=/code ppw\n  ```\n- Ignore changes to `main.html`\n  ```\n  git update-index --skip-worktree main.html\n  ```\n  Optionally the same is needed for your assets.\n\n## Credits\n\n- The encryption is made by [StatiCrypt](https://github.com/robinmoisson/staticrypt): [MIT](https://github.com/robinmoisson/staticrypt/blob/main/LICENSE) License\n- We use the [workflow](https://github.com/Jack-alope/staticrypt-github-actions/blob/main/.github/workflows/encrypt.yml) from [staticrypt-github-actions](https://github.com/Jack-alope/staticrypt-github-actions) as a basis: [MIT](https://github.com/Jack-alope/staticrypt-github-actions/blob/main/LICENSE) License\n- We use [Bootstrap](https://getbootstrap.com/), including one of their [examples](https://getbootstrap.com/docs/4.0/examples/) ([demo](https://getbootstrap.com/docs/4.0/examples/cover/#)): [MIT](https://github.com/twbs/bootstrap/blob/main/LICENSE) License\n- We use code from [six-four](https://github.com/chrissimpkins/six-four/tree/master) to determine image MIME types: [MIT](https://github.com/chrissimpkins/six-four/blob/master/LICENSE) License\n- We use the [Github CSS Ribbon](https://github.com/simonwhitaker/github-fork-ribbon-css): [MIT ](https://github.com/simonwhitaker/github-fork-ribbon-css/blob/gh-pages/LICENSE) License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa-nau%2Fpassword-protected-website-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fa-nau%2Fpassword-protected-website-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa-nau%2Fpassword-protected-website-template/lists"}