-
Notifications
You must be signed in to change notification settings - Fork 251
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
58cafbc
commit 6ef7a75
Showing
54 changed files
with
2,069 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# 构建 VitePress 站点并将其部署到 GitHub Pages 的示例工作流程 | ||
# | ||
name: Deploy VitePress site to Pages | ||
|
||
on: | ||
# 在针对 `main` 分支的推送上运行。如果你 | ||
# 使用 `master` 分支作为默认分支,请将其更改为 `master` | ||
push: | ||
branches: [main] | ||
|
||
# 允许你从 Actions 选项卡手动运行此工作流程 | ||
workflow_dispatch: | ||
|
||
# 设置 GITHUB_TOKEN 的权限,以允许部署到 GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# 只允许同时进行一次部署,跳过正在运行和最新队列之间的运行队列 | ||
# 但是,不要取消正在进行的运行,因为我们希望允许这些生产部署完成 | ||
concurrency: | ||
group: pages | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
# 构建工作 | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # 如果未启用 lastUpdated,则不需要 | ||
# - uses: pnpm/action-setup@v3 # 如果使用 pnpm,请取消注释 | ||
# - uses: oven-sh/setup-bun@v1 # 如果使用 Bun,请取消注释 | ||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: npm # 或 pnpm / yarn | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v4 | ||
- name: Install dependencies | ||
run: npm ci # 或 pnpm install / yarn install / bun install | ||
- name: Build with VitePress | ||
run: npm run docs:build # 或 pnpm docs:build / yarn docs:build / bun run docs:build | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: docs/.vitepress/dist | ||
|
||
# 部署工作 | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
needs: build | ||
runs-on: ubuntu-latest | ||
name: Deploy | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -161,3 +161,5 @@ cython_debug/ | |
|
||
.idea | ||
|
||
node_modules | ||
docs/.vitepress/cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import {defineConfig} from 'vitepress' | ||
|
||
// https://vitepress.dev/reference/site-config | ||
export default defineConfig({ | ||
title: "程序员阿江-Relakkes的爬虫教程", | ||
description: "程序员阿江-Relakkes的爬虫教程", | ||
lastUpdated: true, | ||
themeConfig: { | ||
search: { | ||
provider: 'local' | ||
}, | ||
// https://vitepress.dev/reference/default-theme-config | ||
nav: [ | ||
{text: '首页', link: '/'}, | ||
{text: 'B站主页', link: 'https://space.bilibili.com/434377496'}, | ||
{text: '联系作者', link: 'https://github.com/NanmiCoder'}, | ||
], | ||
|
||
sidebar: [ | ||
{ | ||
text: 'Python爬虫入门', | ||
collapsed: false, | ||
items: [ | ||
{text: '01_为什么要写这个爬虫教程', link: '/爬虫入门/01_为什么要写这个爬虫教程'}, | ||
{text: '02_个人学会爬虫能赚钱吗', link: '/爬虫入门/02_个人学会爬虫能赚钱吗'}, | ||
{text: '03_网络爬虫到底是什么', link: '/爬虫入门/03_网络爬虫到底是什么'}, | ||
{text: '04_爬虫的基本工作原理', link: '/爬虫入门/04_爬虫的基本工作原理'}, | ||
{text: '05_常用的抓包工具有那些', link: '/爬虫入门/05_常用的抓包工具有那些'}, | ||
{ | ||
text: '06_Python写爬虫的优势', | ||
link: '/爬虫入门/06_为什么说用Python写爬虫有天生优势' | ||
}, | ||
{text: '07_Python常见的网络请求库', link: '/爬虫入门/07_Python常见的网络请求库'}, | ||
{text: '08_入门实战1_静态网页数据提取', link: '/爬虫入门/08_爬虫入门实战1_静态网页数据提取'}, | ||
{text: '09_入门实战2_动态数据提取', link: '/爬虫入门/09_爬虫入门实战2_动态数据提取'}, | ||
{text: '10_入门实战3_数据存储实现', link: '/爬虫入门/10_爬虫入门实战3_数据存储实现'}, | ||
{text: '11_入门实战4_高效率的爬虫实现', link: '/爬虫入门/11_爬虫入门实战4_高效率的爬虫实现'}, | ||
{ | ||
text: '12_入门实战5_编写易于维护的代码', | ||
link: '/爬虫入门/12_爬虫入门实战5_编写易于维护的爬虫代码' | ||
} | ||
] | ||
} | ||
], | ||
|
||
socialLinks: [ | ||
{icon: 'github', link: 'https://github.com/NanmiCoder/CrawlerTutorial'} | ||
] | ||
}, | ||
|
||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* .vitepress/theme/custom.css */ | ||
/** | ||
* Component: Sidebar | ||
* -------------------------------------------------------------------------- */ | ||
|
||
:root { | ||
--vp-sidebar-width: 285px; | ||
--vp-sidebar-bg-color: var(--vp-c-bg-alt); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// .vitepress/theme/index.js | ||
import DefaultTheme from 'vitepress/theme' | ||
import './custom.css' | ||
|
||
export default DefaultTheme |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
爬虫入门/08_爬虫入门实战1_静态网页数据提取.md → docs/爬虫入门/08_爬虫入门实战1_静态网页数据提取.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.