Son aktivite 1731734966

https://blog.vinfall.com/posts/2022/10/pgp-signed-site/#conclusion

Vinfall bu gisti düzenledi 1731734966. Düzenlemeye git

1 file changed, 23 insertions

sign-blog.sh(dosya oluşturuldu)

@@ -0,0 +1,23 @@
1 + #!/bin/bash
2 +
3 + # Make sure gpg knows which tty to use,
4 + # or it'll complain like `curse not a tty xterm-256color` forever
5 + export GPG_TTY=$(tty)
6 + gpg-connect-agent updatestartuptty /bye >/dev/null
7 +
8 + # Garbage clean
9 + rm -r ./public/*
10 + hugo --gc
11 + # Find all pages, change "5" according to site content
12 + SIG_FILES=$(find public -maxdepth 5 -name '*.html' -type f)
13 +
14 + # Sign one page
15 + gpg --local-user {GPG_FINGERPRINT} --armor --detach-sign public/index.html
16 +
17 + # Sign all pages
18 + while IFS= read -r line
19 + do
20 + gpg --local-user {GPG_FINGERPRINT} --armor --detach-sign "$line"
21 + done < <(printf '%s\n' "$SIG_FILES")
22 +
23 + echo "Successfully signed all pages."
Daha yeni Daha eski