Introduction
ThisPage is a robust static site generator designed for speed and simplicity. It combines a custom HTML-first templating engine with automatic Tailwind CSS integration and a built-in administrative interface for content management.
⚡ Live Reloading
Changes to templates, components, or static files trigger an immediate rebuild.
🎨 Tailwind Native
Automatically downloads and configures the Tailwind v4 binary for your architecture.
🛡️ Admin Interface
Built-in file editor, uploader, and zip deployment system secured by session tokens.
Installation & Setup
Install the thispage CLI tool to get started.
# Initialize a new project
thispage init my-website admin securepassword123
# Enter the directory
cd my-website
# Start the development server
thispage serve
The server will start on port 8080 by default. Tailwind CSS will automatically download and start watching your static/input.css file.
Project Structure
When you initialize a project, the following directory structure is created:
my-website/
├── .thispage/ # Credentials and seeds (gitignored)
├── components/ # Reusable HTML snippets (nav, footer)
├── layouts/ # Master page wrappers
├── live/ # The compiled static site (do not edit directly)
├── static/ # CSS, JS, Images
│ └── input.css # Tailwind entry point
├── templates/ # Your actual pages
├── data.db # SQLite database for sessions/rate limiting
└── .env # Environment variables
CLI Commands
| Command | Arguments | Description |
|---|---|---|
init |
<name> <user> <pass> |
Creates a new project with admin credentials. Use --force to overwrite. |
serve |
[path] [port] |
Builds the site, starts the file watcher, and runs the HTTP server. |
build |
<path> |
Compiles the site once without starting a server. |
watch |
<path> |
Watches for file changes and rebuilds, but does not serve HTTP. |
mount |
<path> <user> <pass> |
Generates new credentials/seed for an existing project (useful after git clone). |
credentials |
<path> |
Displays the current encrypted admin credentials and session key. |
Templating Engine
ThisPage uses a custom tokenizer and compiler. It does not use standard Go templates, but rather a custom syntax focused on composition.
Layouts & Blocks
Define a master layout using slots or blocks, then inherit it in your templates.
layouts/guest_layout.html
<!DOCTYPE html>
<html>
<body>
{{ slot "main" }}
</body>
</html>
templates/index.html
{{ layout "./layouts/guest_layout.html" }}
{{ block "main" }}
<h1>Welcome to my site</h1>
<p>This content is injected into the slot.</p>
{{ endblock }}
{{ endlayout }}
Components & Includes
You can reuse HTML snippets using the include directive. You can also pass properties to components.
templates/index.html
{{ include "./components/navbar.html" title="Home Page" }}
components/navbar.html
<nav>
<div>{{ prop "title" }}</div>
</nav>
Tailwind CSS Integration
ThisPage has native support for Tailwind CSS. You do not need Node.js installed.
When you run thispage serve, the system:
- Checks for a valid Tailwind binary in
~/.thispage/bin. - Downloads the correct binary for your OS/Arch (v4.1.18) if missing.
- Runs the binary in watch mode, compiling
static/input.csstostatic/output.css.
Simply use Tailwind utility classes in your HTML files, and they will work immediately.
Admin Interface
Access the admin panel by navigating to /login or /admin. The admin system allows you to manage the site directly from the browser.
📝 Live Editing
When logged in as admin, an "Edit" button appears on live pages, linking directly to the source file in the admin editor.
📁 File Manager
Create, rename, delete, and upload files. Navigate through templates, components, and static assets.
🚀 Zip Deployment
Upload a .zip file containing your project structure to instantly deploy updates. Includes logic to prevent "Zip Slip" attacks.
📦 Export
Download a full backup of your project (templates, components, static files) as a .zip file.
Security & Auth
Security is built into the core:
- • Encryption: Credentials are stored using AES-GCM encryption with a project-specific seed.
- • Rate Limiting: Login attempts are tracked by IP. 5 failed attempts trigger a temporary block. Excessive failures trigger a permanent blacklist.
- • Session Management: Secure, HTTP-only cookies are used for session management.
- • Path Traversal Protection: The file system router and admin endpoints strictly validate paths to ensure they stay within the project root.