Quick Start
This is a quick start guide to getting a SuperWeb theme up and running on the internet. This is intended for users already familiar with working with Astro projects. If you prefer a more in-depth guide, see this tutorial.
Download the code
Using git
-
On the theme’s GitHub page, click the green “Code” and copy the
HTTPS URL
. -
Open a terminal and run the following command:
~/Downloads # replace HTTPS_URL with the copied URL in step 1git clone HTTPS_URL my-website -
Navigate to the theme’s directory, install the dependencies, and start the development server:
~/Downloads/my-website cd my-websitenpm installnpm run dev -
Open http://localhost:4321 in your browser to view the website.
Using a zip file
-
Download the zip file for a theme, either from the theme’s GitHub page or from Gumroad.
-
Extract the zip file to a directory of your choice.
-
Navigate to the theme’s directory, install the dependencies, and start the development server:
~/Downloads/theme-name cd theme-namenpm installnpm run dev -
Open http://localhost:4321 in your browser to view the website.
Configure your development environment
See Astro’s official editor setup documentation on how you can improve the development experience and unlock helpful features.
Configure package.json
{ "name": "barebones"}
Configure astro.config.mjs
// Replace with your site's URL.
export default defineConfig({ site: "https://barebones.superwebthemes.com",});
Configure metadata
To change the website’s metadata, edit src/siteConfig.ts
.
export const SITE: SiteConfiguration = { title: "Astro Barebones", description: "A barebones Astro theme.", url: "https://barebones.superwebthemes.com", author: "SuperWeb Themes", locale: "en-US",};
Field | Req | Description |
---|---|---|
title | Yes | Displayed in header and browser tab. Used in SEO and RSS. |
description | Yes | Used in SEO and RSS. |
url | Yes | Used in SEO and RSS. |
author | Yes | Used in SEO and RSS. |
locale | Yes | Used for SEO, RSS, and formatting dates. Defaults to en-US. |
Customize the links shown in the navigation bar.
export const NAV_LINKS: NavigationLinks = { about: { path: "/about", label: "About", }, contact: { path: "/contact", label: "Contact", },};
Each link should be an object with a path and a label, and must have a corresponding page in src/pages
. There must be at least one link or the Navigation.astro
component will encounter an error.
Field | Req | Description |
---|---|---|
path | Yes | The path to send the user to. Used in SEO and RSS. |
label | Yes | The text to be used for the link. Used in SEO. |
Customize your social media links. Add as many as you’d like.
export const SOCIAL_LINKS: SocialLinks = { email: { label: "Email", }, github: { label: "GitHub", url: "https://github.com/superwebthemes", }, discord: { label: "Discord", url: "https://discord.gg/V5MCBCsAjJ", } twitter: { label: "Twitter", url: "https://twitter.com/superwebthemes", }, reddit: { label: "Reddit", url: "https://www.reddit.com/r/superwebthemes", },};
Field | Req | Description |
---|---|---|
path | Yes | The path to send the user to. Used in SEO and RSS. |
label | Yes | The text to be used for the link. Used in SEO. |
Start developing
Open src/pages/index.astro
in your text editor and start editing. When you save the file, the page in your browser (http://localhost:4321) will update automatically and reflect the changes you make.
Deploying your site
Read the deployment documentation for information on deploying your site.