Documentation

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.

~20 min read·13 Steps·Beginner Friendly
1

Prerequisites

Before you begin, make sure your computer has these three free tools installed. If you already have them, skip to Step 2.

Node.js

JavaScript runtime engine. Version 22.12.0 or newer required.

Download LTS

VS Code

Free code editor by Microsoft. Best choice for Astro development.

Download VS Code

Git

Version control system. Required for GitHub deployment workflows.

Download Git

Verify Installation

After installing, restart your computer. Then open a terminal (Command Prompt or PowerShell on Windows, Terminal on Mac) and run:

Terminal
node -v
npm -v
git --version

Each command should print a version number. If you see'command not found', the tool is not installed correctly.

2

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

  1. Locate the downloaded .zip file in your Downloads folder.
  2. Right-click the file and select "Extract All...".
  3. Choose a target directory (e.g., D:\MyBlog or C:\Projects\MyBlog) and click Extract.

On macOS

  1. Double-click the downloaded .zip file — macOS will automatically extract it into a folder.
  2. Move the extracted folder to your desired location (e.g., ~/Projects/MyBlog).

Your extracted folder structure

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.

3

Open in VS Code

  1. 1Open Visual Studio Code.
  2. 2Click File → Open Folder... (or File → Open... on macOS).
  3. 3Navigate to your extracted project folder (e.g., D:\MyBlog) and click Select Folder.
  4. 4If prompted "Do you trust the authors of the files?", click Yes, I trust the authors.
  5. 5Open the integrated terminal: click Terminal → New Terminal from the top menu bar. A panel will appear at the bottom of the editor.
4

Install Dependencies

In the VS Code terminal, run the following command to download all required framework libraries:

Terminal
$ npm install

This will take 1–2 minutes. A node_modules folder and package-lock.json file will be created automatically. Do not delete them.

5

Start the Development Server

Once dependencies are installed, start the local dev server to preview your blog:

Terminal
$ npm run dev

Your 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.

6

Activate Your License

  1. 1
    In your project root, find the file .env.example. Rename it to exactly .env (remove the .example part).
  2. 2
    Go to the License Portal and generate your license key using your Gumroad purchase receipt key.
  3. 3
    Open your .env file and paste your license key:
    .env
    LICENSE_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.

7

Configure Your Brand

Open src/config/site.ts in VS Code. This single file controls all your website's branding. Edit the following fields:

src/config/site.ts
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
    ...
  }
};
FieldDescription
nameBrand name shown on footers, legal pages, and PWA manifest
domainYour production URL (used for sitemaps, canonical URLs, RSS)
cdnDomainExternal CDN hostname for images. Leave "" if images are in /public
contactEmailDisplayed on contact page, legal pages, and footer
logoLettersArray of characters with Tailwind color classes for the multi-color logo wordmark
googleAdsenseIdYour AdSense publisher ID (e.g., ca-pub-XXX). Leave empty to disable
socialsSocial profile URLs. Set to "#" or "" to hide icon from footer
8

Set Up Author Profiles

Open src/config/authors.ts to configure author identities. Each author is keyed by their email address, which must match the author email used in the CMS or your blog post frontmatter.

src/config/authors.ts
export const AUTHOR_REGISTRY = {
  'you@example.com': {
    name: 'Your Full Name',
    slug: 'your-name',           // Used in URL: /author/your-name
    avatarUrl: defaultAvatar,       // Replace with your photo import
    bio: 'Your short bio goes here.',
    role: 'Editor-in-Chief',
  },
};

To use a custom avatar, place your image in src/assets/authors/ and import it at the top of the file.

9

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.

src/content/blog/my-first-post.md
---
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*.
FieldRequiredDescription
titleYesThe headline of your article
descriptionOptionalSEO meta description and social sharing preview text
pubDateYesPublish date in ISO 8601 format
categoryYesPost category (e.g., Technology, AI, Security)
imageYesBanner image URL (CDN recommended) or local path
authorOptionalAuthor display name (must match authors.ts entry)
authorSlugOptionalURL slug for the author page
tagsOptionalArray of keyword tags for search and categorization
ai_summaryOptionalAI-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/.

10

Set Up Analytics

Open your .env file and add your analytics tracking IDs. All analytics are optional.

.env
# 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.

11

Build for Production

When you're happy with your blog, stop the dev server (Ctrl+C in the terminal) and compile the production build:

Terminal
$ npm run build

This 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.

12

Deploy to the Web

You have two deployment paths. Choose the one that fits your workflow.

Option A

Drag & Drop Deployment (Easiest)

Cloudflare Pages (Recommended)

  1. Go to dash.cloudflare.com and sign up for a free account.
  2. Navigate to Workers & Pages → Create Application → Pages → Upload assets.
  3. Give your project a name (e.g., my-blog) and click Create Project.
  4. Drag and drop your dist/ folder into the upload area and click Deploy site.
  5. Your blog will be live on a .pages.dev subdomain!

Netlify

  1. Go to app.netlify.com/drop and create a free account.
  2. Drag and drop your dist/ folder into the browser upload box.
  3. Your website goes live in under 10 seconds!
Option B

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

  1. Log in to github.com (create a free account if you don't have one).
  2. Click the green "New" button or select the "+" icon in the top-right corner and click "New repository".
  3. Enter a repository name (e.g., my-astro-blog).
  4. 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.
  5. Do NOT check "Add a README file", "Add .gitignore", or "Choose a license" (the template folder already has these configured).
  6. 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:

Terminal
$ 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 GitHub

Sign-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

  1. Go to Cloudflare Dashboard → Workers & Pages → Create Application → Pages → Connect to Git.
  2. Authenticate with GitHub and select your newly created private repository.
  3. Choose the Astro framework preset (Cloudflare will automatically pre-fill all build commands and folder configurations).
  4. 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!

13

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)

  1. In Cloudflare Dashboard, go to Workers & Pages and select your deployed site.
  2. Navigate to Settings → Functions → KV namespace bindings.
  3. Bind a KV Namespace to the variable name: POST_VIEWS.
  4. Save and redeploy. Post view counts will now be tracked automatically.

Push Notification Tokens (D1 Database)

  1. Go to Workers & Pages → D1 Databases → Create Database. Name it (e.g., push-db).
  2. Go back to your Pages project → Settings → Functions → D1 database bindings.
  3. Add a binding with variable name: DB and select your D1 database.
  4. Save and deploy. Tables are auto-created on the first request.

Contact Form Webhook

  1. Go to script.google.com and click "New Project".
  2. 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);
      }
    }
  3. Click Deploy → New Deployment in the top-right corner.
  4. Click the Gear icon () next to "Select type" and choose Web App.
  5. Configure the deployment:
    • Execute as: "Me" (your Google Account email)
    • Who has access: "Anyone"
  6. Click Deploy. Grant necessary permissions if prompted by Google, and copy the generated Web App URL.
  7. In Cloudflare Pages dashboard under your project → Settings → Environment variables, add:
    • CONTACT_FORM_WEBHOOK_URL = the Google Apps Script Web App URL
    • TURNSTILE_SECRET_KEY = your Turnstile private key

Firebase Push Notifications

  1. Create a project at console.firebase.google.com and register a Web App.
  2. Copy the Firebase config details and replace them in:
    • public/firebase-messaging-sw.js (lines 12–18)
    • src/components/PushNotification.astro (lines 182–189)
  3. Add your VAPID Key in PushNotification.astro (line 180).

Cloudflare Turnstile CAPTCHA

  1. Register your site on Cloudflare Turnstile and get a Site Key + Secret Key.
  2. Open src/pages/contact.astro and paste your Site Key on line 8:
    src/pages/contact.astro
    const siteKey = "YOUR_TURNSTILE_SITE_KEY";
  3. Add the Secret Key as the TURNSTILE_SECRET_KEY environment 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.

Notification Status