
Welcome to Litos Theme! This comprehensive guide will walk you through setting up and launching your project with Litos, a modern blog theme built with Astro.js.
Prerequisitesh2
Before starting, ensure you have the following tools installed in your development environment:
- - Required for running the development environment Node.js
- - Our preferred package manager for dependency management pnpm
- - For version control and project management Git
- - Recommended code editor with excellent development experience VS Code
While VS Code is recommended, you can use any code editor of your choice that supports web development.
Project Setuph2
Creating Your Projecth3
You can start your Litos project by forking the repository:
- Visit the Litos Theme repository
- Click the “Fork” button to create your copy
- Clone your forked repository locally:
git clone https://github.com/[YOUR_USERNAME]/[YOUR_REPO_NAME].gitcd [YOUR_REPO_NAME]
Installing Dependenciesh3
Once you have cloned the repository, install the project dependencies:
# Install all required dependenciespnpm install
# Start the development serverpnpm dev
When you first start the project, you might see this React-related warning:
Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:1. You might have mismatching versions of React and the renderer (such as React DOM)2. You might be breaking the Rules of Hooks3. You might have more than one copy of React in the same appSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.
This warning is caused by the interaction between React plugin and MDX plugin. According to Astro’s official statement, this warning can be safely ignored.
Project Configurationh2
Before customizing your site, familiarize yourself with the project structure. There are three main configuration areas to focus on:
-
Basic Site Configuration
- File:
src/config.ts
- Purpose: Configure site metadata, navigation, and core settings
- Learn more: Basic Configuration Guide
- File:
-
Code Block Styling
- File:
ec.config.mjs
- Purpose: Customize code block appearance and behavior
- Learn more: ExpressiveCode Configuration
- File:
-
Markdown Extensions
- File:
/plugins/index.ts
- Purpose: Configure markdown plugins and extensions
- Learn more: Markdown Extension Syntax
- File:
Content Creationh2
Litos supports both standard Markdown and enhanced syntax features:
- Basic Markdown Syntax - Core markdown formatting
- Extended Markdown Features - Advanced formatting options
For post configuration and metadata, refer to the Post Configuration guide.
Start by customizing the basic configuration to match your site’s branding and navigation structure before creating content.