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).

StackBlitz

This is an extremely simple project. You only need the following files to rapidly build your own blog!

  • pages folder: storing the pages/posts
  • valaxy.config.ts: Valaxy’s configuration file
  • package.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 init caches your previously downloaded version, I would recommend using pnpm to create templates. Install pnpmnpm i -g pnpm

bash
pnpm create valaxy
bash
npm init valaxy
You 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:

bash
# install
pnpm i
bash
# install
npm i

Start a preview:

bash
# start
pnpm dev
bash
# start
npm run dev

See 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

bash
cd your-blog
# upgrade valaxy
pnpm add valaxy@latest
# upgrade theme
pnpm add valaxy-theme-yun@latest
bash
cd your-blog
# upgrade valaxy
npm i valaxy@latest
# upgrade theme
npm i valaxy-theme-yun@latest

pnpm

You can use the interactive upgrade command provided by pnpm.

bash
# interactive upgrade
pnpm up --latest -i

Migration

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 pages
    • posts: write your posts here, will be counted as posts
  • styles: override theme styles, index.scss/vars.csss/index.css will be loaded automatically
  • components: custom your vue components (will be loaded automatically)
  • layouts: custom layouts (use it by layout: xxx in 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 Pages
  • netlify.toml: for netlify
  • vercel.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.

Contributors