Website Installation
& Setup Guide
Everything you need to go from downloading your theme to deploying a live, blazingly fast blog. Follow each step in order — no prior coding experience required.
Prerequisites
Before you begin, make sure your computer has these three free tools installed. If you already have them, skip to Step 2.
Verify Installation
After installing, restart your computer. Then open a terminal (Command Prompt or PowerShell on Windows, Terminal on Mac) and run:
node -v
npm -v
git --versionEach command should print a version number. If you see'command not found', the tool is not installed correctly.
Download & Extract
After purchasing from Gumroad, you will receive a AstroBlogTemplate.zip file. Download it and extract it to a folder on your computer.
On Windows
- Locate the downloaded
.zipfile in your Downloads folder. - Right-click the file and select "Extract All...".
- Choose a target directory (e.g.,
D:\MyBlogorC:\Projects\MyBlog) and click Extract.
On macOS
- Double-click the downloaded
.zipfile — macOS will automatically extract it into a folder. - Move the extracted folder to your desired location (e.g.,
~/Projects/MyBlog).
Your extracted folder structure
MyBlog/
├── public/ # Static assets (images, fonts, favicons)
├── src/
│ ├── assets/ # Optimized images & author avatars
│ ├── components/ # Reusable UI components
│ ├── config/
│ │ ├── site.ts # ⭐ Main site configuration
│ │ └── authors.ts # ⭐ Author profiles
│ ├── content/
│ │ └── blog/ # ⭐ Your Markdown blog posts
│ ├── layouts/ # Page layout templates
│ ├── pages/ # Route pages (index, about, contact...)
│ ├── plugins/ # Remark plugins
│ ├── styles/ # Global CSS
│ └── utils/ # Utility functions
├── functions/
│ └── api/ # Cloudflare Pages serverless functions
├── .env.example # ⭐ Environment variables template
├── astro.config.mjs # Astro framework configuration
├── package.json # Project dependencies
└── tsconfig.json # TypeScript configuration⭐ marks files you will edit during setup.
Open in VS Code
- 1Open Visual Studio Code.
- 2Click File → Open Folder... (or File → Open... on macOS).
- 3Navigate to your extracted project folder (e.g.,
D:\MyBlog) and click Select Folder. - 4If prompted "Do you trust the authors of the files?", click Yes, I trust the authors.
- 5Open the integrated terminal: click Terminal → New Terminal from the top menu bar. A panel will appear at the bottom of the editor.
Install Dependencies
In the VS Code terminal, run the following command to download all required framework libraries:
$ npm installThis will take 1–2 minutes. A node_modules folder and package-lock.json file will be created automatically. Do not delete them.
Start the Development Server
Once dependencies are installed, start the local dev server to preview your blog:
$ npm run devYour Blog is Running!
Open http://localhost:4321 in your browser. Hold Ctrl (or Cmd on Mac) and click the link in the terminal to open it directly. Changes you make to the code will auto-refresh in your browser.
Activate Your License
- 1In your project root, find the file
.env.example. Rename it to exactly.env(remove the.examplepart). - 2Go to the License Portal and generate your license key using your Gumroad purchase receipt key.
- 3Open your
.envfile and paste your license key:.envLICENSE_KEY="ASTRO-XXXX-XXXX-XXXX-XXXX"
A valid license key displays a green verification badge in your website footer: ✔ Licensed to [Your Name]. Without it, the footer will show an evaluation copy warning.
Configure Your Brand
Open src/config/site.ts in VS Code. This single file controls all your website's branding. Edit the following fields:
export const SITE_CONFIG: SiteConfig = {
name: "Your Blog Name",
domain: "https://www.yourdomain.com",
cdnDomain: "", // Leave empty if hosting images in /public
contactEmail: "hello@yourdomain.com",
title: "Your Blog - Your Tagline Here",
description: "Your site meta description for SEO.",
// Google AdSense (Optional — leave empty to disable)
googleAdsenseId: "",
adsenseLazyLoad: true,
// Logo: each letter can have its own color
logoLetters: [
{ char: "Y", color: "text-[#1a73e8]" },
{ char: "B", color: "text-[#d93025]" },
],
logoTextSuffix: "Blog",
// Social links — use "#" to hide any icon
socials: {
instagram: "https://www.instagram.com/yourprofile",
twitter: "https://x.com/yourprofile",
youtube: "#", // Set "#" to hide
...
}
};| Field | Description |
|---|---|
| name | Brand name shown on footers, legal pages, and PWA manifest |
| domain | Your production URL (used for sitemaps, canonical URLs, RSS) |
| cdnDomain | External CDN hostname for images. Leave "" if images are in /public |
| contactEmail | Displayed on contact page, legal pages, and footer |
| logoLetters | Array of characters with Tailwind color classes for the multi-color logo wordmark |
| googleAdsenseId | Your AdSense publisher ID (e.g., ca-pub-XXX). Leave empty to disable |
| socials | Social profile URLs. Set to "#" or "" to hide icon from footer |
Add Your Blog Posts
Blog posts are Markdown (.md) files stored in src/content/blog/. Each file has a frontmatter header (between --- lines) followed by the article body.
---
title: "My First Blog Post"
description: "A short summary for SEO and social sharing."
pubDate: 2026-07-10T12:00:00.000Z
category: "Technology"
image: "https://example.com/banner.png"
image_caption: ""
author: "Your Full Name"
authorSlug: "your-name"
tags: ["web development", "astro", "tutorial"]
ai_summary: ""
---
Your article content goes here in Markdown.
## Subheading
Regular paragraph with **bold** and *italic*.| Field | Required | Description |
|---|---|---|
| title | Yes | The headline of your article |
| description | Optional | SEO meta description and social sharing preview text |
| pubDate | Yes | Publish date in ISO 8601 format |
| category | Yes | Post category (e.g., Technology, AI, Security) |
| image | Yes | Banner image URL (CDN recommended) or local path |
| author | Optional | Author display name (must match authors.ts entry) |
| authorSlug | Optional | URL slug for the author page |
| tags | Optional | Array of keyword tags for search and categorization |
| ai_summary | Optional | AI-generated summary displayed in a modal overlay |
File naming tip: Name your Markdown files using lowercase URL-friendly slugs, e.g., my-first-post.md. The filename becomes the URL path: /post/my-first-post/.
Set Up Analytics
Open your .env file and add your analytics tracking IDs. All analytics are optional.
# Analytics (Optional)
PUBLIC_GA_ID="G-XXXXXXXXXX" # Google Analytics 4
PUBLIC_CLARITY_ID="xxxxxxxxxx" # Microsoft Clarity
# GA4 Data API for Popular Posts widget (Optional)
# Leave blank to show recent posts instead
GA4_PROPERTY_ID=""
GA4_CLIENT_EMAIL=""
GA4_PRIVATE_KEY=""The GA4 Data API credentials are only needed if you want the Popular Posts widget to display posts ranked by actual traffic data. If left blank, the widget will automatically fall back to showing your most recent posts.
Build for Production
When you're happy with your blog, stop the dev server (Ctrl+C in the terminal) and compile the production build:
$ npm run buildThis generates a dist/ folder containing fully optimized, static HTML files ready for deployment. All inline scripts are minified automatically and CSS is inlined for maximum performance.
Deploy to the Web
You have two deployment paths. Choose the one that fits your workflow.
Drag & Drop Deployment (Easiest)
Cloudflare Pages (Recommended)
- Go to dash.cloudflare.com and sign up for a free account.
- Navigate to Workers & Pages → Create Application → Pages → Upload assets.
- Give your project a name (e.g.,
my-blog) and click Create Project. - Drag and drop your
dist/folder into the upload area and click Deploy site. - Your blog will be live on a
.pages.devsubdomain!
Netlify
- Go to app.netlify.com/drop and create a free account.
- Drag and drop your
dist/folder into the browser upload box. - Your website goes live in under 10 seconds!
GitHub + Auto Deploy (Recommended)
Push your code to a private GitHub repository and connect it to Cloudflare Pages for automatic deployments every time you push changes.
1. Create a Private Repository on GitHub
- Log in to github.com (create a free account if you don't have one).
- Click the green "New" button or select the "+" icon in the top-right corner and click "New repository".
- Enter a repository name (e.g.,
my-astro-blog). - CRITICAL SECURITY STEP: Choose "Private". This ensures only you can access your source files, preventing others from downloading your theme or accessing your private credentials.
- Do NOT check "Add a README file", "Add .gitignore", or "Choose a license" (the template folder already has these configured).
- Click "Create repository".
2. Initialize Git & Connect your IDE (VS Code)
Open your project folder in VS Code, open the integrated terminal (Ctrl+`), and run these commands one-by-one to push your local files to GitHub:
$ git init # Initializes empty Git repo in your folder
$ git add . # Stages all your website files
$ git commit -m "Initial commit" # Creates a local checkpoint
$ git branch -M main # Sets branch name to 'main'
$ git remote add origin https://github.com/YOUR-USERNAME/YOUR-REPO-NAME.git
$ git push -u origin main # Pushes code to GitHubSign-in Popup: During the git push command, a pop-up window will ask you to authorize your Git tool. Click "Sign in with your browser", sign in to your GitHub account on the web browser, and authorize it. The upload will complete automatically in the terminal.
3. Connect Cloudflare Pages to GitHub
- Go to Cloudflare Dashboard → Workers & Pages → Create Application → Pages → Connect to Git.
- Authenticate with GitHub and select your newly created private repository.
- Choose the Astro framework preset (Cloudflare will automatically pre-fill all build commands and folder configurations).
- Click Save and Deploy.
Now, every time you make changes in VS Code and run a git push, Cloudflare automatically builds and deploys your changes to the web!
Advanced: Cloudflare Functions
The functions/api/ directory contains serverless edge functions that run on Cloudflare Pages. These enable features like view counters, push notifications, and contact forms. Configure them through the Cloudflare Dashboard.
Post View Counter (KV Binding)
- In Cloudflare Dashboard, go to Workers & Pages and select your deployed site.
- Navigate to Settings → Functions → KV namespace bindings.
- Bind a KV Namespace to the variable name:
POST_VIEWS. - Save and redeploy. Post view counts will now be tracked automatically.
Push Notification Tokens (D1 Database)
- Go to Workers & Pages → D1 Databases → Create Database. Name it (e.g.,
push-db). - Go back to your Pages project → Settings → Functions → D1 database bindings.
- Add a binding with variable name:
DBand select your D1 database. - Save and deploy. Tables are auto-created on the first request.
Contact Form Webhook
- Go to script.google.com and click "New Project".
- Clear any template code and paste the following Google Apps Script logic. Make sure to replace the placeholder email with your actual email address:Google Apps Script
function doPost(e) } try { var data = JSON.parse(e.postData.contents); var name = data.name; var email = data.email; var subject = data.subject; var message = data.message; // ⭐ REPLACE WITH YOUR ACTUAL EMAIL var myEmail = "YOUR_EMAIL_ADDRESS@example.com"; var emailSubject = "[YourBlog Contact Form] " + subject; var emailBody = "This email has been sent from the 'Contact Us' page of your blog:\n" + "--------------------------------------------------\n" + "Name: " + name + "\n" + "Email: " + email + "\n" + "Subject: " + subject + "\n\n" + "Message:\n" + message + "\n" + "--------------------------------------------------"; MailApp.sendEmail({ to: myEmail, replyTo: email, subject: emailSubject, body: emailBody }); try { var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet(); sheet.appendRow([new Date(), name, email, subject, message]); } catch (sheetError) { console.warn("Sheet logging failed: " + sheetError.toString()); } return ContentService.createTextOutput(JSON.stringify({ "status": "success" })) .setMimeType(ContentService.MimeType.JSON); } catch (error) { return ContentService.createTextOutput(JSON.stringify({ "status": "error", "message": error.toString() })) .setMimeType(ContentService.MimeType.JSON); } } - Click Deploy → New Deployment in the top-right corner.
- Click the Gear icon () next to "Select type" and choose Web App.
- Configure the deployment:
- Execute as: "Me" (your Google Account email)
- Who has access: "Anyone"
- Click Deploy. Grant necessary permissions if prompted by Google, and copy the generated Web App URL.
- In Cloudflare Pages dashboard under your project → Settings → Environment variables, add:
CONTACT_FORM_WEBHOOK_URL= the Google Apps Script Web App URLTURNSTILE_SECRET_KEY= your Turnstile private key
Firebase Push Notifications
- Create a project at console.firebase.google.com and register a Web App.
- Copy the Firebase config details and replace them in:
public/firebase-messaging-sw.js(lines 12–18)src/components/PushNotification.astro(lines 182–189)
- Add your VAPID Key in
PushNotification.astro(line 180).
Cloudflare Turnstile CAPTCHA
- Register your site on Cloudflare Turnstile and get a Site Key + Secret Key.
- Open
src/pages/contact.astroand paste your Site Key on line 8:src/pages/contact.astroconst siteKey = "YOUR_TURNSTILE_SITE_KEY"; - Add the Secret Key as the
TURNSTILE_SECRET_KEYenvironment variable in Cloudflare Dashboard.
Need Help?
If you get stuck at any step or need personalized assistance with your setup, don't hesitate to reach out.