Skip to content

Commit

Permalink
Merge pull request #286 from KevinZhang19870314/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinZhang19870314 committed Apr 18, 2024
2 parents ec50cd0 + ee4337e commit ffcb52f
Show file tree
Hide file tree
Showing 29 changed files with 3,006 additions and 3 deletions.
1 change: 0 additions & 1 deletion .gitattributes

This file was deleted.

33 changes: 33 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: gp-pages
on:
push:
branches:
- main
paths:
- 'sites/**'

jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set-up Node
uses: actions/setup-node@v1
with:
node-version: "18.15.0"
- name: Install pnpm
run: npm install -g pnpm
- name: Install dependencies
run: pnpm i
working-directory: ./sites
- name: Build gh-pages
run: pnpm docs:build
working-directory: ./sites
- name: Deploy to gh-pages
uses: crazy-max/ghaction-github-pages@v1
with:
target_branch: gh-pages
build_dir: sites/docs/.vuepress/dist
env:
GITHUB_TOKEN: ${{ secrets.MY_TOKEN }}
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,12 @@
.vscode
/**/.streamlit
__pycache__
logs/
logs/

node_modules
# VuePress 默认临时文件目录
/sites/docs/.vuepress/.temp
# VuePress 默认缓存目录
/sites/docs/.vuepress/.cache
# VuePress 默认构建生成的静态文件目录
/sites/docs/.vuepress/dist
2 changes: 1 addition & 1 deletion changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
versioning="pep440",
bump="1.1.2", # 指定bump版本
in_place=True,
)
)
163 changes: 163 additions & 0 deletions sites/docs/.vuepress/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
import { viteBundler } from "@vuepress/bundler-vite";
import { defaultTheme } from "@vuepress/theme-default";
import { defineUserConfig } from "vuepress";

const base = "MoneyPrinterTurbo";
const isProd = process.env.NODE_ENV === "production";

export default defineUserConfig({
lang: "zh-CN",
base: `/${base}/`,
bundler: viteBundler(),
theme: defaultTheme({
repo: "harry0703/MoneyPrinterTurbo/sites",
docsDir: "docs",
colorModeSwitch: false,
locales: {
"/": {
// navbar
navbar: [
{ text: "Guide", link: "/guide/" },
{ text: "Components", link: "/components/" },
],
selectLanguageText: "Languages",
selectLanguageName: "English",
selectLanguageAriaLabel: "Select language",
// sidebar
sidebar: {
"/guide/": getGuideSidebar("Guide", "Advanced"),
"/components/": getComponentsSidebar("Components", "Advanced"),
},
// page meta
editLinkText: "Edit this page on GitHub",
},
"/zh/": {
// navbar
navbar: [
{ text: "指南", link: "/zh/guide/" },
{ text: "组件", link: "/zh/components/" },
],
selectLanguageText: "选择语言",
selectLanguageName: "简体中文",
selectLanguageAriaLabel: "选择语言",
// sidebar
sidebar: {
"/zh/guide/": getGuideSidebar("指南", "深入"),
"/zh/components/": getComponentsSidebar("组件", "高级"),
},
// page meta
editLinkText: "在 GitHub 上编辑此页",
lastUpdatedText: "上次更新",
contributorsText: "贡献者",
// custom containers
tip: "提示",
warning: "注意",
danger: "警告",
// 404 page
notFound: [
"这里什么都没有",
"我们怎么到这来了?",
"这是一个 404 页面",
"看起来我们进入了错误的链接",
],
backToHome: "返回首页",
},
},
themePlugins: {
// only enable git plugin in production mode
git: isProd,
},
}),
locales: {
"/": {
lang: "en-US",
title: "MoneyPrinterTurbo",
description: "Generate short videos with one click using AI LLM.",
},
"/zh/": {
lang: "zh-CN",
title: "MoneyPrinterTurbo",
description: "利用AI大模型,一键生成高清短视频。",
},
},
head: [
[
"link",
{
rel: "icon",
type: "image/png",
sizes: "16x16",
href: `/${base}/icons/favicon-16x16.png`,
},
],
[
"link",
{
rel: "icon",
type: "image/png",
sizes: "32x32",
href: `/${base}/icons/favicon-32x32.png`,
},
],
["meta", { name: "application-name", content: "MoneyPrinterTurbo" }],
[
"meta",
{ name: "apple-mobile-web-app-title", content: "MoneyPrinterTurbo" },
],
["meta", { name: "apple-mobile-web-app-capable", content: "yes" }],
[
"meta",
{ name: "apple-mobile-web-app-status-bar-style", content: "black" },
],
[
"link",
{
rel: "apple-touch-icon",
href: `/${base}/icons/apple-touch-icon-152x152.png`,
},
],
[
"link",
{
rel: "mask-icon",
href: "/${base}/icons/safari-pinned-tab.svg",
color: "#3eaf7c",
},
],
[
"meta",
{
name: "msapplication-TileImage",
content: "/${base}/icons/msapplication-icon-144x144.png",
},
],
["meta", { name: "msapplication-TileColor", content: "#000000" }],
["meta", { name: "theme-color", content: "#3eaf7c" }],
],
});

function getGuideSidebar(groupA: string, groupB: string) {
return [
{
text: groupA,
children: ["README.md", "1.md", "2.md"],
},
{
text: groupB,
children: ["custom-validator.md", "1.md", "2.md", "3.md"],
},
];
}

function getComponentsSidebar(groupA: string, groupB: string) {
return [
{
text: groupA,
children: ["README.md", "1.md", "2.md"],
},
{
text: groupB,
children: ["custom-components.md"],
},
];
}
Binary file added sites/docs/.vuepress/public/hero.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sites/docs/.vuepress/public/icons/favicon-16x16.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
149 changes: 149 additions & 0 deletions sites/docs/.vuepress/public/icons/safari-pinned-tab.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sites/docs/.vuepress/public/logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions sites/docs/.vuepress/public/manifest.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "VuePress",
"short_name": "VuePress",
"description": "Vue-powered Static Site Generator",
"start_url": "/index.html",
"display": "standalone",
"background_color": "#fff",
"theme_color": "#3eaf7c",
"icons": [
{
"src": "/icons/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/icons/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
]
}

0 comments on commit ffcb52f

Please sign in to comment.