diff --git a/.github/workflows/encrypt_with_assets.yml b/.github/workflows/encrypt_with_assets.yml
index 5b1be92..ec402f8 100644
--- a/.github/workflows/encrypt_with_assets.yml
+++ b/.github/workflows/encrypt_with_assets.yml
@@ -9,6 +9,9 @@ jobs:
runs-on: ubuntu-latest
container:
image: nikolaik/python-nodejs:python3.11-nodejs20-slim
+ permissions: # See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idpermissions
+ contents: write
+ pages: write
steps:
- name: Install Git
run: |
@@ -21,9 +24,14 @@ jobs:
- name: Remove template salt (if necessary)
run: |
current_salt="$(grep -oP '(?<="salt": ")[^"]*' .staticrypt.json)"
- if [ "${{ github.repository }}" != "a-nau/password-protected-website-template" ] && [ "$current_salt" == "9fdd6a30e734b0ce7de31a0a221786bf" ];
- then
- rm .staticrypt.json
+ if [ "$current_salt" != "9fdd6a30e734b0ce7de31a0a221786bf" ]; then
+ echo "Salt has been updated already"
+ else
+ echo "Salt has not been updated already"
+ if [ "${{ github.repository }}" != "a-nau/password-protected-website-template" ]; then
+ echo "Removed salt to regenerate"
+ rm .staticrypt.json
+ fi
fi
- name: Embed assets
run: |
diff --git a/.github/workflows/encrypt_without_assets.yml b/.github/workflows/encrypt_without_assets._yml
similarity index 72%
rename from .github/workflows/encrypt_without_assets.yml
rename to .github/workflows/encrypt_without_assets._yml
index 54a0453..5dc90d7 100644
--- a/.github/workflows/encrypt_without_assets.yml
+++ b/.github/workflows/encrypt_without_assets._yml
@@ -1,10 +1,17 @@
name: Encrypt Page without Assets
+on:
+ push:
+ branches: [main]
+
jobs:
encrypt:
runs-on: ubuntu-latest
container:
image: nikolaik/python-nodejs:python3.11-nodejs20-slim
+ permissions: # See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idpermissions
+ contents: write
+ pages: write
steps:
- name: Install Git
run: |
@@ -17,9 +24,14 @@ jobs:
- name: Remove template salt (if necessary)
run: |
current_salt="$(grep -oP '(?<="salt": ")[^"]*' .staticrypt.json)"
- if [ "${{ github.repository }}" != "a-nau/password-protected-website-template" ] && [ "$current_salt" == "9fdd6a30e734b0ce7de31a0a221786bf" ];
- then
- rm .staticrypt.json
+ if [ "$current_salt" != "9fdd6a30e734b0ce7de31a0a221786bf" ]; then
+ echo "Salt has been updated already"
+ else
+ echo "Salt has not been updated already"
+ if [ "${{ github.repository }}" != "a-nau/password-protected-website-template" ]; then
+ echo "Removed salt to regenerate"
+ rm .staticrypt.json
+ fi
fi
- name: Encrypt index
run: >
diff --git a/README.md b/README.md
index 861fb93..590ad77 100644
--- a/README.md
+++ b/README.md
@@ -46,13 +46,11 @@ By default encryption of assets is enabled, since the workflow [`encrypt_with_as
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) and cut the following lines from [`encrypt_with_assets.yml`](.github/workflows/encrypt_with_assets.yml) and paste them into [`encrypt_without_assets.yml`](.github/workflows/encrypt_without_assets.yml)
+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`
-```yaml
-on:
- push:
- branches: [main]
-```
### Local Usage
diff --git a/index.html b/index.html
index f39eb94..ecca10d 100644
--- a/index.html
+++ b/index.html
@@ -103,6 +103,27 @@
margin-bottom: 1em;
}
+ .staticrypt-footer {
+ position: fixed;
+ height: 20px;
+ font-size: 16px;
+ padding: 2px;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ margin-bottom: 0;
+ }
+
+ .staticrypt-footer p {
+ margin: 2px;
+ text-align: center;
+ float: right;
+ }
+
+ .staticrypt-footer a {
+ text-decoration: none;
+ }
+
.staticrypt-title {
font-size: 1.5em;
}
@@ -207,6 +228,16 @@
+
+