Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Zengzzhao committed Jan 9, 2025
0 parents commit 892eea7
Show file tree
Hide file tree
Showing 48 changed files with 9,809 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
dist
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
42 changes: 42 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: GitHub Pages

on:
push:
branches:
# The branch where the project source code resides
# 项目源代码所在的分支
- main
- master
- valaxy

jobs:
build:
runs-on: ${{ matrix.os }}

strategy:
matrix:
node-version: [lts/*]
os: [ubuntu-latest]
fail-fast: false

steps:
- uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/

- name: 📦 Install Dependencies
run: npm i

- name: 🌌 Build Valaxy Blog
run: npm run build

- name: 🪤 Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
force_orphan: true
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# valaxy

valaxy-fuse-list.json

# vite-ssg

.vite-ssg-dist
.vite-ssg-temp

temp/

.DS_Store
*.local
dist
dist-ssr
node_modules
.idea/
*.log

components.d.ts
3 changes: 3 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# for pnpm
shamefully-hoist=true
strict-peer-dependencies=false
37 changes: 37 additions & 0 deletions .valaxy/typed-router.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/* eslint-disable */
/* prettier-ignore */
// @ts-nocheck
// Generated by unplugin-vue-router. ‼️ DO NOT MODIFY THIS FILE ‼️
// It's recommended to commit this file.
// Make sure to add this file to your tsconfig.json file as an "includes" or "files" entry.

declare module 'vue-router/auto-routes' {
import type {
RouteRecordInfo,
ParamValue,
ParamValueOneOrMore,
ParamValueZeroOrMore,
ParamValueZeroOrOne,
} from 'vue-router'

/**
* Route name map generated by unplugin-vue-router
*/
export interface RouteNamedMap {
'/': RouteRecordInfo<'/', '/', Record<never, never>, Record<never, never>>,
'/[...path]': RouteRecordInfo<'/[...path]', '/:path(.*)', { path: ParamValue<true> }, { path: ParamValue<false> }>,
'/404': RouteRecordInfo<'/404', '/404', Record<never, never>, Record<never, never>>,
'/about/': RouteRecordInfo<'/about/', '/about', Record<never, never>, Record<never, never>>,
'/about/site': RouteRecordInfo<'/about/site', '/about/site', Record<never, never>, Record<never, never>>,
'/archives/': RouteRecordInfo<'/archives/', '/archives', Record<never, never>, Record<never, never>>,
'/categories/': RouteRecordInfo<'/categories/', '/categories', Record<never, never>, Record<never, never>>,
'/links/': RouteRecordInfo<'/links/', '/links', Record<never, never>, Record<never, never>>,
'/page/[page]': RouteRecordInfo<'/page/[page]', '/page/:page', { page: ParamValue<true> }, { page: ParamValue<false> }>,
'/posts/': RouteRecordInfo<'/posts/', '/posts', Record<never, never>, Record<never, never>>,
'/posts/关于DataVz在vue3版本的BUG': RouteRecordInfo<'/posts/关于DataVz在vue3版本的BUG', '/posts/关于DataVz在vue3版本的BUG', Record<never, never>, Record<never, never>>,
'/posts/hello-valaxy': RouteRecordInfo<'/posts/hello-valaxy', '/posts/hello-valaxy', Record<never, never>, Record<never, never>>,
'/posts/test/tset': RouteRecordInfo<'/posts/test/tset', '/posts/test/tset', Record<never, never>, Record<never, never>>,
'/projects/': RouteRecordInfo<'/projects/', '/projects', Record<never, never>, Record<never, never>>,
'/tags/': RouteRecordInfo<'/tags/', '/tags', Record<never, never>, Record<never, never>>,
}
}
11 changes: 11 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"recommendations": [
"antfu.iconify",
"antfu.unocss",
"csstools.postcss",
"dbaeumer.vscode-eslint",
"vue.volar",
"lokalise.i18n-ally",
"YunYouJun.valaxy"
]
}
16 changes: 16 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"cSpell.words": ["valaxy", "valaxyjs"],
"i18n-ally.sourceLanguage": "en",
"i18n-ally.keystyle": "nested",
"i18n-ally.localesPaths": "locales",
"i18n-ally.sortKeys": true,
"prettier.enable": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"editor.formatOnSave": false,
"files.associations": {
"*.css": "postcss"
},
"svg.preview.background": "editor"
}
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM node:20-alpine as build-stage

WORKDIR /app
RUN corepack enable

COPY .npmrc package.json pnpm-lock.yaml ./
RUN --mount=type=cache,id=pnpm-store,target=/root/.pnpm-store \
pnpm install --frozen-lockfile

COPY . .
RUN pnpm build

FROM nginx:stable-alpine as production-stage

COPY nginx.conf /etc/nginx/nginx.conf
COPY --from=build-stage /app/dist /usr/share/nginx/html
EXPOSE 80

CMD ["nginx", "-g", "daemon off;"]
51 changes: 51 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# create-valaxy

Example: [valaxy.site](https://valaxy.site)

## Usage

```bash
# install
npm i
# or pnpm i

# start
npm run dev
# or pnpm dev
```

See `http://localhost:4859/`, have fun!

### Config

Modify `valaxy.config.ts` to custom your blog.

English & Chinese Docs is coming!

> Wait a minute.
### Docker

```bash
docker build . -t your-valaxy-blog-name:latest
```

## 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

### Other

- `.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](https://www.netlify.com/)
- `vercel.json`: for [vercel](https://vercel.com/)
7 changes: 7 additions & 0 deletions components/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Components

Components in this dir will be auto-registered and on-demand, powered by [`unplugin-vue-components`](https://github.com/antfu/unplugin-vue-components).

## Icons

You can use icons from almost any icon sets by the power of [Iconify](https://iconify.design/).
32 changes: 32 additions & 0 deletions components/YunFooter.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<script lang="ts" setup>
import { onMounted } from 'vue';
import YunFooter from 'valaxy-theme-yun/components/YunFooter.vue'
import 'aplayer/dist/APlayer.min.css';
import APlayer from 'aplayer';
onMounted(() => {
const ap = new APlayer({
container: document.getElementById('aplayer'),
fixed: true,
order: 'random',
audio: [
{
name: '酒馆儿',
artist: '蛋黄',
url: 'https://music.163.com/song/media/outer/url?id=1466888386.mp3',
cover: 'https://p2.music.126.net/yKVO0wAri_TPgq1ds12e2w==/109951165184677384.jpg?param=130y130',
}
]
});
});
</script>

<template>
<YunFooter>
<div style="display: flex; justify-content: center;">
<img src="https://count.getloli.com/@:ZengziZhao?theme=booru-twifanartsfw" alt="Ciallo~(∠・ω< )⌒★">
</div>
<div id="aplayer"></div>
</YunFooter>
</template>
10 changes: 10 additions & 0 deletions components/YunWaline.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<script lang="ts" setup>
import { useAddonWaline } from 'valaxy-addon-waline'
const addon = useAddonWaline()
</script>

<template>
要不要和我说些什么?
<WalineClient w="full" :options="addon.options" />
</template>
Loading

0 comments on commit 892eea7

Please sign in to comment.