This project is a reconstruction of Hexo Theme ShokaX on Astro, built with Astro + Svelte 5 + UnoCSS.
Three-column layout preview:
π Live preview (two-column): https://preview.astro.kaitaku.xyz/
We recommend using Bun to run this project. Compatibility with Node.js is not guaranteed.
You can clone this repository directly to get started (and maybe drop us a Star π), or use the interactive installation flow provided by HyC.
Quick start:
git clone https://github.com/theme-shoka-x/astro-blog-shokax
cd astro-blog-shokax
bun install
# Start the development server
bun run dev
# Build for production
bun run build
Your site is now ready to use. If you'd like to customize it, check the full documentation for the next step: ShokaX Astro Docs
This project follows the standard directory conventions of Astro 5 and Vite:
astro-blog-shokax
βββ src/ # Source files
β βββ assets/ # Images / fonts
β β βββ fonts/ # Fonts
β β βββ images/ # π Cover images
β β βββ icons/ # Part of RemixIcon assets (used for Shadow DOM)
β β βββ avatar.avif # π Site owner avatar
β βββ components/ # Astro / Svelte components
β βββ content/ # Content outside collections
β β βββ friend-rules.md # π Friends link rules
β βββ i18n/ # i18n system
β βββ layouts/ # Page layouts
β βββ moments/ # π Moments / status content collection
β βββ pages/ # Route pages
β βββ posts/ # π Post content collection
β βββ remark-plugins/ # Markdown extensions
β βββ stores/ # Global stores
β βββ styles/ # Non-component stylesheets
β βββ toolkit/ # Utilities
β βββ content.config.ts # Content collections config
β βββ theme.config.ts # π Theme configuration
β βββ theme.config.template.txt # HyC interactive config template
βββ hyacine.yml # HyC configuration
βββ astro.config.mjs # π Astro configuration
# Items marked with π are the key files/folders you will likely care about when using this theme
ShokaX includes @hyacine/cli and @hyacine/core and provides the following capabilities:
# Global installation is recommended, or you can use `bun hyc` later instead of `hyc`
bun add @hyacine/cli -g
hyc sync # Sync database and content collections
# Create a new post
hyc new "Title"
# Publish a post
hyc publish "title/slug/file-name"
# Sort posts by category
hyc sort category
# Start the local CMS and interactive configuration
hyc serve
# Visit the official console at https://hyc.kaitaku.xyz/ to get started
# HyC plugins are currently in Alpha and related documentation is still in progress
# This theme currently enables the Site-Uptime (site age) and Mouse-firework (click effect) plugins by default
# See hyacine.plugin.ts for details
We use LHCI to test page performance, and each commit includes test results. Our minimum requirement is Lighthouse desktop Performance 92+, and in practice the score is usually around 98β100:
We have introduced an experimental three-column layout in ShokaX Astro:
You can configure which cards are shown in the right sidebar and in what order. The currently supported cards are:
You can enable it by editing the configuration file:
layout: {
mode: "three-column",
rightSidebar: {
order: ["announcement", "search", "calendar", "recentMoments", "randomPosts", "tagCloud"],
announcement: true,
search: true,
calendar: true,
recentMoments: true,
randomPosts: true,
tagCloud: true,
},
},
The right sidebar is shown only on wide screens (desktop). On mobile, the original two-column layout is used.
Pull requests are welcome. The project uses the following workflows to validate changes:
If CI does not pass, you can still submit a PR and we will help improve it.
This project is licensed under AGPL v3.
licenses directory as LICENSE-shoka.licenses/LICENSE-maple-mono.txt and licenses/OFL.txt respectively.
During the build process, fonts may be subsetted, converted, and compressed in compliance with OFL 1.1.LICENSE in the repository root applies only to the code assets in this project. For any non-code assets not covered above or not explicitly identified, the root license does not apply and rights should be considered reserved by the original author.The ShokaX development team would like to thank every open source project, user, contributor, and developer who has supported ShokaX in the past, present, and future. Without them, this project would not exist.
These projects in particular have provided tremendous support during development, and we would like to thank them again here (in no particular order):