init
parent
e09cabffcd
commit
5d3d6e5a2e
36
README.md
36
README.md
|
@ -1,2 +1,36 @@
|
||||||
# PyDevops
|
<!--
|
||||||
|
* @Author: Logan.Li
|
||||||
|
* @Gitee: https://gitee.com/attacker
|
||||||
|
* @email: admin@attacker.club
|
||||||
|
* @Date: 2024-01-07 21:54:41
|
||||||
|
* @LastEditTime: 2024-01-07 21:57:52
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
|
# Python
|
||||||
|
|
||||||
|
|
||||||
|
## 安装MkDocs
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 初始化项目
|
||||||
|
pip3 install mkdocs
|
||||||
|
python3 -m mkdocs new .
|
||||||
|
|
||||||
|
# 安装依赖包
|
||||||
|
pip3 install -r requirements.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
## 启动
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 服务启动
|
||||||
|
mkdocs serve
|
||||||
|
# 构建
|
||||||
|
mkdocs build
|
||||||
|
mkdocs build –-clean # 清理文档残留
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## readthedocs.com
|
||||||
|
|
||||||
|
<https://about.readthedocs.com>
|
||||||
|
|
|
@ -0,0 +1,169 @@
|
||||||
|
/* 调整主体内容的上边距,以防止内容被导航栏遮挡 */
|
||||||
|
.md-main {
|
||||||
|
margin-top: 48px;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* 顶部导航栏背景色 */
|
||||||
|
.md-header {
|
||||||
|
background-color: rgb(37, 43, 60); /* 调整顶部导航栏背景色 */
|
||||||
|
top: 48px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 底部导航栏背景色 */
|
||||||
|
.md-footer {
|
||||||
|
background-color: rgb(37, 43, 60); /* 调整底部导航栏背景色 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 标签栏背景色 */
|
||||||
|
.md-tabs {
|
||||||
|
background-color: #0a7be0; /* 调整标签栏背景色 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 底部导航链接样式 */
|
||||||
|
.md-footer-nav__link {
|
||||||
|
padding-top: 0.8rem; /* 调整底部导航链接的上边距 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 主体部分内边距 */
|
||||||
|
.md-main__inner {
|
||||||
|
margin-top: 3rem; /* 调整主体部分的上边距 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 进度条标签样式 */
|
||||||
|
.progress-label {
|
||||||
|
position: absolute;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: 700;
|
||||||
|
width: 100%;
|
||||||
|
margin: 0;
|
||||||
|
line-height: 1.2rem;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 进度条样式 */
|
||||||
|
.progress-bar {
|
||||||
|
height: 1.2rem;
|
||||||
|
float: left;
|
||||||
|
background-color: #2979ff; /* 调整进度条的颜色 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
margin: 0.5rem 0;
|
||||||
|
height: 1.2rem;
|
||||||
|
background-color: #eeeeee;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 细线型进度条 */
|
||||||
|
.progress.thin {
|
||||||
|
margin-top: 0.9rem;
|
||||||
|
height: 0.4rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress.thin .progress-label {
|
||||||
|
margin-top: -0.4rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress.thin .progress-bar {
|
||||||
|
height: 0.4rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 不同进度段的颜色 */
|
||||||
|
.progress-100plus .progress-bar {
|
||||||
|
background-color: #00e676;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress-80plus .progress-bar {
|
||||||
|
background-color: #fbc02d;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress-60plus .progress-bar {
|
||||||
|
background-color: #ff9100;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress-40plus .progress-bar {
|
||||||
|
background-color: #ff5252;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress-20plus .progress-bar {
|
||||||
|
background-color: #ff1744;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress-0plus .progress-bar {
|
||||||
|
background-color: #f50057;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 表格边框样式 */
|
||||||
|
.md-typeset table:not([class]) td {
|
||||||
|
border: 0.05rem solid var(--md-default-fg-color--lightest); /* 调整表格边框样式 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.md-typeset table:not([class]) tr:first-child td {
|
||||||
|
border: 0.05rem solid var(--md-default-fg-color--lightest);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 图片查看器背景色 */
|
||||||
|
.lg-backdrop {
|
||||||
|
background-color: rgb(0 0 0 /0.8); /* 调整图片查看器背景色 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 图片查看器外层样式 */
|
||||||
|
.lg-outer .lg-img-wrap {
|
||||||
|
padding: 80px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 侧边栏源码链接背景色 */
|
||||||
|
.md-nav__source {
|
||||||
|
background-color: #fc6554; /* 调整侧边栏源码链接背景色 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 网格布局样式 */
|
||||||
|
.md-grid {
|
||||||
|
margin-left: 1rem;
|
||||||
|
margin-right: auto;
|
||||||
|
max-width: initial;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 顶部间距 */
|
||||||
|
.md-top {
|
||||||
|
margin-top: 2rem; /* 调整顶部间距 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 自定义样式,背景色为 #0a7be0,文本颜色为白色 */
|
||||||
|
.x-pack-span {
|
||||||
|
background-color: #0a7be0;
|
||||||
|
padding: 2px 5px;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 自定义样式,背景色为 seagreen,文本颜色为白色 */
|
||||||
|
.new-span {
|
||||||
|
background-color: seagreen;
|
||||||
|
padding: 2px 5px;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 增加边框蓝条样式 */
|
||||||
|
.md-typeset .admonition,
|
||||||
|
.md-typeset details {
|
||||||
|
border-width: 0;
|
||||||
|
border-left-width: 4px;
|
||||||
|
}
|
||||||
|
.md-typeset .admonition.abstract,
|
||||||
|
.md-typeset details.abstract {
|
||||||
|
border-left-color: #3370ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 段落和列表样式 */
|
||||||
|
.md-typeset p,
|
||||||
|
.md-typeset ul,
|
||||||
|
.md-typeset ol,
|
||||||
|
.md-typeset dl,
|
||||||
|
.md-typeset blockquote {
|
||||||
|
display: flow-root;
|
||||||
|
margin: 1em 0;
|
||||||
|
}
|
|
@ -0,0 +1,43 @@
|
||||||
|
|
||||||
|
# Queryset
|
||||||
|
|
||||||
|
Django 中的 Queryset 是一个用于查询数据库的抽象概念。它允许你以一种非常 Pythonic 的方式执行数据库查询操作。
|
||||||
|
|
||||||
|
## 创建 Queryset
|
||||||
|
|
||||||
|
要创建 Queryset,你可以使用 Django 的模型管理器。模型管理器是每个 Django 模型的属性,用于与数据库进行交互。
|
||||||
|
|
||||||
|
```python
|
||||||
|
# 示例模型
|
||||||
|
class Book(models.Model):
|
||||||
|
title = models.CharField(max_length=100)
|
||||||
|
author = models.CharField(max_length=50)
|
||||||
|
|
||||||
|
# 使用模型管理器创建 Queryset
|
||||||
|
books = Book.objects.all()
|
||||||
|
```
|
||||||
|
|
||||||
|
## 过滤 Queryset
|
||||||
|
|
||||||
|
```python
|
||||||
|
# 获取所有作者为 'John' 的书籍
|
||||||
|
johns_books = Book.objects.filter(author='John')
|
||||||
|
排序 Queryset
|
||||||
|
使用 order_by 方法对 Queryset 进行排序。
|
||||||
|
|
||||||
|
python
|
||||||
|
Copy code
|
||||||
|
# 按照出版日期升序排序
|
||||||
|
sorted_books = Book.objects.all().order_by('publish_date')
|
||||||
|
切片和限制 Queryset
|
||||||
|
你可以使用切片操作符 [] 对 Queryset 进行切片或使用 [:n] 限制记录的数量。
|
||||||
|
|
||||||
|
python
|
||||||
|
Copy code
|
||||||
|
# 获取前5本书籍
|
||||||
|
first_five_books = Book.objects.all()[:5]
|
||||||
|
这只是 Queryset 基础知识的简单示例。你可以根据实际需要扩展文档,介绍更多高级的查询操作和技巧。
|
||||||
|
|
||||||
|
Copy code
|
||||||
|
|
||||||
|
请确保你的实际项目结构和需求与这个文档一致,并根据需要调整内容。
|
Binary file not shown.
After Width: | Height: | Size: 25 KiB |
Binary file not shown.
After Width: | Height: | Size: 6.7 KiB |
|
@ -0,0 +1,34 @@
|
||||||
|
# 欢迎来到 Python 实用应用指南
|
||||||
|
|
||||||
|
## Python 相关介绍
|
||||||
|
|
||||||
|
Python 是一种强大而灵活的编程语言,广泛应用于多个领域。本指南将简要介绍几个 Python 实用应用领域。
|
||||||
|
|
||||||
|
## Web 开发
|
||||||
|
|
||||||
|
Python 在 Web 开发领域有着丰富的生态系统。通过使用框架如 Django 或 Flask,你可以快速构建强大的Web应用。学习路径包括:
|
||||||
|
|
||||||
|
- [Django 框架简介](python/django-introduction.md)
|
||||||
|
- [Flask 框架入门](python/flask-getting-started.md)
|
||||||
|
- [RESTful API 开发指南](python/restful-api-guide.md)
|
||||||
|
|
||||||
|
## PyQt 图形用户界面
|
||||||
|
|
||||||
|
PyQt 是一个流行的 Python 模块,用于创建图形用户界面(GUI)。通过 PyQt,你可以构建漂亮、交互式的应用程序。相关教程包括:
|
||||||
|
|
||||||
|
- [PyQt 入门教程](python/pyqt-introduction.md)
|
||||||
|
- [PyQt 中的信号与槽机制](python/pyqt-signals-and-slots.md)
|
||||||
|
|
||||||
|
## Python 自动化
|
||||||
|
|
||||||
|
Python 是自动化任务的理想选择。无论是文件处理、网络爬虫,还是自动化测试,Python 都具备强大的能力。学习路径包括:
|
||||||
|
|
||||||
|
- [Python 文件处理与操作](python/file-handling.md)
|
||||||
|
- [简单的网络爬虫实例](python/simple-web-scraper.md)
|
||||||
|
- [自动化测试框架简介](python/automated-testing-frameworks.md)
|
||||||
|
|
||||||
|
## 探索更多
|
||||||
|
|
||||||
|
在这个指南中,你将发现更多关于 Python 实用应用的信息。探索不同领域,发现 Python 的强大之处。
|
||||||
|
|
||||||
|
欢迎开始你的 Python 之旅!
|
|
@ -0,0 +1,77 @@
|
||||||
|
<!--
|
||||||
|
* @Author: Logan.Li
|
||||||
|
* @Gitee: https://gitee.com/attacker
|
||||||
|
* @email: admin@attacker.club
|
||||||
|
* @Date: 2024-01-07 22:22:24
|
||||||
|
* @LastEditTime: 2024-01-07 23:29:27
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
|
# Python 入门
|
||||||
|
Python 是一门强大而灵活的编程语言,被广泛应用于多个领域,包括 Web 开发、数据科学、人工智能等。在本入门文档中,我们将介绍 Python 的基础知识,帮助你开始学习这门语言。
|
||||||
|
|
||||||
|
## 介绍
|
||||||
|
Python 由 Guido van Rossum 于 1989 年创造,目标是设计一种易读、易学的语言。它具有简洁的语法和强大的标准库,使开发人员能够更轻松地实现各种任务。
|
||||||
|
|
||||||
|
## 为什么选择 Python?
|
||||||
|
易学易用: Python 语法简洁清晰,适合初学者入门,同时也是高级程序员的首选。
|
||||||
|
丰富的库和框架: Python 生态系统拥有大量的第三方库和框架,可以方便地进行各种开发任务。
|
||||||
|
跨平台: Python 可以在不同的操作系统上运行,包括 Windows、Linux 和 macOS。
|
||||||
|
社区支持: Python 拥有庞大的社区,可以轻松获取帮助、学习资源和开源工具。
|
||||||
|
安装 Python
|
||||||
|
在开始学习 Python 之前,你需要安装 Python 解释器。以下是在不同操作系统上安装 Python 的步骤:
|
||||||
|
|
||||||
|
### Windows
|
||||||
|
访问 Python 官方网站。
|
||||||
|
下载适用于 Windows 的最新 Python 版本。
|
||||||
|
运行下载的安装程序,并按照提示进行安装。
|
||||||
|
在安装过程中,勾选 "Add Python to PATH" 选项,以便可以在命令提示符中直接运行 Python。
|
||||||
|
安装完成后,你可以在命令提示符中输入以下命令检查是否成功安装:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python --version
|
||||||
|
```
|
||||||
|
|
||||||
|
### Linux
|
||||||
|
大多数 Linux 发行版都预装了 Python。你可以在终端中输入以下命令检查是否已安装:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python --version
|
||||||
|
```
|
||||||
|
|
||||||
|
如果未安装,可以使用包管理器安装。例如,在 Ubuntu 上,可以运行:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install python3
|
||||||
|
```
|
||||||
|
|
||||||
|
### macOS
|
||||||
|
macOS 通常预装了 Python 2.x 版本。建议安装 Python 3.x。你可以使用 Homebrew 包管理器来安装:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
brew install python3
|
||||||
|
```
|
||||||
|
安装完成后,检查版本:
|
||||||
|
|
||||||
|
bash
|
||||||
|
Copy code
|
||||||
|
python3 --version
|
||||||
|
Hello, World!
|
||||||
|
现在,让我们来写一个经典的 "Hello, World!" 程序。创建一个新的文本文件,命名为 hello.py,并输入以下代码:
|
||||||
|
|
||||||
|
python
|
||||||
|
Copy code
|
||||||
|
print("Hello, World!")
|
||||||
|
保存文件后,打开终端,进入文件所在的目录,然后运行:
|
||||||
|
|
||||||
|
bash
|
||||||
|
Copy code
|
||||||
|
python hello.py
|
||||||
|
或者使用 Python 3:
|
||||||
|
|
||||||
|
bash
|
||||||
|
Copy code
|
||||||
|
python3 hello.py
|
||||||
|
你将在终端看到输出:"Hello, World!"。
|
||||||
|
|
||||||
|
恭喜!你已经成功运行了你的第一个 Python 程序。
|
|
@ -0,0 +1,77 @@
|
||||||
|
<!--
|
||||||
|
* @Author: Logan.Li
|
||||||
|
* @Gitee: https://gitee.com/attacker
|
||||||
|
* @email: admin@attacker.club
|
||||||
|
* @Date: 2024-01-07 22:22:24
|
||||||
|
* @LastEditTime: 2024-01-08 00:40:25
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
|
# Python 入门
|
||||||
|
Python 是一门强大而灵活的编程语言,被广泛应用于多个领域,包括 Web 开发、数据科学、人工智能等。在本入门文档中,我们将介绍 Python 的基础知识,帮助你开始学习这门语言。
|
||||||
|
|
||||||
|
## 介绍
|
||||||
|
Python 由 Guido van Rossum 于 1989 年创造,目标是设计一种易读、易学的语言。它具有简洁的语法和强大的标准库,使开发人员能够更轻松地实现各种任务。
|
||||||
|
|
||||||
|
## 为什么选择 Python?
|
||||||
|
易学易用: Python 语法简洁清晰,适合初学者入门,同时也是高级程序员的首选。
|
||||||
|
丰富的库和框架: Python 生态系统拥有大量的第三方库和框架,可以方便地进行各种开发任务。
|
||||||
|
跨平台: Python 可以在不同的操作系统上运行,包括 Windows、Linux 和 macOS。
|
||||||
|
社区支持: Python 拥有庞大的社区,可以轻松获取帮助、学习资源和开源工具。
|
||||||
|
安装 Python
|
||||||
|
在开始学习 Python 之前,你需要安装 Python 解释器。以下是在不同操作系统上安装 Python 的步骤:
|
||||||
|
|
||||||
|
### Windows
|
||||||
|
访问 Python 官方网站。
|
||||||
|
下载适用于 Windows 的最新 Python 版本。
|
||||||
|
运行下载的安装程序,并按照提示进行安装。
|
||||||
|
在安装过程中,勾选 "Add Python to PATH" 选项,以便可以在命令提示符中直接运行 Python。
|
||||||
|
安装完成后,你可以在命令提示符中输入以下命令检查是否成功安装:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python --version
|
||||||
|
```
|
||||||
|
|
||||||
|
### Linux
|
||||||
|
大多数 Linux 发行版都预装了 Python。你可以在终端中输入以下命令检查是否已安装:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python --version
|
||||||
|
```
|
||||||
|
|
||||||
|
如果未安装,可以使用包管理器安装。例如,在 Ubuntu 上,可以运行:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install python3
|
||||||
|
```
|
||||||
|
|
||||||
|
### macOS
|
||||||
|
macOS 通常预装了 Python 2.x 版本。建议安装 Python 3.x。你可以使用 Homebrew 包管理器来安装:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
brew install python3
|
||||||
|
```
|
||||||
|
安装完成后,检查版本:
|
||||||
|
|
||||||
|
bash
|
||||||
|
Copy code
|
||||||
|
python3 --version
|
||||||
|
Hello, World!
|
||||||
|
现在,让我们来写一个经典的 "Hello, World!" 程序。创建一个新的文本文件,命名为 hello.py,并输入以下代码:
|
||||||
|
|
||||||
|
python
|
||||||
|
Copy code
|
||||||
|
print("Hello, World!")
|
||||||
|
保存文件后,打开终端,进入文件所在的目录,然后运行:
|
||||||
|
|
||||||
|
bash
|
||||||
|
Copy code
|
||||||
|
python hello.py
|
||||||
|
或者使用 Python 3:
|
||||||
|
|
||||||
|
bash
|
||||||
|
Copy code
|
||||||
|
python3 hello.py
|
||||||
|
你将在终端看到输出:"Hello, World!"。
|
||||||
|
|
||||||
|
恭喜!你已经成功运行了你的第一个 Python 程序。
|
|
@ -0,0 +1,136 @@
|
||||||
|
nav:
|
||||||
|
# - 默认页面: index.md
|
||||||
|
- Python 基础篇:
|
||||||
|
- Python 入门: python/introduction.md
|
||||||
|
- 变量和数据类型: python/variables_and_data_types.md
|
||||||
|
- 控制流程(if、else、for、while): python/control_flow.md
|
||||||
|
- 函数和模块: python/functions_and_modules.md
|
||||||
|
- 异常处理: python/exception_handling.md
|
||||||
|
- 第三方常用模块: python/common_modules.md
|
||||||
|
- Web 基础基:
|
||||||
|
- HTML: web/frontend_html.md
|
||||||
|
- CSS: web/frontend_css.md
|
||||||
|
- JavaScript: web/frontend_js.md
|
||||||
|
- Web 开发高级篇:
|
||||||
|
- Vue.js 前端开发:
|
||||||
|
- Vue.js 简介: web/vue/introduction.md
|
||||||
|
- Vue.js 基础概念: web/vue/basic_concepts.md
|
||||||
|
- Vue.js 组件和指令: web/vue/components_and_directives.md
|
||||||
|
- Vue.js 状态管理 (Vuex): web/vue/vuex.md
|
||||||
|
- Django 后端开发:
|
||||||
|
- Django REST framework (DRF) 简介: web/drf/introduction.md
|
||||||
|
- DRF 序列化器: web/drf/serializers.md
|
||||||
|
- DRF 视图: web/drf/views.md
|
||||||
|
- DRF 路由: web/drf/routing.md
|
||||||
|
- DRF 认证和权限: web/drf/authentication_and_permissions.md
|
||||||
|
- Django数据库ORM: web/drf/orm.md
|
||||||
|
- Django数据库操作Queryset: web/drf/queryset.md
|
||||||
|
- 定时任务和消息队列:
|
||||||
|
- Celery 异步任务: web/celery_async_tasks.md
|
||||||
|
- Redis 作为消息队列: web/redis_message_queue.md
|
||||||
|
|
||||||
|
site_name: PythonFullStackGuide
|
||||||
|
site_description: Python 全栈开发
|
||||||
|
site_author: Logan
|
||||||
|
site_url: http://localhost:8000
|
||||||
|
copyright: Copyright @ 2024 Logan Li, All rights reserved.
|
||||||
|
|
||||||
|
repo_name: PythonFullStackGuide
|
||||||
|
repo_url: https://git.opsx.vip/docs/PythonFullStackGuide.git
|
||||||
|
# theme: mkdocs # 默认主题
|
||||||
|
# theme: readthedocs
|
||||||
|
# theme: material # pip3 install mkdocs-material
|
||||||
|
edit_uri: https://git.opsx.vip/docs/PythonFullStackGuide/src/branch/main/mkdocs.yml
|
||||||
|
|
||||||
|
# 自定义 CSS
|
||||||
|
extra_css:
|
||||||
|
- css/extra.css
|
||||||
|
|
||||||
|
# 主题配置
|
||||||
|
theme:
|
||||||
|
name: 'material'
|
||||||
|
logo: './image/logo.png'
|
||||||
|
favicon: './image/favicon.ico'
|
||||||
|
language: 'zh' # 设置语言为中文
|
||||||
|
|
||||||
|
# 调色板配置,用于白天/夜晚模式切换
|
||||||
|
palette:
|
||||||
|
- scheme: default
|
||||||
|
accent: blue
|
||||||
|
toggle:
|
||||||
|
icon: material/weather-sunny
|
||||||
|
name: Switch to dark mode
|
||||||
|
- scheme: slate
|
||||||
|
accent: blue
|
||||||
|
toggle:
|
||||||
|
icon: material/weather-night
|
||||||
|
name: Switch to light mode
|
||||||
|
features:
|
||||||
|
- navigation.instant
|
||||||
|
- navigation.tracking
|
||||||
|
- navigation.indexes
|
||||||
|
- navigation.top
|
||||||
|
- search.suggest
|
||||||
|
- search.highlight
|
||||||
|
- search.share
|
||||||
|
- header.autohide
|
||||||
|
- content.tabs.link
|
||||||
|
|
||||||
|
# 代码高亮配置
|
||||||
|
highlightjs: true
|
||||||
|
hljs_languages:
|
||||||
|
- sh
|
||||||
|
- sql
|
||||||
|
- shell
|
||||||
|
- bash
|
||||||
|
- yaml
|
||||||
|
- python
|
||||||
|
|
||||||
|
|
||||||
|
# Markdown扩展配置
|
||||||
|
markdown_extensions:
|
||||||
|
- admonition # 用于在文档中创建提示、注意事项、警告等提示框
|
||||||
|
- footnotes # 脚注
|
||||||
|
- meta # 定义元数据,通过文章上下文控制,如disqus
|
||||||
|
- pymdownx.caret # 下划线上标
|
||||||
|
- pymdownx.tilde # 删除线下标
|
||||||
|
- pymdownx.critic # 增加删除修改高亮注释,可修饰行内或段落
|
||||||
|
- pymdownx.details # 提示块可折叠
|
||||||
|
- pymdownx.inlinehilite # 行内代码高亮
|
||||||
|
- pymdownx.mark # 文本高亮
|
||||||
|
- pymdownx.smartsymbols # 符号转换
|
||||||
|
- pymdownx.betterem: # 对加粗和斜体更好的检测
|
||||||
|
smart_enable: all
|
||||||
|
- pymdownx.tasklist: # 复选框checklist
|
||||||
|
custom_checkbox: true
|
||||||
|
|
||||||
|
- codehilite: # 用于在Markdown文档中进行代码块的高亮显示
|
||||||
|
guess_lang: True # 允许尝试猜测代码块的语言类型
|
||||||
|
linenums: False # 控制是否在代码块旁边显示行号
|
||||||
|
- toc: # 锚点
|
||||||
|
permalink: True
|
||||||
|
|
||||||
|
|
||||||
|
# 配置搜索插件
|
||||||
|
plugins:
|
||||||
|
- search: # 启用搜索插件
|
||||||
|
lang: # 搜索支持的语言
|
||||||
|
- en # 英语
|
||||||
|
- ja # 日语
|
||||||
|
separator: '[\s\-\.]+' # 搜索关键词的分隔符正则表达式
|
||||||
|
# 社交链接
|
||||||
|
extra:
|
||||||
|
version:
|
||||||
|
method: mike
|
||||||
|
social:
|
||||||
|
- icon: fontawesome/brands/github
|
||||||
|
link: https://git.opsx.vip/docs/PythonFullStackGuide.git
|
||||||
|
# target: _blank
|
||||||
|
- icon: fontawesome/solid/envelope
|
||||||
|
link: mailto:admin@attacker.club
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
mkdocs
|
||||||
|
mkdocs-material
|
||||||
|
mdx_gh_links
|
||||||
|
markdown
|
||||||
|
markdown-checklist
|
Loading…
Reference in New Issue