Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
Young-Jeff committed Oct 6, 2023
0 parents commit e99b6ba
Show file tree
Hide file tree
Showing 185 changed files with 20,638 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# http://editorconfig.org

root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2
max_line_length = 80
trim_trailing_whitespace = true

[*.md]
insert_final_newline = false
trim_trailing_whitespace = false
13 changes: 13 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
__fixtures__
__mocks__
dist
node_modules
.yarn
.history
build
coverage
jest.config.js
jest.transform.js
docusaurus.config.js
sidebars.js
*.md
11 changes: 11 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
parserOptions: {
ecmaVersion: 7,
sourceType: 'module',
},
plugins: ['@docusaurus', '@typescript-eslint'],
extends: [
'plugin:@docusaurus/recommended',
'plugin:@typescript-eslint/recommended',
],
}
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: ci

on:
push:
branches:
- main

jobs:
build-and-deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: '16.x'

- name: Build Project
run: |
yarn install
yarn run build
- name: SSH Deploy
uses: easingthemes/[email protected]
env:
SSH_PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
ARGS: '-avzr --delete'
SOURCE: 'build'
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
REMOTE_USER: 'root'
TARGET: '/www/wwwroot/blog'
28 changes: 28 additions & 0 deletions .github/workflows/docsearch.yml.bak
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: docsearch

on:
push:
branches:
- main

jobs:
algolia:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Get the content of docsearch.json as config
id: algolia_config
run: echo "::set-output name=config::$(cat docsearch.json | jq -r tostring)"

- name: Run algolia/docsearch-scraper image
env:
ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }}
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}
CONFIG: ${{ steps.algolia_config.outputs.config }}
run: |
docker run \
--env APPLICATION_ID=${ALGOLIA_APP_ID} \
--env API_KEY=${ALGOLIA_API_KEY} \
--env "CONFIG=${CONFIG}" \
algolia/docsearch-scraper
28 changes: 28 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Dependencies
/node_modules

# Production
/build
/drafts
/tmp
cloudbaserc.json

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
.env

# Packages
/packages

npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-error.log*
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
shamefully-hoist=true
strict-peer-dependencies=true
14 changes: 14 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": false,
"singleQuote": true,
"quoteProps": "as-needed",
"jsxSingleQuote": false,
"trailingComma": "all",
"bracketSpacing": true,
"jsxBracketSameLine": false,
"arrowParens": "avoid",
"proseWrap": "never"
}
19 changes: 19 additions & 0 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module.exports = {
extends: ['stylelint-config-standard-scss', 'stylelint-config-prettier-scss'],
rules: {
'selector-pseudo-class-no-unknown': [
true,
{
// :global is a CSS modules feature to escape from class name hashing
ignorePseudoClasses: ['global'],
},
],
'selector-class-pattern': null,
'custom-property-empty-line-before': null,
'selector-id-pattern': null,
'declaration-empty-line-before': null,
'no-descending-specificity': null,
'comment-empty-line-before': null,
'value-keyword-case': ['lower', { camelCaseSvgKeywords: true }],
},
}
14 changes: 14 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"prettier.enable": true,
"editor.codeActionsOnSave": {
"source.fixAll": true,
"source.organizeImports": false
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"stylelint.validate": ["css", "less", "postcss", "scss", "sass"]
}
9 changes: 9 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
MIT License

Copyright (c) 2023 youngjeff

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.
79 changes: 79 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<h2 align="center">
YoungJeff的个人博客
</h2><br>

<pre align="center">
Build with 🦖<a href="https://docusaurus.io/">Docusaurus</a>
</pre>

<p align="center">
<br>
<a href="https://youngjeff.cn">🖥 Online Preview</a>
<br><br>
<a href="https://vercel.com/new/clone?repository-url=https://github.com/Young-Jeff/blog/tree/main&project-name=blog&repo-name=blog" rel="nofollow"><img src="https://vercel.com/button"></a>
<a href="https://app.netlify.com/start/deploy?repository=https://github.com/Young-Jeff/blog" rel="nofollow"><img src="https://www.netlify.com/img/deploy/button.svg"></a>
<a href="https://stackblitz.com/github/Young-Jeff/blog" rel="nofollow"><img src="https://developer.stackblitz.com/img/open_in_stackblitz.svg"></a>
</p>

## 👋 Introduction

在这里我会分享各类技术栈所遇到问题与解决方案,或许也会记录一些经历感悟,希望对你有所帮助。

如果你想要搭建一个类似的站点,可直接 [Fork](https://github.com/Young-Jeff/blog/fork) 本仓库使用,或者通过 [StackBlitz](https://stackblitz.com/github/Young-Jeff/blog) 在线运行本项目,或通过 [Vercel](https://vercel.com/new/clone?repository-url=https://github.com/Young-Jeff/blog/tree/main&project-name=blog&repo-name=blog) 一键部署。

## ✨ Features

- ✍️ **Markdown** - 写作方便
- 🎨 **Beautiful** - 整洁,美观
- 🖥️ **PWA** - 支持 PWA,可安装,离线可用
- 🏞️ **i18n** - 支持国际化
- 💯 **SEO** - 搜索引擎优化,易于收录
- 📊 **谷歌分析** - 支持 Google Analytics
- 🔎 **全文搜索** - 支持 [Algolia DocSearch](https://github.com/algolia/docsearch)
- 🗃️ **博文视图** - 不同的博文视图,列表、宫格、卡片
- 📦 **项目展示** - 展示你的项目,可用作于作品集

## 📊 Catalogue

```bash
├── blog # 博客
│ ├── first-blog.md
├── docs # 文档/笔记
│ └── doc.md
├── data # 项目/友链数据
│ ├── friend.ts # 友链
│ ├── project.ts # 项目
├── i18n # 国际化
├── src
│ ├── components # 组件
│ ├── css # 自定义CSS
│ ├── pages # 自定义页面
│ ├── plugin # 自定义插件
│ └── theme # 自定义主题组件
├── static # 静态资源文件
│ └── img # 静态图片
├── docusaurus.config.js # 站点的配置信息
├── sidebars.js # 文档的侧边栏
├── package.json
├── tsconfig.json
└── pnpm-lock.yaml
```

## 📥 Start

```sh
git clone https://github.com/Young-Jeff/blog.git
cd blog
pnpm install
pnpm start
```

Build

```sh
pnpm build
```

## 📝License

[MIT](./LICENSE)
5 changes: 5 additions & 0 deletions blog/authors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
youngjeff:
name: youngjeff
title: 一名致力于js/ts 全栈的95后
url: https://github.com/Young-Jeff
image_url: /img/logo.png
Loading

0 comments on commit e99b6ba

Please sign in to comment.