HTMLStarter

password-protected-website-template — HTML Starter Template

By a-nau

A static single-page website template based on StatiCrypt and GitHub Pages that encrypts index.html with a password at build time via GitHub Actions, requiring visitors to enter a password to view content.

Explore the design

Compare the page layouts and mobile experience. Open any screenshot for a closer look.

2 previews
Desktop homepage1 / 2
Desktop captureTop of page

Actual screenshot captured by the server browser.

All pages & views 2

Screenshots show visual appearance; interactive behavior may differ.

Recorded 2026-10-02View source

What stands out

A quick read of the recorded project description.

01

Uses StatiCrypt to password-encrypt a single-page HTML, requiring visitors to enter a password before viewing content

02

Automatically encrypts and publishes to GitHub Pages at build time via GitHub Actions

03

The login page title, description, button text, and primary color can be configured in the workflow

04

By default, images, CSS, and JavaScript directly referenced in the HTML are inlined as base64 and encrypted together

05

Supports local encryption with Docker, uploading only the generated index.html

Template Details

This template is used to publish a simple single-page website on GitHub Pages that requires a password to access, suitable for information pages that should only be seen by a specific group, such as birthdays, weddings, or company events. Encryption is handled by StatiCrypt: main.html in the repository is the plaintext source file, and a GitHub Actions workflow encrypts it into index.html at build time using a password from a repository Secret and publishes it. When visitors open the page, they first see a login page and only after entering the correct password is the content decrypted and displayed.

To use it, create a repository from the template, set the publishing source to the main branch, and create a Secret named DECRYPTION_PASSPHRASE as the password; if you do not want people to bypass the password to access repository contents, you can set the repository to private. The login page title, description text, button name, and primary color can be adjusted in the workflow, while page content is edited in main.html.

The default workflow also encrypts assets, replacing images, CSS, and JavaScript directly referenced in the HTML with inline base64, so relative links between these files may break; to disable asset encryption, you need to adjust the exclusions in _config.yml and replace the workflow file. The template also supports local encryption: build the image with Docker and run encryption, then upload only the generated index.html, thereby avoiding putting plaintext content in the repository. The README explicitly states that the author and dependencies may have oversights, that it should not be assumed to be absolutely secure, and that sensitive data such as bank information should not be transmitted this way.

HTMLLauncher

Is it right for your project?

Use Cases

  • Publishing a page for events such as birthdays or weddings that only invitees should view
  • Publishing company internal event information that should not be publicly visible
  • Hosting static single-page content on GitHub Pages that requires simple password protection
  • When you do not want to commit plaintext pages to the repository, encrypt locally and upload only index.html

Suitable For

  • Individuals or teams needing to quickly set up a password-protected static page
  • Developers using GitHub Pages hosting who accept a build-time encryption approach
  • Scenarios where content is a single HTML page and security requirements are not high

Getting started & customization

Use these recorded setup notes alongside the repository instructions for your chosen version.

  1. 1

    Create a repository from the template and set the GitHub Pages publishing source to the main branch

  2. 2

    Create a repository Secret named DECRYPTION_PASSPHRASE as the access password, otherwise the first CI run will fail due to a missing password

  3. 3

    If you do not want others to bypass the password to access repository contents, set the repository to private

  4. 4

    Edit page content in main.html; adjust login page styles and text in the encryption step of encrypt_with_assets.yml

  5. 5

    By default, assets are encrypted and inlined as base64, which may break relative links between files; to disable, modify the exclusions in _config.yml and replace the workflow file

Read repository instructions

License & source material

Usage conditions & limitations

Free to use · keep license notice

This entry covers the free version under the MIT license in a public repository; the free scope is the code of that version and does not imply that external services or third-party assets are free.

Must comply with when using

  • Free use, modification, commercial use, and distribution of this version's code are permitted.
  • When distributing copies or substantial portions of the code, retain the original author's copyright notice and the full MIT license notice.
  • The code is provided as is; warranties and limitations of liability are governed by the original license and applicable law.

Additional costs & items to verify

  • The README explicitly warns that the encryption scheme may have oversights by the author or dependencies, that it should not be assumed to be absolutely secure, and that sensitive data such as bank information should not be transmitted with it.
  • If you want content to be inaccessible without the password, the repository must be set to private; in a public repository, others can directly view the plaintext content.
  • Before use, you must create a GitHub Secret named DECRYPTION_PASSPHRASE in the repository as the access password, otherwise the first CI run will fail due to a missing password.
  • The GitHub Pages publishing source must be set to the main branch to activate hosting, which depends on the GitHub Pages service.
  • Default asset encryption only inlines images, CSS, and JS directly referenced in the HTML as base64, so relative links between files may break as a result.
  • Demo images, fonts, icons, and other third-party assets must be checked against their respective licenses and cannot be judged solely by the code's MIT license.
  • External services such as domains, hosting, databases, payments, or AI may incur additional charges.
View Original Text Basis

Permission is hereby granted, free of charge

Original License Text

Do not share bank information or similar this way.

Original README

Choose the repository to be **private**, if you don't want people to be able to access the contents without the password

Original README

Create a Github secret

Original README

Set the publishing source

Original README

this only replaces all directly linked images, CSS and JavaScript file in the HTML document with an in-place base64 representation

Original README
https://github.com/a-nau/password-protected-website-template/blob/main/LICENSEhttps://github.com/a-nau/password-protected-website-template/blob/main/README.md

Compiled by DeepSeek based on repository license and README ·2026-10-02. Results only cover the materials read; dependencies, images, fonts, and subsequent term changes are subject to their respective original texts.

Project checks & description sources

Template Information

Source platforms
GitHub
Documentation and maintenance reference score
More documented · 81 / 100
Technologies
HTML
Website type
Starter
How this score is calculated

Our heuristic uses license records (up to 30), a demo link (12), a preview (10), stars (15), recorded maintenance (15), description completeness (8), feature records (5) and classification data (5). It is not a code, security or performance test, or a Google score. A link does not establish tested functionality.

What to verify for this project

Repository update recorded
2024-12-04
Screenshot last checked
2026-10-02

A demo link is listed. Check it with your own content and viewport sizes; its presence does not confirm that forms, authentication or payments work.

The catalog identifies HTML as the primary stack. Check the actual dependency manifest and lockfile for versions and hosting requirements. These notes use recorded metadata, not a code audit or a deployment test.

Use a selection guide →

How this description was prepared

AI-assisted description based on catalog records and repository material. Repository authors are not automatically the reviewers of this description.

Automatically checked against source and license rules; no manual editorial review.

Inspect the recorded source material

SHA-256: 138730379f20a712bb8ddb34d6c2bd75d09ba5f3fa80b6697c617d07ea8a7c3a

2026-10-02T16:10:33.716Z

Source file / repository
# Template for Encrypted Single Page Website

This template repository makes it easy to create a password protected page that is hosted on Github pages.
This can be useful for information or events that should not be available to everyone, e.g. for your birthday, wedding or a corporate event.

To check the [demo](https://a-nau.github.io/password-protected-website-template) use the password `test`.

![Demo](assets/hidden/demo.gif)

**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.

## Usage

- [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
- Select a repository name (your URL will be `{GITHUB-ACCOUNT-NAME}.github.io/{REPOSITORY-NAME}`)
- Choose the repository to be **private**, if you don't want people to be able to access the contents without the password
- [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)
- [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

To customize the website:

- You can customize the login page

  - 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

    ```yaml
    - name: Encrypt index
      run: >
        staticrypt index.html -p ${{ secrets.DECRYPTION_PASSPHRASE }} --short
        --template "password_template.html"
        --template-title "Login"
        --template-instructions "This is a test website, use the password 'test' to enter."
        --template-button "Open Page"
        --template-color-primary "#113e9f"
        --template-color-secondary "#e4e4e4"
    ```

  - For details and to change the full layout, see [StatiCrypt](https://github.com/robinmoisson/staticrypt)

- Edit the `main.html` which will be shown to visitors after encryption (the encrypted version, that is hosted is `index.html`)
  - Assets can be used as usual and will not be encrypted

### Encrypted Assets

By default encryption of assets is enabled, since the workflow [`encrypt_with_assets.yml`](.github/workflows/encrypt_with_assets.yml) is active.
Note, this only replaces all directly linked images, CSS and JavaScript file in the HTML document with an in-place base64 representation.
Thus, your relative links in files will probably not work anymore, since their location changed.

If you do not want to encrypt assets 
- remove the asset folder from the `exclude`s of the [`_config.yml`](_config.yml),
- [`encrypt_with_assets.yml`](.github/workflows/encrypt_with_assets.yml) to `encrypt_with_assets._yml`, and 
- rename [`encrypt_without_assets._yml`](.github/workflows/encrypt_without_assets.yml) to `encrypt_with_assets.yml` 


### Local Usage

If 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.
To do this, follow these steps:

- Build the image
  ```
  docker build -t ppw .
  ```
- Run the encryption
  ```
  docker run -it --rm --name ppw -e PASSWORD=test --mount type=bind,source=${PWD},target=/code ppw
  ```
- Ignore changes to `main.html`
  ```
  git update-index --skip-worktree main.html
  ```
  Optionally the same is needed for your assets.

## Credits

- The encryption is made by [StatiCrypt](https://github.com/robinmoisson/staticrypt): [MIT](https://github.com/robinmoisson/staticrypt/blob/main/LICENSE) License
- 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
- 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
- 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
- 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
Report a correction

Explore similar templates

Compare previews and descriptions within the same stack and category.