Getting Started
Overview
Valaxy = V + Galaxy aims for the next generation static blog framework, providing better hot reloading and user loading experience, with easier and powerful customization support.
You can learn more about the original intensions for this project in Why Valaxy.
TIP
Valaxy is based on Vite to provide hot reloading and packaging, and based on Vue to realize client functionalities such as views (themes, custom components).
Therefore, Valaxy supports all extensions/plugins for Vite and Vue.
Create a Valaxy Project
Example: yun.valaxy.site
Try it Online
You can use StackBlitz to try Valaxy online (the default theme used is valaxy-theme-yun).
This is an extremely simple project. You only need the following files to rapidly build your own blog!
pagesfolder: storing the pages/postsvalaxy.config.ts: Valaxy’s configuration filepackage.json: dependencies
Locally
Compatibility Note
Vite@7 requires Node.js version ^20.19.0 || >=22.12.0. Valaxy also requires you to upgrade Node.js after version 20.19.0.
TIP
If you are a Windows user, I strongly recommend using a Unix-like shell (such as Git Bash or WSL rather than CMD / PowerShell.
Since
npm initcaches your previously downloaded version, I would recommend usingpnpmto create templates. Install pnpm:npm i -g pnpm
pnpm create valaxynpm init valaxyYou will be greeted with a few simple questions.
🌌 Valaxy v0.28.0-beta.2 ? Select a type: › - Use arrow-keys. Return to submit. ❯ Blog - For Most Users 【Press Enter】 Theme - For Theme Developers Addon - For Addon Developers ? Project name: › valaxy-blog 【Press Enter】 📁 /root/repos/valaxy-blog Scaffolding project in valaxy-blog ... Done. ? Install and start it now? › (Y/n) Press Y ? Choose the agent › - Use arrow-keys. Return to submit. npm yarn ❯ pnpm 【Press Enter】
Follow the prompt in the commandline to complete the process!
The default theme used is valaxy-theme-yun, but you can also install any other themes. This documentation is also a Valaxy theme: valaxy-theme-press. It is inspired by VitePress.
Usage
Enter the folder for the Valaxy project you just created, and execute the following commands. For example:
cd valaxy-blog.
Install the dependencies:
# install
pnpm i# install
npm iStart a preview:
# start
pnpm dev# start
npm run devSee http://localhost:4859/, have fun!
- See Config and Custom Extensions for the general configuration for Valaxy blogs.
- For configuring Valaxy themes, please see the documentation for the corresponding themes. (Docs for Valaxy Theme Yun is still work in progress)
Config
Modify valaxy.config.ts to custom your blog.
See Config for basic configuration.
Documentation is being improved!
Deployment
See Deployment for deployment guide.
Upgrading
cd your-blog
# upgrade valaxy
pnpm add valaxy@latest
# upgrade theme
pnpm add valaxy-theme-yun@latestcd your-blog
# upgrade valaxy
npm i valaxy@latest
# upgrade theme
npm i valaxy-theme-yun@latestpnpm
You can use the interactive upgrade command provided by
pnpm.
# interactive upgrade
pnpm up --latest -iMigration
If you are from another blog framework, you can refer to Migration.
Directory Structure
In most cases, you only need to work in the pages folder.
Main folders
pages: your all pagesposts: write your posts here, will be counted as posts
styles: override theme styles,index.scss/vars.csss/index.csswill be loaded automaticallycomponents: custom your vue components (will be loaded automatically)layouts: custom layouts (use it bylayout: xxxin md)locales: custom i18n
Others
.vscode: recommend some useful plugins & settings, you can preview icon/i18n/class….github: GitHub Actions to auto build & deploy to GitHub Pagesnetlify.toml: for netlifyvercel.json: for vercel
Themes
If you want to develop a theme and released, you can refer to valaxy-theme-starter.
Community
If you have questions or need help, you can go to the Discord and Discussions to ask for help.