Installation

Step-by-step guide to installing and setting up Anti-Gravity theme.

Installation

This guide will walk you through setting up Anti-Gravity for your project.

Prerequisites

Before you begin, ensure you have the following installed:

  • Node.js - Version 18.14.1 or higher
  • npm, pnpm, or yarn - Package manager of your choice
  • Git - For cloning the repository

Installation Methods

Step 1: Download Your Theme

After purchasing Anti-Gravity, download the theme files from your purchase dashboard:

  1. Log in to your purchase dashboard
  2. Download the anti-gravity-theme.zip file
  3. Extract to your desired project location

Step 2: Extract and Install

# Extract the theme
unzip anti-gravity-theme.zip -d my-project

# Navigate to the project
cd my-project

# Install dependencies
npm install

Step 3: Verify Installation

# Start development server
npm run dev

Your site will be available at http://localhost:4321.

Development Server

Start the development server:

npm run dev

Your site will be available at http://localhost:4321.

Available Scripts

CommandDescription
npm run devStart development server
npm run buildBuild for production
npm run previewPreview production build
npm run astroRun Astro CLI commands

Project Configuration

Site Configuration

Edit src/config/site.ts to update your site’s information:

export const siteConfig = {
  name: 'Your Site Name',
  description: 'Your site description',
  url: 'https://your-domain.com',
  // ... more options
};

Astro Configuration

The main Astro configuration is in astro.config.mjs:

import { defineConfig } from 'astro/config';
import tailwind from '@astrojs/tailwind';
import react from '@astrojs/react';
import mdx from '@astrojs/mdx';

export default defineConfig({
  site: 'https://your-domain.com',
  integrations: [tailwind(), react(), mdx()],
});

TypeScript Support

Anti-Gravity is built with TypeScript. The configuration is in tsconfig.json:

{
  "extends": "astro/tsconfigs/strict",
  "compilerOptions": {
    "baseUrl": ".",
    "paths": {
      "@/*": ["src/*"]
    }
  }
}

Troubleshooting

Common Issues

Port already in use:

# Use a different port
npm run dev -- --port 3000

Dependencies not installing:

# Clear npm cache and reinstall
rm -rf node_modules package-lock.json
npm install

TypeScript errors:

# Sync Astro types
npm run astro sync

Next Steps