Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
smh000809 committed Nov 20, 2024
0 parents commit dd1224f
Show file tree
Hide file tree
Showing 40 changed files with 13,121 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = false
37 changes: 37 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Deploy
on:
workflow_dispatch: {}
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 22
cache: npm
- run: npm install

- name: Format
run: npm run format

- name: Build
run: npm run docs:build
- uses: actions/configure-pages@v2
- uses: actions/upload-pages-artifact@v1
with:
path: docs/.vitepress/dist
- name: Deploy
id: deployment
uses: actions/deploy-pages@v1
147 changes: 147 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# virepress build output
docs/.vitepress/dist
docs/.vitepress/cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

# VSCode
.vscode

# fleets
.fleets


docs/local

.obsidian
.idea
.DS_Store
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
docs/.vitepress/cache
docs/.vitepress/dist
*.min.*
18 changes: 18 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"printWidth": 320,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": false,
"quoteProps": "as-needed",
"jsxSingleQuote": false,
"trailingComma": "es5",
"bracketSpacing": false,
"arrowParens": "avoid",
"requirePragma": false,
"proseWrap": "preserve",
"htmlWhitespaceSensitivity": "css",
"vueIndentScriptAndStyle": false,
"endOfLine": "lf",
"embeddedLanguageFormatting": "auto"
}
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) 2023 AHao

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.
50 changes: 50 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# VitePress

## 下载依赖

> npm install
## 本地开发

> npm run docs:dev
## 打包

> npm run docs:build
## 预览

> npm run docs:preview
## 项目结构

```bash
├── docs
│ ├── .vitepress
│ │ ├── cache
│ │ │ └── ..
│ │ ├── theme // 主题
│ │ │ ├── index.js
│ │ │── ├── assets // 静态资源
│ │ │── │── ├── css
│ │ │── │── │ ├── style.css
│ │ │── │── └── img
│ │ │ ├── hero.png
│ │ ├── config.js
│ │ ├── nav.js
│ │ ├── sidebar.js
│ ├── index.md // 首页
│ ├── public // 静态资源
│ │ ├── favicon.ico
│ │ └── hero.png
│ │ └── mainifest.json
│ └── zh // 中文文档
│ ├── ...
│ └── README.md
├── utils
| ├── index.js // 生成sidebar
├── package.json
├── package-lock.json
└── .gitignore // git忽略文件
├── README.md // 项目说明
```
54 changes: 54 additions & 0 deletions docs/.vitepress/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import nav from "./nav";
import sidebar from "./sidebar";
import PackageJSON from "../../package.json";

export default {
lang: "zh-CN",
title: "AHao",
description: "热爱生活,热爱前端",
base: "/nodepads/",
ignoreDeadLinks: true, // 忽略无效链接
lastUpdated: true, // 最后更新时间
cleanUrls: "without-subfolders", // 去除链接中的 .html 后缀
head: [
["meta", {name: "theme-color", content: "#000"}],
["link", {rel: "icon", href: "/nodepads/favicon.ico"}],
["link", {rel: "manifest", href: "/nodepads/manifest.json"}],
], // 设置浏览器主题颜色
markdown: {
headers: {
level: [2, 3], // 设置标题层级
},
// 代码主题: ~node_modules/shiki/themes
theme: "dracula-soft", // 设置主题颜色
toc: {level: [1, 2, 3, 4, 5, 6]}, // 设置目录层级
lineNumbers: true, // 代码块显示行号
}, // markdown 配置
themeConfig: {
nav,
sidebar,
appearance: "dark", // 设置主题颜色
logo: "/hero.png",
siteTitle: false, // 隐藏站点标题
editLink: {
pattern: "Javascript:void(0);",
text: "Edit this page on GitHub",
}, // 编辑链接
socialLinks: [{icon: "github", link: "https://github.com/smh000809/nodepads"}], // 社交链接
footer: {
message: "version " + PackageJSON.version,
copyright: "Released under the MIT License. © 2023 AHao.",
}, // 页脚
// carbonAds: {
// code: 'CEBDT27Y',
// placement: 'vuejsorg'
// },// 广告
algolia: {
appId: "G3RQD2O5FU",
apiKey: "01ff7f41cded2e85e2c4ee3c320c203b",
indexName: "nodepads",
container: "### REPLACE ME WITH A CONTAINER (e.g. div) ###",
debug: false,
},
},
};
5 changes: 5 additions & 0 deletions docs/.vitepress/nav.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default [
{text: "首页", link: "/"},
{text: "Awesome", link: "/zh/AwesomeMac.md"},
{text: "笔记📒", link: "/zh/MacOS"},
];
32 changes: 32 additions & 0 deletions docs/.vitepress/sidebar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
export default [
{
text: "Awesome",
items: [
{text: "Mac", link: "/zh/AwesomeMac.md"},
{text: "Nodejs", link: "/zh/AwesomeNodejs.md"},
{text: "React", link: "/zh/AwesomeReact.md"},
],
},
{
items: [
{text: "AsyncAndSynchronous", link: "/zh/AsyncAndSynchronous.md"},
{text: "BrowserRender", link: "/zh/BrowserRender.md"},
{text: "CSSRelated", link: "/zh/CSSRelated.md"},
{text: "English", link: "/zh/English.md"},
{text: "Git", link: "/zh/Git.md"},
{text: "HTTPStatusCode", link: "/zh/HTTPStatusCode.md"},
{text: "IndexedDB", link: "/zh/IndexedDB.md"},
{text: "JSRelated", link: "/zh/JSRelated.md"},
{text: "JavaScriptCodeSnippet", link: "/zh/JavaScriptCodeSnippet.md"},
{text: "MacOS", link: "/zh/MacOS.md"},
{text: "Mysql", link: "/zh/Mysql.md"},
{text: "NpmInit", link: "/zh/NpmInit.md"},
{text: "ProjectProblems", link: "/zh/ProjectProblems.md"},
// {text: "Rust", link: "/zh/Rust.md"},
{text: "SortableJS", link: "/zh/SortableJS.md"},
{text: "UtilityTypes", link: "/zh/UtilityTypes.md"},
{text: "VuePlugIn", link: "/zh/VuePlugIn.md"},
{text: "WindowsRegedit", link: "/zh/WindowsRegedit.md"},
],
},
];
1 change: 1 addition & 0 deletions docs/.vitepress/theme/assets/style.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit dd1224f

Please sign in to comment.