9 mins read

Basic configuration

Basic setup instructions for Litos theme

Basic configuration

Welcome to the Litos theme configuration guide. All essential settings for your website are managed through the src/config.ts file. This comprehensive guide will walk you through each configuration section to help you customize your site effectively.

Core Site Configurationh2

The SITE object contains fundamental settings that define your website’s identity and metadata:

src/config.ts
export const SITE: Site = {
title: 'Litos', // Your website title
description: 'Litos is a blog theme built with Astro.js and Dnzzk2.', // Site description
website: 'https://litos.vercel.app/', // Your website URL
base: '/', // Base URL path (change if not deployed at root)
author: 'Dnzzk2', // Author name
ogImage: '/og-image.jpg' // Default Open Graph image for social sharing
}

Here’s a detailed explanation of each configuration property:

PropertyDescriptionDetails
titleWebsite TitleDisplayed in browser tabs and search results, crucial for SEO and brand identity
descriptionSite OverviewShown in search results and social media shares, should include keywords for SEO optimization
websiteProduction URLUsed for generating canonical links and ensuring proper URL resolution
baseBase PathKeep as ’/’ when deployed at root, or set subdirectory (e.g., ‘/blog/‘)
authorAuthor NameUsed in meta tags and attribution information
ogImageDefault Social Media Preview ImageImage displayed when shared on social platforms (recommended size: 1200×630px)

Litos provides a dual-navigation system to enhance user experience and site accessibility. The navigation is split into two main components: header navigation (HEADER_LINKS) for primary routes and footer navigation (FOOTER_LINKS) for comprehensive site mapping.

Header Navigationh3

The header navigation contains your most important and frequently accessed pages:

src/config.ts
export const HEADER_LINKS: Link[] = [
{
name: 'Posts', // Display text in navigation
url: '/posts', // Route path
},
{
name: 'Projects',
url: '/projects',
},
]

The footer navigation provides a complete sitemap and additional important links:

src/config.ts
export const FOOTER_LINKS: Link[] = [
{
name: 'Readme',
url: '/',
},
{
name: 'Posts',
url: '/posts',
},
{
name: 'Projects',
url: '/projects',
},
{
name: 'Tags',
url: '/tags',
},
]

Navigation Link Configuration Details:

PropertyDescriptionUsage
nameDisplay TextThe text shown in the navigation menu
urlTarget PathMust start with ’/’ for the target page path
TIP
  1. Header Navigation: Focus on primary content sections
  2. Footer Navigation: Include secondary pages and site resources
  3. Path Settings: All paths are relative to the site root
  4. Link Consistency: Ensure consistency between header and footer navigation links

Social Media Integrationh2

Litos includes a built-in social media integration feature that allows you to showcase your social media presence. The social links appear in a designated area of your site:

Social-links

Configure your social media links in the src/config.ts file:

src/config.ts
export const SOCIAL_LINKS: SocialLink[] = [
{
name: 'github', // Platform identifier
url: 'https://github.com/yourname', // Your profile URL
icon: 'icon-[ri--github-fill]', // Iconify icon class
count: 9 // Optional: follower count
},
{
name: 'twitter',
url: 'https://x.com/yourname',
icon: 'icon-[ri--twitter-x-fill]',
},
{
name: 'bilibili',
url: 'https://space.bilibili.com/yourSpaceId',
icon: 'icon-[ri--bilibili-fill]',
},
]

Each social link object supports the following properties:

PropertyDescriptionDetails
namePlatform IdentifierUsed for internal reference and accessibility
urlProfile URLDirect link to your profile page on the platform
iconIcon Class NameIcon class from Iconify, customizable through Tailwind CSS
count (optional)Follower CountOptional, displays follower count; automatically updates GitHub followers when GitHub integration is enabled
TIP
  1. Browse and select your preferred social media icons from Iconify
  2. Maintain consistent icon styles across all social links
  3. Enable GitHub integration for automatic follower count updates
  4. Test social links visibility in both light and dark theme modes

Github configurationh2

spotlight

When you visit the homepage, you’ll notice the GitHub data display area (Spotlight) as shown in the image. This feature can be enabled through the following configuration.

Configuration Detailsh3

Configure GitHub-related features in the src/config.ts file:

src/config.ts
export const GITHUB_CONFIG: GithubConfig = {
ENABLED: true,
GITHUB_USERNAME: 'Dnzzk2',
TOOLTIP_ENABLED: true,
}

Configuration options explained:

PropertyDescriptionDetails
ENABLEDEnable GitHub FeaturesType: boolean, Default: true. When enabled, displays Spotlight and automatically updates GitHub follower count in Social Links
GITHUB_USERNAMEGitHub UsernameType: string, Username to retrieve data
TOOLTIP_ENABLEDWhether to enable tooltipType: boolean, Default: true. When the mouse hovers, the specific contribution value is displayed
TIP

This feature has been moved from a build request to a client request, using the API provided by github-contributions-api. Many thanks to them for opening up.

Skills Configurationh2

skills

The Skill module is configured via SKILLSSHOWCASE_CONFIG in config.ts.

src/config.ts
export const SKILLSSHOWCASE_CONFIG: SkillsShowcaseConfig = {
SKILLS_ENABLED: true,
SKILLS_DATA: [
{
direction: 'left',
skills: [
{
name: 'JavaScript',
icon: 'icon-[mdi--language-javascript]',
},
{
name: 'CSS',
icon: 'icon-[mdi--language-css3]',
},
{
name: 'HTML',
icon: 'icon-[mdi--language-html5]',
},
{
name: 'TypeScript',
icon: 'icon-[mdi--language-typescript]',
},
],
},
{
direction: 'right',
skills: [
{
name: 'Astro',
icon: 'icon-[lineicons--astro]',
},
{
name: 'Node.js',
icon: 'icon-[mdi--nodejs]',
},
{
name: 'React',
icon: 'icon-[mdi--react]',
},
{
name: 'Next.js',
icon: 'icon-[devicon--nextjs]',
},
{
name: 'Tailwind CSS',
icon: 'icon-[mdi--tailwind]',
},
{
name: 'Iconify',
icon: 'icon-[line-md--iconify2-static]',
},
],
},
],
}

The following is a detailed explanation of the various properties in the SKILLSSHOWCASE_CONFIG configuration object:

PropertyDescriptionDetails
SKILLS_ENABLEDWhether to enable the skill display functionSet to true to enable the skill display module, set to false to disable
SKILLS_DATASkill display data arrayContains multiple skill groups, each group can have different directions and skill lists
  directionSkill group display directionOptional values: left or right, determines the animation direction of the skill group on the page
  skillsSkill listAll skill items under this direction group
    nameSkill nameDisplayed skill name text
    iconSkill iconIcon in Iconify format, available from Iconify Icon Set get

The skill display module allows you to showcase your technology stack and professional skills on your personal homepage. With the direction property, you can create skill groups with alternating directions to make the page more dynamic and visually appealing. Each skill item contains a name and an icon. The icon is integrated using Iconify, providing thousands of optional icons.

You can add as many skill groups as you want, and each group can contain as many skills as you want. For example, you can organize skills by technology category (front-end, back-end, tools, etc.) or proficiency level.

Posts Configurationh2

Litos provides comprehensive configuration options for blog posts through the POSTS_CONFIG object in src/config.ts. This section covers post display settings, pagination, and layout options.

src/config.ts
export const POSTS_CONFIG: PostConfig = {
title: 'Posts',
description: 'Posts by Dnzzk2',
introduce: 'Here, I will share the usage instructions for this theme to help you quickly use it.',
author: 'Dnzzk2',
homePageConfig: {
size: 5,
type: 'compact',
},
postPageConfig: {
size: 10,
type: 'image',
},
tagsPageConfig: {
size: 10,
type: 'time-line',
},
defaultHeroImage: '/og-image.jpg',
defaultHeroImageAspectRatio: '16/9', // '16/9' || '3/4'
imageDarkenInDark: true,
readMoreText: 'Read more',
prevPageText: 'Previous',
nextPageText: 'Next',
tocText: 'Catalogue',
backToPostsText: 'Back to Posts',
nextPostText: 'Next Post',
prevPostText: 'Previous Post',
}

The following is a detailed explanation of the various properties in the POSTS_CONFIG configuration object:

PropertyDescriptionDetails
titlePosts Page TitleDisplayed in the browser tab and search results
descriptionPosts Page DescriptionUsed for SEO
introducePosts Page IntroduceIntroduce below the page title
authorPosts AuthorUsed in meta tags and attribution information
homePageConfigHomepage Post Display SettingsConfigures the display of posts on the homepage
  sizeNumber of Posts per PageThe upper limit of displayed posts
  typePost Display TypeThe card types displayed in the post list: compactimagetime-line
  heroImageLayoutPosition of the imageThe position of the image in the card: leftright. When the type is an image, it can be used. The default is one left and one right. This attribute can be used to force changes, but its priority is not as high as the frontmatter inside MD
postPageConfigIndividual Post Display SettingsConfigures the display of individual posts
  sizeNumber of Posts per PageThe number of pages in pagination
  typePost Display TypeThe card types displayed in the post list: compactimagetime-line
  heroImageLayoutPosition of the imageThe position of the image in the card: leftright. When the type is an image, it can be used. The default is one left and one right. This attribute can be used to force changes, but its priority is not as high as the frontmatter inside MD
tagsPageConfigTags Page Display SettingsConfigures the display of posts by tags
  sizeNumber of Posts per PageThe number of pages in pagination
  typePost Display TypeThe card types displayed in the post list: compactimagetime-line
  heroImageLayoutPosition of the imageThe position of the image in the card: leftright. When the type is an image, it can be used. The default is one left and one right. This attribute can be used to force changes, but its priority is not as high as the frontmatter inside MD
defaultHeroImageDefault Hero ImageThe default cover image displayed in image mode in the post list
defaultHeroImageAspectRatioDefault Hero Image Aspect RatioThe aspect ratio of the default cover image
imageDarkenInDarkDarken Hero Image in Dark ModeWhether to darken the cover image in dark mode
readMoreTextRead More TextThe text content of “Read More” under the picture card
prevPageTextPrevious Page TextThe text displayed on the previous page button
nextPageTextNext Page TextThe text displayed on the next page button
tocTextTable of Contents TextThe text displayed in the table of contents
backToPostsTextBack to Posts TextThe text displayed on the back to posts button
nextPostTextNext Post TextThe text displayed on the next post button
prevPostTextPrevious Post TextThe text displayed on the previous post button

There are three places in this theme that display the Post list, so three properties are used to configure them.

There are three places in this theme that display the Post list, so three properties are used to configure them. They are homePageConfig, postPageConfig, and tagsPageConfig. Matching the homepage, post page, and detailed tag page respectively.

In order to maintain the richness of the page style, I have set three values for the type attribute under these three attributes, corresponding to three post cards, which are: compactimagetime-line.

compact
image
time-line

Configure the style you think is suitable on three pages, and of course, you can also create your own card style by creating your card file in src/components/posts/card and importing it to List.astro in the same directory for configuration.

Tags Configurationh2

Tags Configuration only provides two basic configuration properties:

src/config.ts
export const TAGS_CONFIG: TagsConfig = {
title: 'Tags',
description: 'Tags by Dnzzk2',
introduce: 'All the tags for posts are here, you can click to filter them.',
}
PropertyDescriptionDetails
titleTags Page TitleDisplayed in the browser tab and search results
descriptionTags Page DescriptionUsed for SEO
introduceTags Page IntroduceIntroduce below the page title

Projects Configurationh2

Projects Configuration only provides two basic configurations:

src/config.ts
export const PROJECTS_CONFIG: ProjectsConfig = {
title: 'Projects',
description: 'Projects by Dnzzk2',
introduce: 'The examples of my projects.',
}

In addition, it also provides configuration for ProjectList.

src/config.ts
export const ProjectList: Project[] = [
{
name: 'Litos',
description: 'A blog theme built with Astro.js and Dnzzk2.',
githubUrl: 'https://github.com/Dnzzk2/Litos',
website: 'https://litos.vercel.app/',
type: 'icon',
icon: 'icon-[ri--github-fill]',
star: 1,
},
{
name: 'Litos',
description: 'A blog theme built with Astro.js and Dnzzk2.',
githubUrl: 'https://github.com/Dnzzk2/Litos',
website: 'https://litos.vercel.app/',
type: 'image',
icon: '/projects/logo.png',
star: 1,
},
]
PropertyDescriptionDetails
nameProject NameProject name
descriptionProject DescriptionProject description
introduceProject Page IntroduceIntroduce below the page title
githubUrl (optional)Project GitHub URLProject github address
website (optional)Project Website URLProject URL
typeProject TypeUsed for displaying the project type: iconimage
iconProject IconWhen the type is icon, use iconify to display the icon. When it is image, use it for the image address. Put the image address in public/projects
imageClass (optional)Project Image ClassWhen type is an image, it is used to modify the image
star (optional)Project StarNumber of stars
fork (optional)Project ForkNumber of fork