docs: add unocss & vue-components register

This commit is contained in:
YunYouJun 2023-07-17 21:47:11 +08:00
parent 4ef1d6573a
commit 46200f69ae
13 changed files with 816 additions and 437 deletions

View File

@ -2,7 +2,7 @@ import { defineConfig } from 'vitepress'
// https://vitepress.dev/reference/site-config
export default defineConfig({
title: 'Valaxy Docs',
title: 'Valaxy',
description: 'Docs for Valaxy',
themeConfig: {
// https://vitepress.dev/reference/default-theme-config

View File

@ -0,0 +1,20 @@
<template>
<div m="auto y-8" text="center" font="black">
<h3 text="3xl">
🧪
</h3>
<div class="mt-5 flex">
<div class="mx-auto">
<p>or try it now</p>
<div class="language-bash m-2 p-2" bg="$vp-c-bg-soft">
<pre my="0"><code><span class="opacity-50">$ </span><span class="token function">pnpm create</span> <span class="token text-$vp-c-brand-lighter">valaxy</span></code></pre>
</div>
</div>
</div>
<div mt="8" text="3xl">
WORK IN PROGRESS
</div>
</div>
</template>

View File

@ -0,0 +1,7 @@
<template>
<p align="center">
<a href="https://sponsors.yunyoujun.cn">
<img src="https://sponsors.yunyoujun.cn/sponsors.svg">
</a>
</p>
</template>

View File

@ -3,6 +3,8 @@ import { h } from 'vue'
import Theme from 'vitepress/theme'
import './style.css'
import 'uno.css'
export default {
extends: Theme,
Layout: () => {

View File

@ -8,10 +8,11 @@
* -------------------------------------------------------------------------- */
:root {
--vp-c-brand: #646cff;
--vp-c-brand-light: #747bff;
--vp-c-brand-lighter: #9499ff;
--vp-c-brand-lightest: #bcc0ff;
--vp-c-brand: #6c22ec;
--vp-c-brand-light: #5849eb;
--vp-c-brand-lighter: #5553eb;
--vp-c-brand-lightest: #5553ebcc;
--vp-c-brand-dark: #535bf2;
--vp-c-brand-darker: #454ce1;
--vp-c-brand-dimm: rgba(100, 108, 255, 0.08);

View File

@ -2,6 +2,9 @@
# https://vitepress.dev/reference/default-theme-home-page
layout: home
title: Valaxy
titleTemplate: 'Next Generation Static Blog Framework'
hero:
name: Valaxy
text: Next Generation Static Blog Framework
@ -12,7 +15,8 @@ hero:
actions:
- theme: brand
text: Get Started
link: /guide
# link: /guide
link: /pages/guide/getting-started.md
- theme: alt
text: Why Valaxy?
link: /guide/why
@ -32,3 +36,5 @@ features:
details: Go wild with true SSG + SPA architecture. Static on page load, but engage users with 100% interactivity from there.
---
<HomeHero />
<ValaxySponsors />

View File

@ -18,7 +18,7 @@
"valaxy-theme-press": "link:../packages/valaxy-theme-press"
},
"devDependencies": {
"nodemon": "^2.0.22",
"nodemon": "^3.0.1",
"vitepress": "1.0.0-beta.5"
}
}

25
docs/uno.config.ts Normal file
View File

@ -0,0 +1,25 @@
import {
defineConfig,
presetAttributify,
presetIcons,
presetTypography,
presetUno,
transformerDirectives,
transformerVariantGroup,
} from 'unocss'
export default defineConfig({
presets: [
presetUno(),
presetAttributify(),
presetIcons({
scale: 1.2,
warn: true,
}),
presetTypography(),
],
transformers: [
transformerDirectives(),
transformerVariantGroup(),
],
})

18
docs/vite.config.ts Normal file
View File

@ -0,0 +1,18 @@
import { defineConfig } from 'vite'
import UnoCSS from 'unocss/vite'
import Components from 'unplugin-vue-components/vite'
export default defineConfig({
plugins: [
UnoCSS(),
// https://github.com/antfu/unplugin-vue-components
Components({
allowOverrides: true,
dirs: ['.vitepress/theme/components'],
dts: '.vitepress/theme/components.d.ts',
// for docs md
include: [/\.vue/, /\.md/],
}),
],
})

View File

@ -2,7 +2,7 @@
"name": "@valaxyjs/monorepo",
"version": "0.14.40",
"private": true,
"packageManager": "pnpm@8.6.7",
"packageManager": "pnpm@8.6.8",
"description": "📄 Vite & Vue powered static blog generator.",
"author": {
"email": "me@yunyoujun.cn",

View File

@ -34,9 +34,6 @@ const YunAlgoliaSearch = isAlgolia.value
</template>
<style lang="scss">
@use 'sass:map';
@use 'valaxy/client/styles/vars.scss' as *;
.search-btn {
position: absolute;
top: 0.6rem;

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,4 @@
packages:
- docs
- packages/*
- demo/*