個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Password-protect semi-private content on static sites. Ideal for Hugo blogs, GitHub Pages, and static hosting.
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗Password-protect semi-private content on static sites – ideal for Hugo blogs, GitHub Pages, or any static hosting.
Encrypt sensitive pages and sections while keeping navigation, styling, and public content unchanged. Deploy to GitHub Pages, Netlify, or any static host without a backend.
You want to publish semi-private content on your static site:
Traditional solutions require a backend. pagevault works with pure static hosting – your site is entirely on GitHub Pages or equivalent, no server needed.
Mark sections with <pagevault> tags. pagevault encrypts just those sections while preserving your site's structure, styling, navigation, and scripts.
<header>Public navigation</header>
<pagevault hint="Contact me for the password">
<h2>Private thoughts on this topic</h2>
<p>This section is encrypted...</p>
</pagevault>
<footer>Public footer</footer>
Visitors see your site normally. When they encounter protected content, a password prompt appears. Once unlocked, the content displays beautifully. The browser can remember an unlocked page (configurable), without storing the password.
| Feature | pagevault | Wrap entire page | Hide with CSS | No protection |
|---|---|---|---|---|
| Mixed public/private | ✅ | ❌ | ❌ | ❌ |
| Static hosting | ✅ | ✅ | ✅ | ✅ |
| No server | ✅ | ✅ | ✅ | ✅ |
| Preserves structure | ✅ | ❌ | ✅ | ✅ |
| Real encryption | ✅ | ✅ | ❌ | ❌ |
| Viewer plugins | ✅ | ❌ | ❌ | ❌ |
pip install pagevault
<!-- Mark manually or use the CLI -->
<pagevault>Private content here</pagevault>
Or auto-mark sections:
pagevault mark page.html -s "#private" --hint "Contact admin"
pagevault config init
# Creates .pagevault.yaml with a generated password
# Add to .gitignore!
pagevault lock index.html site/*.html -d _locked/
# Deploy _locked/ to your static host
Visitors see password prompts on protected sections. Share the password however you like – via email, in docs, Discord, etc.
# Mark semi-private blog posts
pagevault mark content/posts/*.md --selector ".private"
# Generate locked HTML during build
hugo -o build/
pagevault lock build/posts/ -r --css styles/pagevault.css
# Deploy to GitHub Pages
git add build/
git commit -m "Publish semi-private posts"
git push
# Protect implementation details in public docs
pagevault lock docs/ -r --hint "See team wiki for password"
# Upload to Netlify
# Share progress with selective access
pagevault lock status-page.html -p "$CLIENT_PASSWORD"
# Send link + password to stakeholders only
#pagevault_logout forgets remembered keyspip install pagevault
# or
pip install git+https://github.com/queelius/pagevault.git
Requires Python 3.10+.
# Lock (encrypt marked regions or entire files)
pagevault lock page.html # HTML: encrypt marked regions
pagevault lock report.pdf # PDF: wrap entire file
pagevault lock site/ # All files in directory
pagevault lock site/ --site # Bundle as encrypted site
pagevault lock page.html -s "#secret" # Encrypt only #secret element
pagevault lock page.html --pad # Pad content to prevent size leakage
# Unlock (decrypt, returns to marked state)
pagevault unlock _locked/page.html
pagevault unlock _locked/ -r
pagevault unlock report.pdf.html --stdout -p "$SECRET" > report.pdf
# Inspect & verify
pagevault info encrypted.html # Show metadata without password
pagevault check encrypted.html -p "pw" # Verify password (exit 0=correct)
pagevault audit # Health check config & passwords
# Mark (add encryption tags)
pagevault mark page.html # Wrap entire body
pagevault mark page.html -s ".private" # Wrap matching elements
# Config
pagevault config init # Create .pagevault.yaml
pagevault config show # Display current config
pagevault config where # Find config file
# Sync (re-encrypt for user changes)
pagevault sync _locked/ -r # Update after password change
Create .pagevault.yaml in your project root (add to .gitignore!):
# Encryption
password: "your-strong-passphrase" # Required
salt: "auto-generated" # Regenerated on config init
# UI defaults
defaults:
remember: "ask" # "none", "session", "local", "ask"
remember_days: 0 # 0 = no expiration
auto_prompt: true # Show password prompt on load
# Styling
template:
title: "Protected Content" # Shown in prompt
button_text: "Unlock"
error_text: "Incorrect password"
hint: "Contact admin for password" # Default hint
# Multi-user
users:
alice: "alice-password"
bob: "bob-password"
Or use environment variable:
export PAGEVAULT_PASSWORD="your-password"
pagevault lock page.html
Workflow:
CLI (cli.py)
↓
Config (config.py) – cascade: args > env > .pagevault.yaml > defaults
↓
Parser (parser.py) – HTML manipulation with BeautifulSoup/lxml
↓
Crypto (crypto.py) – WebCrypto-compatible AES-256-GCM
↓
Wrap (wrap.py) – Bundle files/sites into encrypted HTML
↓
Template (template.py) – Inject Web Component + JS runtime
Self-contained output: Every encrypted HTML file includes the decryption logic, no external dependencies at runtime.
# Setup
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
# Test
pytest tests/ -v --cov=pagevault
# Lint
ruff check src/ tests/
ruff format src/ tests/
MIT – See LICENSE for details.
Q: Is this safe? A: Yes. Uses AES-256-GCM and PBKDF2-SHA256 with 310k iterations. All processing is client-side, no data leaves your browser.
Q: Can I share the encrypted files publicly? A: Yes! Encryption is strong. The password is what you control – share it however you like (email, docs, Discord, etc.) or not at all.
Q: Does this work with Hugo/Next.js/Gatsby? A: Yes! Any static site generator. pagevault processes HTML files after your generator creates them.
Q: Can multiple people have different passwords?
A: Yes! Use the users config to encrypt for multiple users independently.
Q: What if I forget the password? A: You'd need to re-encrypt with a new password. Store passwords safely! Consider a password manager.
Q: Can I update encrypted content?
A: Decrypt with pagevault unlock, edit the HTML, then re-encrypt with pagevault lock.
Made with ❤️ for static site builders who want privacy without complexity.