Arrow BackArrow Back

Astro Docs

Back home

(documentation menu)
Introduction

Welcome to the Astro theme documentation! This documentation is designed to provide you with all the necessary information to help you get started with the theme for your Astro-powered website. Before diving into the documentation, it is important to have a basic understanding of Astro and its concepts. If you are new to it, we recommend referring to the official Astro documentation to familiarize yourself with the platform.

Customization and Code Modifications:

Astro themes offer extensive customization options to personalize your website's appearance and functionality. Please exercise caution when making custom code changes, as incorrect modifications can potentially break your website's functionality or layout. It is recommended to create backups and test changes in a development environment before applying them to your live site.

Support Limitations:


Please be aware that our support for Astro themes is primarily focused on theme-specific issues and providing guidance on theme features and settings. We do not provide support for issues arising from custom code modifications or third-party integrations. If you encounter any issues or have questions related to theme's built-in features and settings, please refer to the documentation or reach out to our support team for assistance. For custom code modifications and advanced customization requests, you can reach out to us—we also offer theme customization at an hourly rate.  

By being mindful of these considerations, you can fully leverage the power and flexibility of Astro themes while ensuring a smooth and successful customization experience.

Theme installation

To run the Astro theme on your local machine, you’ll need to have Node.js installed.

Run the project locally:

  1. Unzip the theme into a folder and navigate to that folder. Open your terminal or command prompt.
  2. Run the following command to install all necessary dependencies:

    npm install
  3. Once installation is complete, start the development server with:

    npm run dev
  4. The project will be available at:

    http://localhost:4321/


Build the project:

After editing the settings and content, you can build the project by running:

npm run build

This will generate a production-ready version of your site.

Posts

To create a blog post, follow these steps:

  1. Navigate to:

    src → content → blog
  2. Create a new file with the .mdx extension.
  3. Add your content using Markdown. You can learn more about Markdown syntax here.
Posts location


Frontmatter (Post Metadata):

At the top of each post, you’ll need to define some metadata using frontmatter. Here's a breakdown of the options:

  • post_header_type: A string that determines the style of the post header. Various styles are available — check the comments next to this field for valid values.
  • title: A string used for the post title.
  • excerpt: A short description or summary of the post.
  • feature_image: A string path to the featured image.
    Tip: Blog images should be placed in src/assets/images/blog.
  • featured: A boolean. If set to true, the post will appear in the featured section on the homepage.
  • pub_date: A string. Publication date of the post.
  • tags: An array of strings. Each tag will automatically link to its respective tag page.
  • authors: An array of strings. Each author will link to their individual author page.
  • draft: A boolean. If set to true, the post will not be displayed on the live site. Use this while drafting posts.


Make sure each field uses the correct data type. Incorrect values may cause the post to display incorrectly or not at all.

Post frontmatter
Pages

To create a page, follow these steps:

  1. Navigate to:

    src → content → pages
  2. Create a new file with the .mdx extension.
  3. Add your content using Markdown. You can learn more about Markdown syntax here.
Pages location


Frontmatter (Page Metadata):

At the top of each page, you’ll need to define some metadata using frontmatter. Here's a breakdown of the options:

  • page_header_type: A string that determines the style of the page header. Various styles are available — check the comments next to this field for valid values.
  • title: A string used for the page title.
  • excerpt: A short description or summary of the page.
  • feature_image: A string path to the featured image.


Make sure each field uses the correct data type. Incorrect values may cause the page to display incorrectly or not at all.

Page frontmatter
Tags

Tags are generated dynamically from the post frontmatter. The system collects all unique tags (no duplicates) and displays them on: tags page, archive page, individual tag pages and post cards.

To add additional content like image or description, follow these steps:

  1. Navigate to:

    src → config → tags.json.ts
  2. Add your tags and corresponding data. For example, if you're using the tag "Business and Work", you'd add:

    {  
      slug: "business-and-work",
      description: "This is some tag description"
    }

    IMPORTANT: Make sure to slugify the tag name. "Business and Work" becomes "business-and-work" in the slug.

    The "tagsSettings" is an array, so you can include as many tag objects as you like.
  3. To add a tag image, navigate to:

    src → assets → images → tag
  4. Upload the image to this folder.

    IMPORTANT: The image filename must also be slugified. For example, for the tag "Business and Work", use:

    business-and-work.jpg (or .png, .webp, etc.)

    Most image file types are supported.
Tags settings
Authors

Authors are generated dynamically from the post frontmatter. The system collects all unique authors (no duplicates) and displays them on: authors page, individual author pages, post header and post cards.

To add additional content like image, bio, location and author socials follow these steps:

  1. Navigate to:

    src → config → authors.json.ts
  2. Add your authors and corresponding data. For example, if you're using an author "John Doe", you'd add:

    {  
      slug: "john-doe",
      bio: "This is author bio",
      location: "Chicago",
      website_url: "https://www.kusa-projects.com/",
      x_url: "https://www.twitter.com/",
      facebook_url: "https://www.facebook.com/"
    }

    IMPORTANT: Make sure to slugify the author name. "John Doe" becomes "john-doe" in the slug.

    The "authorSettings" is an array, so you can include as many author objects as you like.
  3. To add an author image, navigate to:

    src → assets → images → author
  4. Upload the image to this folder.

    IMPORTANT: The image filename must also be slugified. For example, for an author "John Doe", use:

    john-doe.jpg (or .png, .webp, etc.)

    Most image file types are supported.
Authors settings
Membership

To add different plans to the membership page follow these steps:

  1. Navigate to:

    src → config → membership.json.ts
  2. Add your plans and corresponding data. For example:

    {  
      name: "Bronze",
      description: "Full Access to Premium Content",
      yearly_price: "$49",
      monthly_price: "$5",
      benefits: "Full access to Premium Plus posts, Receive weekly email newsletter"
    }

    The "membershipSettings" is an array, so you can include as many plan objects as you like.
Membership settings
FAQ

To add toggle cards to the FAQ page follow these steps:

  1. Navigate to:

    src → config → faq.json.ts
  2. Add your toggle cards and corresponding data. For example:

    {  
      title: "This is a title",
      text: "This is a toggle card text"
    }

    The "faqSettings" is an array, so you can include as many toggle card objects as you like.
FAQ settings
Global Settings

You can further customize the theme by adjusting the global settings. To do this, follow these steps:

  1. Navigate to:

    src → config → config.json.ts
  2. Adjust the setting values as needed. Each option includes a comment on the right explaining its purpose and usage. Make sure all values are typed correctly for the settings to work properly.
Global settings
Socials

You can add your socials to the theme by following these steps:

  1. Navigate to:

    src → config → socials.json.ts
  2. Add your socials and corresponding data. For example:

    {  
      text: "Facebook",
      url: "https://www.facebook.com/",
      icon: `
        <svg>
          <path fill="currentColor"/>
        </svg>`
    }

    The "socialsSettings" is an array, so you can include as many socials as you like.

Socials settings
Favicons

To update the favicons, icons, browser configuration, web manifest, and related assets, follow these steps:

  1. Navigate to:

    public → favicons
  2. Add your assets to this folder, but make sure to keep the filenames and extensions exactly the same as they are currently.
Localization

All static text is stored in a single file for your convenience. To update the text, follow these steps:

  1. Navigate to:

    src → locales

    and open en.json file.
  2. Update the text values on the right side to customize the content for different pages and sections.

Localization
Google analytics

To add Google analytics to your website follow these steps:

  1. Navigate to:

    src → layouts

    and open BaseHead.astro file.
  2. Update GA_ID constant with your Google analytics ID.

Google analytics
Deployment

To deploy your website please refer to Astro deployment.