Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jywangyou committed Nov 10, 2023
0 parents commit 99fb7f2
Show file tree
Hide file tree
Showing 339 changed files with 95,799 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/ join_case.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: 申请加入案例
about: 申请将你的站点展示在文档站案例页
title: 申请加入案例
labels: 申请加入案例
---

<!--
请按照模板填写,否则此申请将可能不会被通过并直接关闭。
站点要求:
1.使用Vdoing主题
2.有10篇以上文章
3.保留 footer 的主题推荐链接
-->

名称:站点名称
简介:站点简介
链接:站点链接
截图:站点截图链接
作者:作者名称
头像:作者头像链接

备注(可选): 知识库兼博客 | 社区 | 知识库 | 博客 | 文档站
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: 报告bug
about: 创建一个报告来帮助我们改进
title: "[bug]: "
labels: bug
---

<!--请按照模板填写,否则此issue将可能被关闭-->

## 问题描述
<!--xxxx-->

## 重现步骤
<!--
1. [xxx]
2. [xxx]
3. [xxx]
-->

## 重现链接(如有)
<!--https://xxx.com-->

## 问题截图(如有)
<!--![](xxx.jpg)-->

## 依赖版本
- node.js: <!--v1x.x.x-->
- @vuepress: <!--v1.x.x-->
- vuepress-theme-vdoing: <!--v1.x.x-->

## 补充说明(可选)
<!--xxxx-->
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: 提交疑问
about: 提交你的疑问
title: "[提问]: "
labels: 提问
---

<!--提示:问题描述越详细,提供的信息越完整越可能得到回答。但也不能保证所有问题都能得到回答。你也可以加入我们的交流QQ群:694387113-->

## 问题描述
<!--xxxx-->

## 重现步骤(可选)
<!--
1. [xxx]
2. [xxx]
3. [xxx]
-->

## 重现链接(可选)
<!--https://xxx.com-->

## 问题截图(可选)
<!--![](xxx.jpg)-->

## 依赖版本(可选)
- node.js: <!--v1x.x.x-->
- @vuepress: <!--v1.x.x-->
- vuepress-theme-vdoing: <!--v1.x.x-->

## 补充说明(可选)
<!--xxxx-->
22 changes: 22 additions & 0 deletions .github/workflows/baiduPush.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
## 利用GitHub Actions每天定时给百度推送链接,提高收录率 ##

name: baiduPush

# 两种触发方式:一、push代码,二、每天国际标准时间23点(北京时间+8即早上7点)运行
on:
push:
schedule:
- cron: '0 23 * * *' # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows#scheduled-events-schedule

# on:
# schedule:
# - cron: '*/5 * * * *' # 每5分钟一次,测试用

jobs:
bot:
runs-on: ubuntu-latest # 运行环境为最新版的Ubuntu
steps:
- name: 'Checkout codes' # 步骤一,获取仓库代码
uses: actions/checkout@v1
- name: 'Run baiduPush' # 步骤二,执行sh命令文件
run: npm install && npm run baiduPush # 运行目录是仓库根目录
48 changes: 48 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CI

#on: [push]

# 在master分支发生push事件时触发。
on:
push:
branches:
- master

env: # 设置环境变量
TZ: Asia/Shanghai # 时区(设置时区可使页面中的`最近更新时间`使用该时区时间)

jobs:
build: # 自定义名称
runs-on: ubuntu-latest # 运行在虚拟机环境ubuntu-latest

strategy:
matrix:
node-version: [18.x]

steps:
- name: Checkout # 步骤1
uses: actions/checkout@v1 # 使用的动作。格式:userName/repoName。作用:检出仓库,获取源码。 官方actions库:https://github.com/actions
- name: Use Node.js ${{ matrix.node-version }} # 步骤2
uses: actions/setup-node@v3 # 作用:安装nodejs
with:
node-version: ${{ matrix.node-version }} # 版本
- name: Build-and-deploy # 步骤3
run: |
remote_addr=`git remote get-url --push origin`
commit_info=`git describe --all --always --long`
user_name=`git log -1 --pretty=format:'%an'`
user_email=`git log -1 --pretty=format:'%ae'`
deploy_branch=gh-pages
yarn
yarn build
cd docs/.vuepress/dist
git config --global init.defaultBranch $deploy_branch
git init
git config user.name ${user_name}
git config user.email ${user_email}
git add -A
git commit -m "auto deploy, $commit_info"
remote_addr=`echo $remote_addr | awk -F'://' '{print $2}'`
remote_addr=https://${user_name}:${{secrets.GITHUB_TOKEN}}@${remote_addr}
git remote add origin ${remote_addr}
git push origin HEAD:$deploy_branch --force # 推送到github $deploy_branch分支
22 changes: 22 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# npm
package-lock.json
node_modules

# yarn
yarn.lock
yarn-error.log

# pnpm
pnpm-lock.yaml

# vscode
.vscode

# vuepress
docs/.vuepress/dist

# 百度链接推送
urls.txt

# mac
.DS_Store
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019-present gaoyi(Evan) Xu

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
12 changes: 12 additions & 0 deletions README.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

## 介绍
1. 这个主题的初衷是打造一个好用的、面向程序员的`知识管理工具`
2. 轻松构建一个`结构化`的知识库,让你的知识海洋像一本本书一样清晰易读。
3. 博客功能提供一种知识的`碎片化`形态,并支持个性化博客配置。
4. `简洁高效`,以 Markdown 为中心的项目结构。内置自动化工具,以更少的配置完成更多的事。配合多维索引快速定位每个知识点。


## 许可证
[MIT](https://github.com/xugaoyi/vuepress-theme-vdoing/blob/master/LICENSE)

Copyright (c) 2019-present Evan Xu
9 changes: 9 additions & 0 deletions baiduPush.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env sh

# 确保脚本抛出遇到的错误
set -e

# 百度链接推送
curl -H 'Content-Type:text/plain' --data-binary @urls.txt "http://data.zz.baidu.com/urls?site=https://xugaoyi.com&token=T5PEAzhGaPNbjQ2X"

rm -rf urls.txt # 删除文件
24 changes: 24 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env sh

# 确保脚本抛出遇到的错误
set -e


push_addr=`git remote get-url --push origin` # git提交地址,也可以手动设置,比如:[email protected]:xugaoyi/vuepress-theme-vdoing.git
commit_info=`git describe --all --always --long`
dist_path=docs/.vuepress/dist # 打包生成的文件夹路径
push_branch=gh-pages # 推送的分支

# 生成静态文件
npm run build

# 进入生成的文件夹
cd $dist_path

git init
git add -A
git commit -m "deploy, $commit_info"
git push -f $push_addr HEAD:$push_branch

cd -
rm -rf $dist_path
Loading

0 comments on commit 99fb7f2

Please sign in to comment.