An open API service indexing awesome lists of open source software.

https://github.com/krutsch/html-encrypt

Password protect a static HTML page without server
https://github.com/krutsch/html-encrypt

cli crypto html javascript password typescript

Last synced: 7 months ago
JSON representation

Password protect a static HTML page without server

Awesome Lists containing this project

README

          

# html-encrypt

A zero config (and only optional minifiers as dependencies) to encrypt html files.
This is a heavy modified clone of [staticrypt](https://github.com/robinmoisson/staticrypt).





Live Example

## Installation

```bash
npm i html-encrypt
```

## Execute

```bash
npx html-encrypt
```

Note: running the command will modify the file.

## Options

- You will be asked to enter the Password





Please consider using a safe password

- Additionally, you can bring in your own template. Create a .html file and reference it when asked in the CLI.
```html


PW:
Login

```

- You can also set the password with -p
```bash
npx html-encrypt --remove-head -p
```

- You can also add --remove-head in order to remove the content of the head for the output file. This might be needed for some SPAs.
```bash
npx html-encrypt --remove-head
```

- You can also add --no-minify in order to not use html-minifier-terser and esbuild.
```bash
npx html-encrypt --no-minify
```

- You can also skip the optional template path with --own-template. Or combine it with a secure -p in a Pipeline.
```bash
npx html-encrypt --own-template
```