Antares Doc


Published on Last modified on AstroδΈ¨Doc 326 Word 2 minutes

Antares

Astro-based Blog Template

Github | Demo Page

πŸ’» Installation

  • Git
    git clone https://github.com/coderxi1/astro-antares blog
    
  • Astro
    pnpm create astro@latest -- --template coderxi1/astro-antares
    

πŸ’» Start

  • Move to the blog directory, then install dependencies and start development
cd [/path/to/]
pnpm install
pnpm run dev

πŸŽ‰ Features

  • βœ… Simple style: Minimalist! Minimalist! And still minimalist!
  • βœ… Dark Mode: Night mode <html class="dark">
  • βœ… Responsive Design: Responsive design based on unocss, adapting to different devices.
  • βœ… Attached sitemap: Comes with a sitemap / subscription rss.xml feed.xml baidusitemap.xml sitemap-index.xml
  • βœ… Easy-to-secondary-develop: Create custom pages quickly and efficiently, and freely adjust sidebar cards.
  • βœ… Easy-to-use: Most of the configurations that need to be changed are integrated in src/config.ts
  • βœ… Post-Frontmatter: Richer frontmatter, including top function, encryption function, etc.

πŸ–₯️ Create Page

.astro

  • src/pages/archives.astro
    <PageLayout
      title="Archive"
      titleIcon="mdi:archive"
      asideCards={['CardRecentPost','CardCategroies','CardTagCloud']}
    >
      <PostListSimple posts={posts}/>
    </PageLayout>
    

.mdx

  • src/pages/archives.mdx
    ---
    layout: '@/layouts/PageLayout.astro'
    asideCards: 
      - CardRecentPost
      - CardCategroies
      - CardTagCloud
    title: 'Archive'
    titleIcon: 'mdi:archive'
    ---
    
    import posts from '@/content/posts'
    import PostListSimple from '@/components/PostListSimple.astro'
    
    <PostListSimple posts={posts}/>
    

βš™ Configuration

config.ts

  • src/config.ts
    ConfigurationDescription
    SITE_INFOBasic information about the website, such as title, description, etc.
    POST_PAGE_SIZENumber of posts or content items displayed per page.
    DEFAULT_FRONTMATTERDefault post or page metadata configuration, such as title, date, tags, etc.
    SIDEBAR_SETTINGSConfiguration for what is displayed in the website sidebar, such as navigation, search box, etc.
    ASIDE_CARDSSidebar cards or additional information sections.
    NAV_ITEMSLinks in the navigation bar, such as home page, blog, etc.
    FOOTERFooter content, such as copyright information, site links, etc.
    FRIEND_LINKFriend links, which are links to other related websites.

Post-Frontmatter

  • posts/*.md
    FieldContentOptionalDescription
    title'Antares Documentation'RequiredTitle
    titleIcon'/favicon.svg'OptionalTitle icon
    titleColor'#0998DF'OptionalTitle gradient color
    publishDate'2024-12-19'OptionalPublish date (defaults to file creation date)
    updatedDate'2024-12-19'OptionalUpdated date (defaults to file modification date)
    tags['Astro', 'TagD']OptionalTags
    categories['Astro', 'Demo']OptionalCategories
    description'No description available.'OptionalPost description
    top1OptionalPin post (the larger the number, the closer to the top)
    password123456OptionalSet a password for the post
    bodyJoin./README.mdOptionalProvide a file path to join another markdown document