Skip to content

Liksone/astro-theme-sora

Repository files navigation

logo

A blog theme built with Astro

Like this theme? Don't forget to give it a 🌟Star!

English | 简体中文

Preview

My Blog

Who is using

Welcome to open an Issue to show your website.

Getting Started

  1. Install the theme

    • Install pnpm
    • pnpm create astro@latest --template Liksone/astro-theme-sora
    • Enter the project directory and run pnpm run init to initialize the project
  2. Configure the theme

    Edit the configuration file src/config/theme.yaml to customize the theme. See Configuration for details.

  3. Edit posts

    Edit in the src/content/ directory. Markdown format is supported.

  4. Deploy the website

    Run pnpm build to build the website. The output will be in the dist/ directory. You can run pnpm preview to preview the website locally.

    Deploy the website to your server, or refer to the Astro documentation to deploy it to Vercel, Netlify, GitHub Pages, or other platforms.

Configuration

The configuration file is src/config/theme.yaml.

Site Information

site:
  # website address
  url: "https://example.com"
  # website title
  title: "Sora"
  # author name
  author: "Liks"
  # website description
  description: "A blog theme built with Astro"
  # website favicon
  # supports SVG, PNG, ICO formats
  # local file path located in the public/favicon/ directory
  favicon: "favicon.ico"

Global Settings

global:
  # avatar
  # local file path located in the src/config/images/ directory
  avatar: "avatar.jpg"
  # enable RSS
  rss: true
  # enable i18n support (still in development)
  i18n: false

Navigation Bar

nav:
  - # page name
    name: "Archives"
    # page address
    url: "/archives"
  - name: "Categories"
    url: "/categories"
  - name: "Tags"
    url: "/tags"
  - name: "About"
    url: "/about"
  ...

Footer

footer:
  # copyright
  copyright:
    # copyright owner
    owner: "Liks"
    # site establishment time
    time: "2024 - 2025"
  # filing (China-specific)
  beian:
    # ICP filing
    icp:
      # enable
      enabled: false
      # filing number
      number: "京 ICP 备 12345678 号"
    # police filing
    police:
      # enable
      enabled: false
      # filing number
      number: "京公网安备 12345678901234 号"
      # filing URL
      url: "https://beian.mps.gov.cn/webcode=?"

Index

index:
  # social media
  social:
    - # name
      name: "GitHub"
      # enable
      enabled: true
      # URL
      url: "https://github.com/Liksone"
    ...

Supports BiliBili, Email, Facebook, GitHub, Instagram, QQ, Telegram, Twitter/X, YouTube, Weibo, Xiaohongshu, and Zhihu.

Post

post:
  # copyright license
  copyright:
    # CC license
    CCLicense:
      BY: true
      NC: true
      SA: true
      ND: false
    # license URL
    url: "https://creativecommons.org/licenses/by-nc-sa/4.0"

Sponsorship

sponsor:
  # enable
  enabled: true
  # Alipay QR code
  alipay:
    # enable
    enabled: true
    # local file path located in the src/config/images/ directory
    image: "alipay.png"
  # WeChat QR code
  wechat:
    enabled: false
  # display sponsor list
  list: true

Comment

comment:
  # enable
  enabled: false
  # Artalk - https://artalk.js.org
  artalk:
    enabled: false
    # backend server address
    server: "https://artalk.example.com"
    # site name
    site: "Sora"

Tools

tools:
  # Umami - https://umami.is
  umami:
    # enable
    enabled: false
    # server address
    src: "https://cloud.umami.is"
    # data-website-id
    websiteID: "c26d92e7-d859-43be-991c-5a5dd0503eb9"

Update

git remote add upstream https://github.com/Liksone/astro-theme-sora.git
git fetch upstream
git merge upstream/main --squash --allow-unrelated-histories

Suitable for users familiar with Git, sometimes manual conflict resolution is required.

(For normal users, considering how to separate the theme from user files, such as the organization of other static site generators like Hugo, to avoid relying on Git.)

License

GNU General Public License v3.0

Acknowledgments

About

A blog theme built with Astro

Topics

Resources

License

Stars

Watchers

Forks