From f61ff03a4f4eaaa3f2eef1dbb3d0777de21750c1 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sat, 7 Oct 2023 01:40:00 +0000 Subject: Deployed 3354c5b to v1.0 with MkDocs 1.5.3 and mike 1.1.2 --- latest/404.html | 2 +- latest/API/index.html | 2 +- latest/CLI/index.html | 4 +- latest/Core/index.html | 4 +- latest/RulePackage/Write/prepare/index.html | 2 +- latest/RulePackage/Write/python/index.html | 2 +- latest/RulePackage/Write/write/index.html | 2 +- latest/RulePackage/getStart/attribute/index.html | 2 +- latest/RulePackage/getStart/class/index.html | 2 +- .../getStart/getDeeper/Module/index.html | 2 +- .../getStart/getDeeper/Package/index.html | 2 +- .../getStart/getDeeper/object/index.html | 2 +- latest/RulePackage/getStart/method/index.html | 2 +- latest/RulePackage/intro/index.html | 2 +- latest/RulePackage/skill/index.html | 1 + .../Standard/Term/DefaultDice/_counts/index.html | 2 +- latest/Standard/Term/DefaultDice/_sides/index.html | 2 +- latest/Standard/Term/DefaultDice/index.html | 2 +- latest/Standard/Term/PlayerCard/index.html | 2 +- latest/Standard/Term/check/ability/index.html | 2 +- latest/Standard/Term/check/index.html | 2 +- latest/Standard/Term/duration/campaign/index.html | 2 +- latest/Standard/Term/duration/index.html | 2 +- latest/Standard/Term/duration/module/index.html | 2 +- latest/Standard/Term/duration/sene/index.html | 2 +- latest/Standard/Term/scenario/index.html | 2 +- latest/Standard/Term/setting/index.html | 2 +- latest/Standard/what-is-rule-package/index.html | 4 +- latest/Standard/what-is-standard/index.html | 2 +- latest/Standard/why-rule-package/index.html | 2 +- latest/assets/stylesheets/custom.00c04c01.min.css | 572 ++++++++++++++++++++- latest/blog/2023/10/07/rule/index.html | 4 +- latest/blog/archive/2023/index.html | 2 +- latest/blog/category/rules/index.html | 2 +- latest/blog/index.html | 2 +- latest/changelog/index.html | 2 +- latest/index.html | 2 +- latest/search/search_index.json | 2 +- latest/sitemap.xml.gz | Bin 127 -> 127 bytes latest/stylesheets/extra.css | 17 + 40 files changed, 629 insertions(+), 41 deletions(-) create mode 100644 latest/RulePackage/skill/index.html (limited to 'latest') diff --git a/latest/404.html b/latest/404.html index 45ce827c..b6bb2765 100644 --- a/latest/404.html +++ b/latest/404.html @@ -1 +1 @@ - HydroRollCore 核心文档 (草案)

404 - Not found

\ No newline at end of file + HydroRollCore 核心文档 (草案)

404 - Not found

\ No newline at end of file diff --git a/latest/API/index.html b/latest/API/index.html index ef52e963..f6b83750 100644 --- a/latest/API/index.html +++ b/latest/API/index.html @@ -1 +1 @@ - API Reference - HydroRollCore 核心文档 (草案)

API Reference


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file + API Reference - HydroRollCore 核心文档 (草案)

API Reference


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file diff --git a/latest/CLI/index.html b/latest/CLI/index.html index d3653d56..0eb6c6e2 100644 --- a/latest/CLI/index.html +++ b/latest/CLI/index.html @@ -1,4 +1,4 @@ - CLI Reference - HydroRollCore 核心文档 (草案)
跳转至

CLI Reference⚓︎

```python exec="1" idprefix="" import argparse import re from HydroRollCore import Cli

parser = Cli().parser

MONOSPACED = ("pyproject.toml", "pdm.lock", ".pdm-python", ":pre", ":post", ":all")

def clean_help(help: str) -> str: # Make dunders monospaced avoiding italic markdown rendering help = re.sub(r"([\w\d_]+)", r"__\1__", help) # Make env vars monospaced help = re.sub(r"env var: ([A-Z_]+)", r"env var: \1", help) for monospaced in MONOSPACED: help = re.sub(rf"\s(['\"]?{monospaced}['\"]?)", f"{monospaced}", help) return help

def render_parser( parser: argparse.ArgumentParser, title: str, heading_level: int = 2 ) -> str: """Render the parser help documents as a string.""" result = [f"{'#' * heading_level} {title}\n"] if parser.description and title != "HydroRollCore": result.append("> " + parser.description + "\n")

 1
+ CLI Reference - HydroRollCore 核心文档 (草案)       

CLI Reference⚓︎

```python exec="1" idprefix="" import argparse import re from HydroRollCore import Cli

parser = Cli().parser

MONOSPACED = ("pyproject.toml", "pdm.lock", ".pdm-python", ":pre", ":post", ":all")

def clean_help(help: str) -> str: # Make dunders monospaced avoiding italic markdown rendering help = re.sub(r"([\w\d_]+)", r"__\1__", help) # Make env vars monospaced help = re.sub(r"env var: ([A-Z_]+)", r"env var: \1", help) for monospaced in MONOSPACED: help = re.sub(rf"\s(['\"]?{monospaced}['\"]?)", f"{monospaced}", help) return help

def render_parser( parser: argparse.ArgumentParser, title: str, heading_level: int = 2 ) -> str: """Render the parser help documents as a string.""" result = [f"{'#' * heading_level} {title}\n"] if parser.description and title != "HydroRollCore": result.append("> " + parser.description + "\n")

 1
  2
  3
  4
@@ -59,4 +59,4 @@
     result.append("")
 
 return "\n".join(result)
-

print(render_parser(parser, "HydroRollCore")) ```


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file +

print(render_parser(parser, "HydroRollCore")) ```


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file diff --git a/latest/Core/index.html b/latest/Core/index.html index 227539f4..2ad07dcd 100644 --- a/latest/Core/index.html +++ b/latest/Core/index.html @@ -1,4 +1,4 @@ - 核心概览 - HydroRollCore 核心文档 (草案)
跳转至

HydroRollCore'水系核心

🎁 Getting⚓︎

  1. 安装库

在命令行输入。

1
+ 核心概览 - HydroRollCore 核心文档 (草案)       

HydroRollCore'水系核心

🎁 Getting⚓︎

  1. 安装库

在命令行输入。

1
 2
 3
 4
@@ -19,4 +19,4 @@
 
 class Myrule(Rule):
   """自设规则包,继承 Rule 基类"""
-
  1. 合理修改你的 config.toml 配置文件,完成注册!

📄 License⚓︎

MIT © 2023-PRESENT 简律纯


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file +
  1. 合理修改你的 config.toml 配置文件,完成注册!

📄 License⚓︎

MIT © 2023-PRESENT 简律纯


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file diff --git a/latest/RulePackage/Write/prepare/index.html b/latest/RulePackage/Write/prepare/index.html index bfe56e46..05a65689 100644 --- a/latest/RulePackage/Write/prepare/index.html +++ b/latest/RulePackage/Write/prepare/index.html @@ -1 +1 @@ - 准备规则书 - HydroRollCore 核心文档 (草案)

准备规则书


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file + 准备规则书 - HydroRollCore 核心文档 (草案)

准备规则书


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file diff --git a/latest/RulePackage/Write/python/index.html b/latest/RulePackage/Write/python/index.html index ce876a95..cafc67df 100644 --- a/latest/RulePackage/Write/python/index.html +++ b/latest/RulePackage/Write/python/index.html @@ -1 +1 @@ - 了解Python - HydroRollCore 核心文档 (草案)

了解Python


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file + 了解Python - HydroRollCore 核心文档 (草案)

了解Python


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file diff --git a/latest/RulePackage/Write/write/index.html b/latest/RulePackage/Write/write/index.html index 76e1e805..71e892ed 100644 --- a/latest/RulePackage/Write/write/index.html +++ b/latest/RulePackage/Write/write/index.html @@ -1 +1 @@ - 编写规则包 - HydroRollCore 核心文档 (草案)

编写规则包


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file + 编写规则包 - HydroRollCore 核心文档 (草案)

编写规则包


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file diff --git a/latest/RulePackage/getStart/attribute/index.html b/latest/RulePackage/getStart/attribute/index.html index 3c8d88c2..02bb1a40 100644 --- a/latest/RulePackage/getStart/attribute/index.html +++ b/latest/RulePackage/getStart/attribute/index.html @@ -1 +1 @@ - attribute 属性 - HydroRollCore 核心文档 (草案)

属性

Info

关联到一个对象的值,通常使用点号表达式按名称来引用。 举例来说,如果对象 o 具有属性 a 则可以用 o.a 来引用它。

如果对象允许,将未被定义为 标识符和关键字 的非标识名称用作一个对象的属性也是可以的,例如使用 setattr()。 这样的属性将无法使用点号表达式来访问,而是必须通过 getattr() 来获取。


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file + attribute 属性 - HydroRollCore 核心文档 (草案)

属性

Info

关联到一个对象的值,通常使用点号表达式按名称来引用。 举例来说,如果对象 o 具有属性 a 则可以用 o.a 来引用它。

如果对象允许,将未被定义为 标识符和关键字 的非标识名称用作一个对象的属性也是可以的,例如使用 setattr()。 这样的属性将无法使用点号表达式来访问,而是必须通过 getattr() 来获取。


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file diff --git a/latest/RulePackage/getStart/class/index.html b/latest/RulePackage/getStart/class/index.html index 477cae0d..caf85346 100644 --- a/latest/RulePackage/getStart/class/index.html +++ b/latest/RulePackage/getStart/class/index.html @@ -1 +1 @@ - class 类 - HydroRollCore 核心文档 (草案)

Info

用来创建用户定义对象的模板。类定义通常包含对该类的实例进行操作的方法定义。


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file + class 类 - HydroRollCore 核心文档 (草案)

Info

用来创建用户定义对象的模板。类定义通常包含对该类的实例进行操作的方法定义。


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file diff --git a/latest/RulePackage/getStart/getDeeper/Module/index.html b/latest/RulePackage/getStart/getDeeper/Module/index.html index 5f4ad2f3..e555e1cf 100644 --- a/latest/RulePackage/getStart/getDeeper/Module/index.html +++ b/latest/RulePackage/getStart/getDeeper/Module/index.html @@ -1 +1 @@ - Module 模块 - HydroRollCore 核心文档 (草案)

模块

Info

此对象是 Python 代码的一种组织单位。各模块具有独立的命名空间,可包含任意 Python 对象。模块可通过 importing 操作被加载到 Python 中。

另见 package


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file + Module 模块 - HydroRollCore 核心文档 (草案)

模块

Info

此对象是 Python 代码的一种组织单位。各模块具有独立的命名空间,可包含任意 Python 对象。模块可通过 importing 操作被加载到 Python 中。

另见 package


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file diff --git a/latest/RulePackage/getStart/getDeeper/Package/index.html b/latest/RulePackage/getStart/getDeeper/Package/index.html index 781ae928..a4e1f3e7 100644 --- a/latest/RulePackage/getStart/getDeeper/Package/index.html +++ b/latest/RulePackage/getStart/getDeeper/Package/index.html @@ -1 +1 @@ - Package 包 - HydroRollCore 核心文档 (草案)

Info

一种可包含子模块或递归地包含子包的 Python module。 从技术上说,包是具有 path 属性的 Python 模块。

另参见 regular packagenamespace package


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file + Package 包 - HydroRollCore 核心文档 (草案)

Info

一种可包含子模块或递归地包含子包的 Python module。 从技术上说,包是具有 path 属性的 Python 模块。

另参见 regular packagenamespace package


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file diff --git a/latest/RulePackage/getStart/getDeeper/object/index.html b/latest/RulePackage/getStart/getDeeper/object/index.html index ccbc7f45..c9e15e10 100644 --- a/latest/RulePackage/getStart/getDeeper/object/index.html +++ b/latest/RulePackage/getStart/getDeeper/object/index.html @@ -1 +1 @@ - object 对象 - HydroRollCore 核心文档 (草案)

对象

Info

任何具有状态(属性或值)以及预定义行为(方法)的数据。object 也是任何 new-style class 的最顶层基类名。


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file + object 对象 - HydroRollCore 核心文档 (草案)

对象

Info

任何具有状态(属性或值)以及预定义行为(方法)的数据。object 也是任何 new-style class 的最顶层基类名。


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file diff --git a/latest/RulePackage/getStart/method/index.html b/latest/RulePackage/getStart/method/index.html index e45ebf7f..90dd2132 100644 --- a/latest/RulePackage/getStart/method/index.html +++ b/latest/RulePackage/getStart/method/index.html @@ -1 +1 @@ - method 方法 - HydroRollCore 核心文档 (草案)

方法

Info

在类内部定义的函数。如果作为该类的实例的一个属性来调用,方法将会获取实例对象作为其第一个 argument (通常命名为 self)。参见 functionnested scope


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file + method 方法 - HydroRollCore 核心文档 (草案)

方法

Info

在类内部定义的函数。如果作为该类的实例的一个属性来调用,方法将会获取实例对象作为其第一个 argument (通常命名为 self)。参见 functionnested scope


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file diff --git a/latest/RulePackage/intro/index.html b/latest/RulePackage/intro/index.html index 4f880dfe..3a9dba65 100644 --- a/latest/RulePackage/intro/index.html +++ b/latest/RulePackage/intro/index.html @@ -1 +1 @@ - 规则包简介 - HydroRollCore 核心文档 (草案)

简介

Warning

此章节涉及到真正的 Python 规范问题,因此请认真阅读并多加练习,方能写出漂亮的代码。


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file + 规则包简介 - HydroRollCore 核心文档 (草案)

简介

Warning

此章节涉及到真正的 Python 规范问题,因此请认真阅读并多加练习,方能写出漂亮的代码。


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file diff --git a/latest/RulePackage/skill/index.html b/latest/RulePackage/skill/index.html new file mode 100644 index 00000000..bc958986 --- /dev/null +++ b/latest/RulePackage/skill/index.html @@ -0,0 +1 @@ + Index - HydroRollCore 核心文档 (草案)

Index


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file diff --git a/latest/Standard/Term/DefaultDice/_counts/index.html b/latest/Standard/Term/DefaultDice/_counts/index.html index d5d8c740..b5fead10 100644 --- a/latest/Standard/Term/DefaultDice/_counts/index.html +++ b/latest/Standard/Term/DefaultDice/_counts/index.html @@ -1 +1 @@ - _counts 骰子个数 - HydroRollCore 核心文档 (草案)
跳转至

_counts 骰子个数

Tip

这是一个必须的值,根据不同规则书的要求设置相对应的值

属性说明⚓︎

用于规定默认投掷时骰子的个数


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file + _counts 骰子个数 - HydroRollCore 核心文档 (草案)
跳转至

_counts 骰子个数

Tip

这是一个必须的值,根据不同规则书的要求设置相对应的值

属性说明⚓︎

用于规定默认投掷时骰子的个数


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file diff --git a/latest/Standard/Term/DefaultDice/_sides/index.html b/latest/Standard/Term/DefaultDice/_sides/index.html index 3f689331..4afbaff8 100644 --- a/latest/Standard/Term/DefaultDice/_sides/index.html +++ b/latest/Standard/Term/DefaultDice/_sides/index.html @@ -1 +1 @@ - _sides 骰子面数 - HydroRollCore 核心文档 (草案)
跳转至

_sides 骰子面数

属性说明⚓︎

用于规定默认投掷时骰子的面数


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file + _sides 骰子面数 - HydroRollCore 核心文档 (草案)
跳转至

_sides 骰子面数

属性说明⚓︎

用于规定默认投掷时骰子的面数


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file diff --git a/latest/Standard/Term/DefaultDice/index.html b/latest/Standard/Term/DefaultDice/index.html index abc73c61..7977744d 100644 --- a/latest/Standard/Term/DefaultDice/index.html +++ b/latest/Standard/Term/DefaultDice/index.html @@ -1 +1 @@ - DefaultDice 默认骰子 - HydroRollCore 核心文档 (草案)
跳转至

DefaultDice 默认骰子

Tip

这是一个必须的类,根据不同规则书的要求设置相对应的值

类说明⚓︎

用于规定默认投掷时骰子的各种属性,例如默认骰子数量,面数


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file + DefaultDice 默认骰子 - HydroRollCore 核心文档 (草案)
跳转至

DefaultDice 默认骰子

Tip

这是一个必须的类,根据不同规则书的要求设置相对应的值

类说明⚓︎

用于规定默认投掷时骰子的各种属性,例如默认骰子数量,面数


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file diff --git a/latest/Standard/Term/PlayerCard/index.html b/latest/Standard/Term/PlayerCard/index.html index 747879dc..5f58f157 100644 --- a/latest/Standard/Term/PlayerCard/index.html +++ b/latest/Standard/Term/PlayerCard/index.html @@ -1 +1 @@ - PlayerCard 人物卡 - HydroRollCore 核心文档 (草案)
跳转至

PlayerCard 人物卡

Tip

这是一个可选实现但是{建议尽量必须实现}的方法,主要表现在规则书正是检定方法不同而有所不同上。

类说明⚓︎

用于规定人物卡的格式,包括人物属性,属性之间的计算关系等


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file + PlayerCard 人物卡 - HydroRollCore 核心文档 (草案)
跳转至

PlayerCard 人物卡

Tip

这是一个可选实现但是{建议尽量必须实现}的方法,主要表现在规则书正是检定方法不同而有所不同上。

类说明⚓︎

用于规定人物卡的格式,包括人物属性,属性之间的计算关系等


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file diff --git a/latest/Standard/Term/check/ability/index.html b/latest/Standard/Term/check/ability/index.html index 34c75cd9..7af42526 100644 --- a/latest/Standard/Term/check/ability/index.html +++ b/latest/Standard/Term/check/ability/index.html @@ -1 +1 @@ - ability 检定 - HydroRollCore 核心文档 (草案)
\ No newline at end of file + ability 检定 - HydroRollCore 核心文档 (草案)
\ No newline at end of file diff --git a/latest/Standard/Term/check/index.html b/latest/Standard/Term/check/index.html index 4d99fff9..edc09fac 100644 --- a/latest/Standard/Term/check/index.html +++ b/latest/Standard/Term/check/index.html @@ -1 +1 @@ - check 检定 - HydroRollCore 核心文档 (草案)
跳转至

check 检定

Tip

这是一个可选实现但是{建议尽量必须实现}的方法,主要表现在规则书正是检定方法不同而有所不同上。

方法说明⚓︎

使用check或者ability方法, 必须对检定结果设定一个完整的输出判定范围。

检定结果表⚓︎

方法所言,你必须为检定的结果设计一个完整的输出判定范围,因此你需要严格并且合理的分配划分界限,保证所有情况都在允许范围内有一个类似”成功””失败”的输出。


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file + check 检定 - HydroRollCore 核心文档 (草案)
跳转至

check 检定

Tip

这是一个可选实现但是{建议尽量必须实现}的方法,主要表现在规则书正是检定方法不同而有所不同上。

方法说明⚓︎

使用check或者ability方法, 必须对检定结果设定一个完整的输出判定范围。

检定结果表⚓︎

方法所言,你必须为检定的结果设计一个完整的输出判定范围,因此你需要严格并且合理的分配划分界限,保证所有情况都在允许范围内有一个类似”成功””失败”的输出。


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file diff --git a/latest/Standard/Term/duration/campaign/index.html b/latest/Standard/Term/duration/campaign/index.html index e60b9d37..46817449 100644 --- a/latest/Standard/Term/duration/campaign/index.html +++ b/latest/Standard/Term/duration/campaign/index.html @@ -1 +1 @@ - campaign 战役 - HydroRollCore 核心文档 (草案)

campaign 战役


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file + campaign 战役 - HydroRollCore 核心文档 (草案)

campaign 战役


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file diff --git a/latest/Standard/Term/duration/index.html b/latest/Standard/Term/duration/index.html index bfe28a47..1f8dec32 100644 --- a/latest/Standard/Term/duration/index.html +++ b/latest/Standard/Term/duration/index.html @@ -1 +1 @@ - duration (时长) - HydroRollCore 核心文档 (草案)
跳转至

duration (时长)⚓︎


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file + duration (时长) - HydroRollCore 核心文档 (草案)
跳转至

duration (时长)⚓︎


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file diff --git a/latest/Standard/Term/duration/module/index.html b/latest/Standard/Term/duration/module/index.html index 032e2a63..b4d07617 100644 --- a/latest/Standard/Term/duration/module/index.html +++ b/latest/Standard/Term/duration/module/index.html @@ -1 +1 @@ - module 模组 - HydroRollCore 核心文档 (草案)

module 模组


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file + module 模组 - HydroRollCore 核心文档 (草案)

module 模组


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file diff --git a/latest/Standard/Term/duration/sene/index.html b/latest/Standard/Term/duration/sene/index.html index 47364130..e64fea65 100644 --- a/latest/Standard/Term/duration/sene/index.html +++ b/latest/Standard/Term/duration/sene/index.html @@ -1 +1 @@ - sene 场 - HydroRollCore 核心文档 (草案)

sene 场


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file + sene 场 - HydroRollCore 核心文档 (草案)

sene 场


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file diff --git a/latest/Standard/Term/scenario/index.html b/latest/Standard/Term/scenario/index.html index 75465f1b..08bfd31c 100644 --- a/latest/Standard/Term/scenario/index.html +++ b/latest/Standard/Term/scenario/index.html @@ -1 +1 @@ - scenario 剧本 - HydroRollCore 核心文档 (草案)

scenario 剧本


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file + scenario 剧本 - HydroRollCore 核心文档 (草案)

scenario 剧本


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file diff --git a/latest/Standard/Term/setting/index.html b/latest/Standard/Term/setting/index.html index 25895ad5..5efae91f 100644 --- a/latest/Standard/Term/setting/index.html +++ b/latest/Standard/Term/setting/index.html @@ -1 +1 @@ - setting 背景 - HydroRollCore 核心文档 (草案)

setting 背景


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file + setting 背景 - HydroRollCore 核心文档 (草案)

setting 背景


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file diff --git a/latest/Standard/what-is-rule-package/index.html b/latest/Standard/what-is-rule-package/index.html index 4af6f874..05dc8096 100644 --- a/latest/Standard/what-is-rule-package/index.html +++ b/latest/Standard/what-is-rule-package/index.html @@ -1,4 +1,4 @@ - 什么是规则包? - HydroRollCore 核心文档 (草案)

什么是规则包?

规则包是水系核心用来加载的对象,可以理解为水系核心加载的一个一个规则实例。

规则包更类似于插件的设计,所以规则包也可以是一个Python文件或者一个Python包,但它必须像插件那样继承一个像Plugin这样的类(不然无法读取,我们姑且叫这个类为Rule),以及在Rule的子类里实现一些像handle()或者rule()这样必须实现的方法(也叫函数),而这些必须实现的方法,就是我们要讨论的,一个通用规则包标准就是明确了一个继承自Rule类的子类它本身应该实现什么方法。

举个例子(随便写的,其中一些必须实现的属性或者类名都是不确定的,以后或许会改):

 1
+ 什么是规则包? - HydroRollCore 核心文档 (草案)      

什么是规则包?

规则包是水系核心用来加载的对象,可以理解为水系核心加载的一个一个规则实例。

规则包更类似于插件的设计,所以规则包也可以是一个Python文件或者一个Python包,但它必须像插件那样继承一个像Plugin这样的类(不然无法读取,我们姑且叫这个类为Rule),以及在Rule的子类里实现一些像handle()或者rule()这样必须实现的方法(也叫函数),而这些必须实现的方法,就是我们要讨论的,一个通用规则包标准就是明确了一个继承自Rule类的子类它本身应该实现什么方法。

举个例子(随便写的,其中一些必须实现的属性或者类名都是不确定的,以后或许会改):

 1
  2
  3
  4
@@ -45,4 +45,4 @@
             return self.rule.ability.success # 返回大成功时骰主自定义的大成功文本
         else:
             ... # 其他的检定情况
-

这样就实现了一个水系规则包,当pl使用检定掷骰指令时就会调用check()方法,如果检定结果数值小于5且大于0那么返回大成功。

我们要做的通用规则包标准就是这样一个“到底需要在Rule的子类MyRule里必须实现哪些方法?”的问题。


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file +

这样就实现了一个水系规则包,当pl使用检定掷骰指令时就会调用check()方法,如果检定结果数值小于5且大于0那么返回大成功。

我们要做的通用规则包标准就是这样一个“到底需要在Rule的子类MyRule里必须实现哪些方法?”的问题。


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file diff --git a/latest/Standard/what-is-standard/index.html b/latest/Standard/what-is-standard/index.html index b459527d..abdf607c 100644 --- a/latest/Standard/what-is-standard/index.html +++ b/latest/Standard/what-is-standard/index.html @@ -1 +1 @@ - 什么是通用规则包标准? - HydroRollCore 核心文档 (草案)

什么是通用规则包标准?


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file + 什么是通用规则包标准? - HydroRollCore 核心文档 (草案)

什么是通用规则包标准?


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file diff --git a/latest/Standard/why-rule-package/index.html b/latest/Standard/why-rule-package/index.html index bd3a582d..4ae4e519 100644 --- a/latest/Standard/why-rule-package/index.html +++ b/latest/Standard/why-rule-package/index.html @@ -1 +1 @@ - 为什么要做规则包? - HydroRollCore 核心文档 (草案)

为什么要做规则包?


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file + 为什么要做规则包? - HydroRollCore 核心文档 (草案)

为什么要做规则包?


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file diff --git a/latest/assets/stylesheets/custom.00c04c01.min.css b/latest/assets/stylesheets/custom.00c04c01.min.css index 9fb02e08..6860115b 100644 --- a/latest/assets/stylesheets/custom.00c04c01.min.css +++ b/latest/assets/stylesheets/custom.00c04c01.min.css @@ -1 +1,571 @@ -@keyframes heart{0%,40%,80%,to{transform:scale(1)}20%,60%{transform:scale(1.15)}}.md-typeset .twitter{color:#00acee}.md-typeset .mastodon{color:#897ff8}.md-typeset .mdx-video{width:auto}.md-typeset .mdx-video__inner{height:0;padding-bottom:56.138%;position:relative;width:100%}.md-typeset .mdx-video iframe{border:none;height:100%;left:0;overflow:hidden;position:absolute;top:0;width:100%}.md-typeset .mdx-heart{animation:heart 1s infinite}.md-typeset .mdx-insiders{color:#e91e63}.md-typeset .mdx-badge{font-size:.85em}.md-typeset .mdx-badge--heart{--md-typeset-a-color:#e92063;--md-accent-fg-color:#ff4281;--md-accent-fg-color--transparent:#e920631a}.md-typeset .mdx-badge--heart .twemoji{animation:heart 1s infinite}.md-typeset .mdx-badge--right{float:right;margin-left:.35em}[dir=ltr] .md-typeset .mdx-badge__icon{border-top-left-radius:.1rem}[dir=rtl] .md-typeset .mdx-badge__icon{border-top-right-radius:.1rem}[dir=ltr] .md-typeset .mdx-badge__icon{border-bottom-left-radius:.1rem}[dir=rtl] .md-typeset .mdx-badge__icon{border-bottom-right-radius:.1rem}.md-typeset .mdx-badge__icon{background:var(--md-accent-fg-color--transparent);padding:.2rem}.md-typeset .mdx-badge__icon:last-child{border-radius:.1rem}[dir=ltr] .md-typeset .mdx-badge__text{border-top-right-radius:.1rem}[dir=rtl] .md-typeset .mdx-badge__text{border-top-left-radius:.1rem}[dir=ltr] .md-typeset .mdx-badge__text{border-bottom-right-radius:.1rem}[dir=rtl] .md-typeset .mdx-badge__text{border-bottom-left-radius:.1rem}.md-typeset .mdx-badge__text{box-shadow:0 0 0 1px inset var(--md-accent-fg-color--transparent);padding:.2rem .3rem}.md-typeset .mdx-switch button{cursor:pointer;transition:opacity .25s}.md-typeset .mdx-switch button:focus,.md-typeset .mdx-switch button:hover{opacity:.75}.md-typeset .mdx-switch button>code{background-color:var(--md-primary-fg-color);color:var(--md-primary-bg-color);display:block}.md-typeset .mdx-columns ol,.md-typeset .mdx-columns ul{-moz-columns:2;column-count:2}@media screen and (max-width:29.984375em){.md-typeset .mdx-columns ol,.md-typeset .mdx-columns ul{-moz-columns:initial;columns:initial}}.md-typeset .mdx-columns li{-moz-column-break-inside:avoid;break-inside:avoid}.md-typeset .mdx-flags{margin:2em auto}.md-typeset .mdx-flags ol{list-style:none}.md-typeset .mdx-flags ol li{margin-bottom:1em}.md-typeset .mdx-flags__item{display:flex;gap:.6rem}.md-typeset .mdx-flags__content{display:flex;flex:1;flex-direction:column}.md-typeset .mdx-flags__content span{align-items:baseline;display:inline-flex;justify-content:space-between}.md-typeset .mdx-flags__content>span:nth-child(2){font-size:80%}.md-typeset .mdx-flags__content code{float:right}.md-typeset .mdx-social{height:min(27rem,80vw);position:relative}.md-typeset .mdx-social:hover .mdx-social__image{background-color:#e4e4e40d}.md-typeset .mdx-social__layer{margin-top:4rem;position:absolute;transform-style:preserve-3d;transition:.25s cubic-bezier(.7,0,.3,1)}.md-typeset .mdx-social__layer:hover .mdx-social__label{opacity:1}.md-typeset .mdx-social__layer:hover .mdx-social__image{background-color:#7f7f7ffc}.md-typeset .mdx-social__layer:hover~.mdx-social__layer{opacity:0}.md-typeset .mdx-social__image{box-shadow:-.25rem .25rem .5rem #0000000d;transform:rotate(-40deg) skew(15deg,15deg) scale(.7);transition:all .25s}.md-typeset .mdx-social__image img{display:block}.md-typeset .mdx-social__label{background-color:var(--md-default-fg-color--light);color:var(--md-default-bg-color);display:block;opacity:0;padding:.2rem .4rem;position:absolute;transition:all .25s}.md-typeset .mdx-social:hover .mdx-social__layer:nth-child(6){transform:translateY(-30px)}.md-typeset .mdx-social:hover .mdx-social__layer:nth-child(5){transform:translateY(-20px)}.md-typeset .mdx-social:hover .mdx-social__layer:nth-child(4){transform:translateY(-10px)}.md-typeset .mdx-social:hover .mdx-social__layer:nth-child(3){transform:translateY(0)}.md-typeset .mdx-social:hover .mdx-social__layer:nth-child(2){transform:translateY(10px)}.md-typeset .mdx-social:hover .mdx-social__layer:first-child{transform:translateY(20px)}.md-typeset .mdx-social:hover .mdx-social__layer:nth-child(0){transform:translateY(30px)}.md-banner{color:var(--md-footer-fg-color--lighter)}.md-banner strong{white-space:nowrap}.md-banner a,.md-banner strong{color:var(--md-footer-fg-color)}.md-banner a:focus,.md-banner a:hover{color:currentcolor}.md-banner a:focus .twemoji,.md-banner a:hover .twemoji{background-color:var(--md-footer-fg-color);box-shadow:none}.md-banner .twemoji{border-radius:100%;box-shadow:inset 0 0 0 .05rem currentcolor;display:inline-block;height:1.2rem;padding:.25rem;transition:all .25s;vertical-align:bottom;width:1.2rem}.md-banner .twemoji svg{display:block;max-height:none}.mdx-container{background:url("data:image/svg+xml;utf8,") no-repeat bottom,linear-gradient(to bottom,var(--md-primary-fg-color),#a63fd9 99%,var(--md-default-bg-color) 99%);padding-top:1rem}[data-md-color-scheme=slate] .mdx-container{background:url("data:image/svg+xml;utf8,") no-repeat bottom,linear-gradient(to bottom,var(--md-primary-fg-color),#363949 99%,var(--md-default-bg-color) 99%)}.mdx-hero{color:var(--md-primary-bg-color);margin:0 .8rem}.mdx-hero h1{color:currentcolor;font-weight:700;margin-bottom:1rem}@media screen and (max-width:29.984375em){.mdx-hero h1{font-size:1.4rem}}.mdx-hero__content{padding-bottom:6rem}@media screen and (min-width:60em){.mdx-hero{align-items:stretch;display:flex}.mdx-hero__content{margin-top:3.5rem;max-width:19rem;padding-bottom:14vw}.mdx-hero__image{order:1;transform:translateX(4rem);width:38rem}}@media screen and (min-width:76.25em){.mdx-hero__image{transform:translateX(8rem)}}.mdx-hero .md-button{color:var(--md-primary-bg-color);margin-right:.5rem;margin-top:.5rem}.mdx-hero .md-button:focus,.mdx-hero .md-button:hover{background-color:var(--md-accent-fg-color);border-color:var(--md-accent-fg-color);color:var(--md-accent-bg-color)}.mdx-hero .md-button--primary{background-color:var(--md-primary-bg-color);border-color:var(--md-primary-bg-color);color:#894da8}.md-typeset .mdx-iconsearch{background-color:var(--md-default-bg-color);border-radius:.1rem;box-shadow:var(--md-shadow-z1);position:relative;transition:box-shadow 125ms}.md-typeset .mdx-iconsearch:focus-within,.md-typeset .mdx-iconsearch:hover{box-shadow:var(--md-shadow-z2)}.md-typeset .mdx-iconsearch .md-input{background:var(--md-default-bg-color);box-shadow:none}[data-md-color-scheme=slate] .md-typeset .mdx-iconsearch .md-input{background:var(--md-code-bg-color)}.md-typeset .mdx-iconsearch-result{-webkit-backface-visibility:hidden;backface-visibility:hidden;max-height:50vh;overflow-y:auto;scrollbar-color:var(--md-default-fg-color--lighter) #0000;scrollbar-width:thin;touch-action:pan-y}.md-tooltip .md-typeset .mdx-iconsearch-result{max-height:10.25rem}.md-typeset .mdx-iconsearch-result::-webkit-scrollbar{height:.2rem;width:.2rem}.md-typeset .mdx-iconsearch-result::-webkit-scrollbar-thumb{background-color:var(--md-default-fg-color--lighter)}.md-typeset .mdx-iconsearch-result::-webkit-scrollbar-thumb:hover{background-color:var(--md-accent-fg-color)}.md-typeset .mdx-iconsearch-result__meta{color:var(--md-default-fg-color--lighter);font-size:.64rem;position:absolute;right:.6rem;top:.4rem}[dir=ltr] .md-typeset .mdx-iconsearch-result__list{margin-left:0}[dir=rtl] .md-typeset .mdx-iconsearch-result__list{margin-right:0}.md-typeset .mdx-iconsearch-result__list{list-style:none;margin:0;padding:0}[dir=ltr] .md-typeset .mdx-iconsearch-result__item{margin-left:0}[dir=rtl] .md-typeset .mdx-iconsearch-result__item{margin-right:0}.md-typeset .mdx-iconsearch-result__item{border-bottom:.05rem solid var(--md-default-fg-color--lightest);margin:0;padding:.2rem .6rem}.md-typeset .mdx-iconsearch-result__item:last-child{border-bottom:none}.md-typeset .mdx-iconsearch-result__item>*{margin-right:.6rem}.md-typeset .mdx-iconsearch-result__item img{height:.9rem;width:.9rem}[data-md-color-scheme=slate] .md-typeset .mdx-iconsearch-result__item img[src*=squidfunk]{filter:invert(1)}.md-typeset .mdx-premium p{margin:2em 0;text-align:center}.md-typeset .mdx-premium img{height:3.25rem}.md-typeset .mdx-premium p:last-child{display:flex;flex-wrap:wrap;justify-content:center}.md-typeset .mdx-premium p:last-child>a{display:block;flex-shrink:0}.md-typeset .mdx-sponsorship__list{margin:2em 0}.md-typeset .mdx-sponsorship__list:after{clear:both;content:"";display:block}[dir=ltr] .md-typeset .mdx-sponsorship__item{float:left}[dir=rtl] .md-typeset .mdx-sponsorship__item{float:right}.md-typeset .mdx-sponsorship__item{border-radius:100%;display:block;height:1.6rem;margin:.2rem;overflow:hidden;transform:scale(1);transition:color 125ms,transform 125ms;width:1.6rem}.md-typeset .mdx-sponsorship__item:focus,.md-typeset .mdx-sponsorship__item:hover{transform:scale(1.1)}.md-typeset .mdx-sponsorship__item:focus img,.md-typeset .mdx-sponsorship__item:hover img{filter:grayscale(0)}.md-typeset .mdx-sponsorship__item--private{background:var(--md-default-fg-color--lightest);color:var(--md-default-fg-color--lighter);font-size:.6rem;font-weight:700;line-height:1.6rem;text-align:center}.md-typeset .mdx-sponsorship__item img{display:block;filter:grayscale(100%) opacity(75%);height:auto;transition:filter 125ms;width:100%}.md-typeset .mdx-sponsorship-button{font-weight:400}.md-typeset .mdx-sponsorship-count,.md-typeset .mdx-sponsorship-total{font-weight:700} \ No newline at end of file +@keyframes heart { + + 0%, + 40%, + 80%, + to { + transform: scale(1) + } + + 20%, + 60% { + transform: scale(1.15) + } +} + +.md-typeset .twitter { + color: #00acee +} + +.md-typeset .mastodon { + color: #897ff8 +} + +.md-typeset .mdx-video { + width: auto +} + +.md-typeset .mdx-video__inner { + height: 0; + padding-bottom: 56.138%; + position: relative; + width: 100% +} + +.md-typeset .mdx-video iframe { + border: none; + height: 100%; + left: 0; + overflow: hidden; + position: absolute; + top: 0; + width: 100% +} + +.md-typeset .mdx-heart { + animation: heart 1s infinite +} + +.md-typeset .mdx-insiders { + color: #e91e63 +} + +.md-typeset .mdx-badge { + font-size: .85em +} + +.md-typeset .mdx-badge--heart { + --md-typeset-a-color: #e92063; + --md-accent-fg-color: #ff4281; + --md-accent-fg-color--transparent: #e920631a +} + +.md-typeset .mdx-badge--heart .twemoji { + animation: heart 1s infinite +} + +.md-typeset .mdx-badge--right { + float: right; + margin-left: .35em +} + +[dir=ltr] .md-typeset .mdx-badge__icon { + border-top-left-radius: .1rem +} + +[dir=rtl] .md-typeset .mdx-badge__icon { + border-top-right-radius: .1rem +} + +[dir=ltr] .md-typeset .mdx-badge__icon { + border-bottom-left-radius: .1rem +} + +[dir=rtl] .md-typeset .mdx-badge__icon { + border-bottom-right-radius: .1rem +} + +.md-typeset .mdx-badge__icon { + background: var(--md-accent-fg-color--transparent); + padding: .2rem +} + +.md-typeset .mdx-badge__icon:last-child { + border-radius: .1rem +} + +[dir=ltr] .md-typeset .mdx-badge__text { + border-top-right-radius: .1rem +} + +[dir=rtl] .md-typeset .mdx-badge__text { + border-top-left-radius: .1rem +} + +[dir=ltr] .md-typeset .mdx-badge__text { + border-bottom-right-radius: .1rem +} + +[dir=rtl] .md-typeset .mdx-badge__text { + border-bottom-left-radius: .1rem +} + +.md-typeset .mdx-badge__text { + box-shadow: 0 0 0 1px inset var(--md-accent-fg-color--transparent); + padding: .2rem .3rem +} + +.md-typeset .mdx-switch button { + cursor: pointer; + transition: opacity .25s +} + +.md-typeset .mdx-switch button:focus, +.md-typeset .mdx-switch button:hover { + opacity: .75 +} + +.md-typeset .mdx-switch button>code { + background-color: var(--md-primary-fg-color); + color: var(--md-primary-bg-color); + display: block +} + +.md-typeset .mdx-columns ol, +.md-typeset .mdx-columns ul { + -moz-columns: 2; + column-count: 2 +} + +@media screen and (max-width:29.984375em) { + + .md-typeset .mdx-columns ol, + .md-typeset .mdx-columns ul { + -moz-columns: initial; + columns: initial + } +} + +.md-typeset .mdx-columns li { + -moz-column-break-inside: avoid; + break-inside: avoid +} + +.md-typeset .mdx-flags { + margin: 2em auto +} + +.md-typeset .mdx-flags ol { + list-style: none +} + +.md-typeset .mdx-flags ol li { + margin-bottom: 1em +} + +.md-typeset .mdx-flags__item { + display: flex; + gap: .6rem +} + +.md-typeset .mdx-flags__content { + display: flex; + flex: 1; + flex-direction: column +} + +.md-typeset .mdx-flags__content span { + align-items: baseline; + display: inline-flex; + justify-content: space-between +} + +.md-typeset .mdx-flags__content>span:nth-child(2) { + font-size: 80% +} + +.md-typeset .mdx-flags__content code { + float: right +} + +.md-typeset .mdx-social { + height: min(27rem, 80vw); + position: relative +} + +.md-typeset .mdx-social:hover .mdx-social__image { + background-color: #e4e4e40d +} + +.md-typeset .mdx-social__layer { + margin-top: 4rem; + position: absolute; + transform-style: preserve-3d; + transition: .25s cubic-bezier(.7, 0, .3, 1) +} + +.md-typeset .mdx-social__layer:hover .mdx-social__label { + opacity: 1 +} + +.md-typeset .mdx-social__layer:hover .mdx-social__image { + background-color: #7f7f7ffc +} + +.md-typeset .mdx-social__layer:hover~.mdx-social__layer { + opacity: 0 +} + +.md-typeset .mdx-social__image { + box-shadow: -.25rem .25rem .5rem #0000000d; + transform: rotate(-40deg) skew(15deg, 15deg) scale(.7); + transition: all .25s +} + +.md-typeset .mdx-social__image img { + display: block +} + +.md-typeset .mdx-social__label { + background-color: var(--md-default-fg-color--light); + color: var(--md-default-bg-color); + display: block; + opacity: 0; + padding: .2rem .4rem; + position: absolute; + transition: all .25s +} + +.md-typeset .mdx-social:hover .mdx-social__layer:nth-child(6) { + transform: translateY(-30px) +} + +.md-typeset .mdx-social:hover .mdx-social__layer:nth-child(5) { + transform: translateY(-20px) +} + +.md-typeset .mdx-social:hover .mdx-social__layer:nth-child(4) { + transform: translateY(-10px) +} + +.md-typeset .mdx-social:hover .mdx-social__layer:nth-child(3) { + transform: translateY(0) +} + +.md-typeset .mdx-social:hover .mdx-social__layer:nth-child(2) { + transform: translateY(10px) +} + +.md-typeset .mdx-social:hover .mdx-social__layer:first-child { + transform: translateY(20px) +} + +.md-typeset .mdx-social:hover .mdx-social__layer:nth-child(0) { + transform: translateY(30px) +} + +.md-banner { + color: var(--md-footer-fg-color--lighter) +} + +.md-banner strong { + white-space: nowrap +} + +.md-banner a, +.md-banner strong { + color: var(--md-footer-fg-color) +} + +.md-banner a:focus, +.md-banner a:hover { + color: currentcolor +} + +.md-banner a:focus .twemoji, +.md-banner a:hover .twemoji { + background-color: var(--md-footer-fg-color); + box-shadow: none +} + +.md-banner .twemoji { + border-radius: 100%; + box-shadow: inset 0 0 0 .05rem currentcolor; + display: inline-block; + height: 1.2rem; + padding: .25rem; + transition: all .25s; + vertical-align: bottom; + width: 1.2rem +} + +.md-banner .twemoji svg { + display: block; + max-height: none +} + +.md-banner--warning { + background-color: #fa7575; + color: var(--md-warning-fg-color); +} + +.mdx-container { + background: url("data:image/svg+xml;utf8,") no-repeat bottom, linear-gradient(to bottom, var(--md-primary-fg-color), #a63fd9 99%, var(--md-default-bg-color) 99%); + padding-top: 1rem +} + +[data-md-color-scheme=slate] .mdx-container { + background: url("data:image/svg+xml;utf8,") no-repeat bottom, linear-gradient(to bottom, var(--md-primary-fg-color), #363949 99%, var(--md-default-bg-color) 99%) +} + +.mdx-hero { + color: var(--md-primary-bg-color); + margin: 0 .8rem +} + +.mdx-hero h1 { + color: currentcolor; + font-weight: 700; + margin-bottom: 1rem +} + +@media screen and (max-width:29.984375em) { + .mdx-hero h1 { + font-size: 1.4rem + } +} + +.mdx-hero__content { + padding-bottom: 6rem +} + +@media screen and (min-width:60em) { + .mdx-hero { + align-items: stretch; + display: flex + } + + .mdx-hero__content { + margin-top: 3.5rem; + max-width: 19rem; + padding-bottom: 14vw + } + + .mdx-hero__image { + order: 1; + transform: translateX(4rem); + width: 38rem + } +} + +@media screen and (min-width:76.25em) { + .mdx-hero__image { + transform: translateX(8rem) + } +} + +.mdx-hero .md-button { + color: var(--md-primary-bg-color); + margin-right: .5rem; + margin-top: .5rem +} + +.mdx-hero .md-button:focus, +.mdx-hero .md-button:hover { + background-color: var(--md-accent-fg-color); + border-color: var(--md-accent-fg-color); + color: var(--md-accent-bg-color) +} + +.mdx-hero .md-button--primary { + background-color: var(--md-primary-bg-color); + border-color: var(--md-primary-bg-color); + color: #894da8 +} + +.md-typeset .mdx-iconsearch { + background-color: var(--md-default-bg-color); + border-radius: .1rem; + box-shadow: var(--md-shadow-z1); + position: relative; + transition: box-shadow 125ms +} + +.md-typeset .mdx-iconsearch:focus-within, +.md-typeset .mdx-iconsearch:hover { + box-shadow: var(--md-shadow-z2) +} + +.md-typeset .mdx-iconsearch .md-input { + background: var(--md-default-bg-color); + box-shadow: none +} + +[data-md-color-scheme=slate] .md-typeset .mdx-iconsearch .md-input { + background: var(--md-code-bg-color) +} + +.md-typeset .mdx-iconsearch-result { + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + max-height: 50vh; + overflow-y: auto; + scrollbar-color: var(--md-default-fg-color--lighter) #0000; + scrollbar-width: thin; + touch-action: pan-y +} + +.md-tooltip .md-typeset .mdx-iconsearch-result { + max-height: 10.25rem +} + +.md-typeset .mdx-iconsearch-result::-webkit-scrollbar { + height: .2rem; + width: .2rem +} + +.md-typeset .mdx-iconsearch-result::-webkit-scrollbar-thumb { + background-color: var(--md-default-fg-color--lighter) +} + +.md-typeset .mdx-iconsearch-result::-webkit-scrollbar-thumb:hover { + background-color: var(--md-accent-fg-color) +} + +.md-typeset .mdx-iconsearch-result__meta { + color: var(--md-default-fg-color--lighter); + font-size: .64rem; + position: absolute; + right: .6rem; + top: .4rem +} + +[dir=ltr] .md-typeset .mdx-iconsearch-result__list { + margin-left: 0 +} + +[dir=rtl] .md-typeset .mdx-iconsearch-result__list { + margin-right: 0 +} + +.md-typeset .mdx-iconsearch-result__list { + list-style: none; + margin: 0; + padding: 0 +} + +[dir=ltr] .md-typeset .mdx-iconsearch-result__item { + margin-left: 0 +} + +[dir=rtl] .md-typeset .mdx-iconsearch-result__item { + margin-right: 0 +} + +.md-typeset .mdx-iconsearch-result__item { + border-bottom: .05rem solid var(--md-default-fg-color--lightest); + margin: 0; + padding: .2rem .6rem +} + +.md-typeset .mdx-iconsearch-result__item:last-child { + border-bottom: none +} + +.md-typeset .mdx-iconsearch-result__item>* { + margin-right: .6rem +} + +.md-typeset .mdx-iconsearch-result__item img { + height: .9rem; + width: .9rem +} + +[data-md-color-scheme=slate] .md-typeset .mdx-iconsearch-result__item img[src*=squidfunk] { + filter: invert(1) +} + +.md-typeset .mdx-premium p { + margin: 2em 0; + text-align: center +} + +.md-typeset .mdx-premium img { + height: 3.25rem +} + +.md-typeset .mdx-premium p:last-child { + display: flex; + flex-wrap: wrap; + justify-content: center +} + +.md-typeset .mdx-premium p:last-child>a { + display: block; + flex-shrink: 0 +} + +.md-typeset .mdx-sponsorship__list { + margin: 2em 0 +} + +.md-typeset .mdx-sponsorship__list:after { + clear: both; + content: ""; + display: block +} + +[dir=ltr] .md-typeset .mdx-sponsorship__item { + float: left +} + +[dir=rtl] .md-typeset .mdx-sponsorship__item { + float: right +} + +.md-typeset .mdx-sponsorship__item { + border-radius: 100%; + display: block; + height: 1.6rem; + margin: .2rem; + overflow: hidden; + transform: scale(1); + transition: color 125ms, transform 125ms; + width: 1.6rem +} + +.md-typeset .mdx-sponsorship__item:focus, +.md-typeset .mdx-sponsorship__item:hover { + transform: scale(1.1) +} + +.md-typeset .mdx-sponsorship__item:focus img, +.md-typeset .mdx-sponsorship__item:hover img { + filter: grayscale(0) +} + +.md-typeset .mdx-sponsorship__item--private { + background: var(--md-default-fg-color--lightest); + color: var(--md-default-fg-color--lighter); + font-size: .6rem; + font-weight: 700; + line-height: 1.6rem; + text-align: center +} + +.md-typeset .mdx-sponsorship__item img { + display: block; + filter: grayscale(100%) opacity(75%); + height: auto; + transition: filter 125ms; + width: 100% +} + +.md-typeset .mdx-sponsorship-button { + font-weight: 400 +} + +.md-typeset .mdx-sponsorship-count, +.md-typeset .mdx-sponsorship-total { + font-weight: 700 +} \ No newline at end of file diff --git a/latest/blog/2023/10/07/rule/index.html b/latest/blog/2023/10/07/rule/index.html index 9b8aaf16..8101cd65 100644 --- a/latest/blog/2023/10/07/rule/index.html +++ b/latest/blog/2023/10/07/rule/index.html @@ -1,5 +1,5 @@ Rule 基类已经支持泛型了 - HydroRollCore 核心文档 (草案)
跳转至

Rule 基类已经支持泛型了⚓︎

Hey there! You're looking at our new blog, built with the brand new built-in blog plugin. With this plugin, you can easily build a blog alongside your documentation or standalone.

Proper support for blogging, as requested by many users over the past few years, was something that was desperately missing from Material for MkDocs' feature set. While everybody agreed that blogging support was a blind spot, it was not obvious whether MkDocs could be extended in a way to allow for blogging as we know it from Jekyll and friends. The built-in blog plugin proves that it is, after all, possible to build a blogging engine on top of MkDocs, in order to create a technical blog alongside your documentation, or as the main thing.

This article explains how to build a standalone blog with Material for MkDocs. If you want to build a blog alongside your documentation, please refer to the plugin's documentation.

Quick start⚓︎

Creating a standalone blog⚓︎

You can bootstrap a new project using the mkdocs executable:

mkdocs new .
+">Rule 基类已经支持泛型了 - HydroRollCore 核心文档 (草案)       

Rule 基类已经支持泛型了⚓︎

Hey there! You're looking at our new blog, built with the brand new built-in blog plugin. With this plugin, you can easily build a blog alongside your documentation or standalone.

Proper support for blogging, as requested by many users over the past few years, was something that was desperately missing from Material for MkDocs' feature set. While everybody agreed that blogging support was a blind spot, it was not obvious whether MkDocs could be extended in a way to allow for blogging as we know it from Jekyll and friends. The built-in blog plugin proves that it is, after all, possible to build a blogging engine on top of MkDocs, in order to create a technical blog alongside your documentation, or as the main thing.

This article explains how to build a standalone blog with Material for MkDocs. If you want to build a blog alongside your documentation, please refer to the plugin's documentation.

Quick start⚓︎

Creating a standalone blog⚓︎

You can bootstrap a new project using the mkdocs executable:

mkdocs new .
 

This will create the following structure:

1
 2
 3
@@ -103,4 +103,4 @@
 arcu tincidunt pulvinar. Vestibulum laoreet risus scelerisque porta congue.
 In velit purus, dictum quis neque nec, molestie viverra risus. Nam pellentesque
 tellus id elit ultricies, vel finibus erat cursus.
-
  1. If you mark a post as a draft, a red marker appears next to the post date on index pages. When the site is built, drafts are not included in the output. This behavior can be changed, e.g. for rendering drafts when building deploy previews.

When you spin up the live preview server, you should be greeted by your first post! You'll also realize, that archive and category indexes have been automatically generated for you:

Blog

However, this is just the start. The built-in blog plugin packs a lot of functionality needed in day-to-day blogging. Visit the documentation of the plugin to learn about the following topics:

Additionally, the built-in blog plugin has dozens of configuration options which allow for fine-tuning the output. You can configure post slugs, general behavior and much more.

What's next?⚓︎

Getting basic blogging support out the door was quite a challenge – the built-in blog plugin is probably the biggest release this year and already packs a lot of functionality. However, Material for MkDocs is used in many different contexts, which is why we'd expect to iterate, as always.

Some ideas already proposed by users:

  • Blog series: Authors should be able to create so called blog series and assign posts to a blog series using simple identifiers. For each post that is part of a series, a list with links to all other posts should be included in the post's content.

  • Author indexes: Besides archive and category indexes, authors should be able to create per-author indexes, which list all posts linked to an author. Additionally, a profile should be created for each author and linked from posts.

  • Social share buttons: It should be easy to share blog posts via social media or other ways. For this reason, it should be possible to automatically include social sharing buttons with each post.

What's still missing from the brand new built-in blog plugin? Feel free to share your ideas in the comments. Together, we can build one of the best modern engines for technical blogging!


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file +
  1. If you mark a post as a draft, a red marker appears next to the post date on index pages. When the site is built, drafts are not included in the output. This behavior can be changed, e.g. for rendering drafts when building deploy previews.

When you spin up the live preview server, you should be greeted by your first post! You'll also realize, that archive and category indexes have been automatically generated for you:

Blog

However, this is just the start. The built-in blog plugin packs a lot of functionality needed in day-to-day blogging. Visit the documentation of the plugin to learn about the following topics:

Additionally, the built-in blog plugin has dozens of configuration options which allow for fine-tuning the output. You can configure post slugs, general behavior and much more.

What's next?⚓︎

Getting basic blogging support out the door was quite a challenge – the built-in blog plugin is probably the biggest release this year and already packs a lot of functionality. However, Material for MkDocs is used in many different contexts, which is why we'd expect to iterate, as always.

Some ideas already proposed by users:

  • Blog series: Authors should be able to create so called blog series and assign posts to a blog series using simple identifiers. For each post that is part of a series, a list with links to all other posts should be included in the post's content.

  • Author indexes: Besides archive and category indexes, authors should be able to create per-author indexes, which list all posts linked to an author. Additionally, a profile should be created for each author and linked from posts.

  • Social share buttons: It should be easy to share blog posts via social media or other ways. For this reason, it should be possible to automatically include social sharing buttons with each post.

What's still missing from the brand new built-in blog plugin? Feel free to share your ideas in the comments. Together, we can build one of the best modern engines for technical blogging!


最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file diff --git a/latest/blog/archive/2023/index.html b/latest/blog/archive/2023/index.html index ee20eeb1..b8e8dd54 100644 --- a/latest/blog/archive/2023/index.html +++ b/latest/blog/archive/2023/index.html @@ -1 +1 @@ - 2023 - HydroRollCore 核心文档 (草案)
跳转至

2023⚓︎

Rule 基类已经支持泛型了

Hey there! You're looking at our new blog, built with the brand new built-in blog plugin. With this plugin, you can easily build a blog alongside your documentation or standalone.

Proper support for blogging, as requested by many users over the past few years, was something that was desperately missing from Material for MkDocs' feature set. While everybody agreed that blogging support was a blind spot, it was not obvious whether MkDocs could be extended in a way to allow for blogging as we know it from Jekyll and friends. The built-in blog plugin proves that it is, after all, possible to build a blogging engine on top of MkDocs, in order to create a technical blog alongside your documentation, or as the main thing.

\ No newline at end of file + 2023 - HydroRollCore 核心文档 (草案)
跳转至

2023⚓︎

Rule 基类已经支持泛型了

Hey there! You're looking at our new blog, built with the brand new built-in blog plugin. With this plugin, you can easily build a blog alongside your documentation or standalone.

Proper support for blogging, as requested by many users over the past few years, was something that was desperately missing from Material for MkDocs' feature set. While everybody agreed that blogging support was a blind spot, it was not obvious whether MkDocs could be extended in a way to allow for blogging as we know it from Jekyll and friends. The built-in blog plugin proves that it is, after all, possible to build a blogging engine on top of MkDocs, in order to create a technical blog alongside your documentation, or as the main thing.

\ No newline at end of file diff --git a/latest/blog/category/rules/index.html b/latest/blog/category/rules/index.html index 3281819b..082510c7 100644 --- a/latest/blog/category/rules/index.html +++ b/latest/blog/category/rules/index.html @@ -1 +1 @@ - Rules - HydroRollCore 核心文档 (草案)
跳转至

Rules⚓︎

Rule 基类已经支持泛型了

Hey there! You're looking at our new blog, built with the brand new built-in blog plugin. With this plugin, you can easily build a blog alongside your documentation or standalone.

Proper support for blogging, as requested by many users over the past few years, was something that was desperately missing from Material for MkDocs' feature set. While everybody agreed that blogging support was a blind spot, it was not obvious whether MkDocs could be extended in a way to allow for blogging as we know it from Jekyll and friends. The built-in blog plugin proves that it is, after all, possible to build a blogging engine on top of MkDocs, in order to create a technical blog alongside your documentation, or as the main thing.

\ No newline at end of file + Rules - HydroRollCore 核心文档 (草案)
跳转至

Rules⚓︎

Rule 基类已经支持泛型了

Hey there! You're looking at our new blog, built with the brand new built-in blog plugin. With this plugin, you can easily build a blog alongside your documentation or standalone.

Proper support for blogging, as requested by many users over the past few years, was something that was desperately missing from Material for MkDocs' feature set. While everybody agreed that blogging support was a blind spot, it was not obvious whether MkDocs could be extended in a way to allow for blogging as we know it from Jekyll and friends. The built-in blog plugin proves that it is, after all, possible to build a blogging engine on top of MkDocs, in order to create a technical blog alongside your documentation, or as the main thing.

\ No newline at end of file diff --git a/latest/blog/index.html b/latest/blog/index.html index 00883884..7b8a0632 100644 --- a/latest/blog/index.html +++ b/latest/blog/index.html @@ -1 +1 @@ - Blog - HydroRollCore 核心文档 (草案)
跳转至

Blog⚓︎

Rule 基类已经支持泛型了

Hey there! You're looking at our new blog, built with the brand new built-in blog plugin. With this plugin, you can easily build a blog alongside your documentation or standalone.

Proper support for blogging, as requested by many users over the past few years, was something that was desperately missing from Material for MkDocs' feature set. While everybody agreed that blogging support was a blind spot, it was not obvious whether MkDocs could be extended in a way to allow for blogging as we know it from Jekyll and friends. The built-in blog plugin proves that it is, after all, possible to build a blogging engine on top of MkDocs, in order to create a technical blog alongside your documentation, or as the main thing.

\ No newline at end of file + Blog - HydroRollCore 核心文档 (草案)
跳转至

Blog⚓︎

Rule 基类已经支持泛型了

Hey there! You're looking at our new blog, built with the brand new built-in blog plugin. With this plugin, you can easily build a blog alongside your documentation or standalone.

Proper support for blogging, as requested by many users over the past few years, was something that was desperately missing from Material for MkDocs' feature set. While everybody agreed that blogging support was a blind spot, it was not obvious whether MkDocs could be extended in a way to allow for blogging as we know it from Jekyll and friends. The built-in blog plugin proves that it is, after all, possible to build a blogging engine on top of MkDocs, in order to create a technical blog alongside your documentation, or as the main thing.

\ No newline at end of file diff --git a/latest/changelog/index.html b/latest/changelog/index.html index 325aa61c..08163594 100644 --- a/latest/changelog/index.html +++ b/latest/changelog/index.html @@ -1 +1 @@ - Changelog - HydroRollCore 核心文档 (草案)
跳转至

Changelog

1.0.1 (2023-10-07)⚓︎

BUG FIX⚓︎

  • Docs: 修复 Devlatest 分支的错别字。

0.1.2 (2023-10-07)⚓︎

同步版本所做的测试。

0.1.1 (2023-10-07)⚓︎

BUG FIX⚓︎

  • CLI: 添加命令行参数解析。

0.1.0-rc1 (2023-10-07)⚓︎

CHORE⚓︎

  • README: 更新主页介绍的安装指南。

0.1.0 (2023-10-07)⚓︎

Features⚓︎

  • CLI 添加两个命令行名称 HydroRollCoreHRC

0.0.1 (2023-07-04)⚓︎

Features⚓︎

  • init: 添加命令行参数解析。
  • Rule: 添加 Rule 基类,实现读取指定文件夹下的 python 脚本或 python 包

BREAKING CHANGE⚓︎

  • HydroRollCore: 添加命令行Path。

最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file + Changelog - HydroRollCore 核心文档 (草案)
跳转至

Changelog

1.0.2 (2023-10-07)⚓︎

FEATURES⚓︎

  • Docs: 优化 css 细节。

1.0.1 (2023-10-07)⚓︎

BUG FIX⚓︎

  • Docs: 修复 Devlatest 分支的错别字。

0.1.2 (2023-10-07)⚓︎

同步版本所做的测试。

0.1.1 (2023-10-07)⚓︎

BUG FIX⚓︎

  • CLI: 添加命令行参数解析。

0.1.0-rc1 (2023-10-07)⚓︎

CHORE⚓︎

  • README: 更新主页介绍的安装指南。

0.1.0 (2023-10-07)⚓︎

Features⚓︎

  • CLI 添加两个命令行名称 HydroRollCoreHRC

0.0.1 (2023-07-04)⚓︎

Features⚓︎

  • init: 添加命令行参数解析。
  • Rule: 添加 Rule 基类,实现读取指定文件夹下的 python 脚本或 python 包

BREAKING CHANGE⚓︎

  • HydroRollCore: 添加命令行Path。

最后更新: 2023-10-07
创建日期: 2023-10-07
\ No newline at end of file diff --git a/latest/index.html b/latest/index.html index fa723028..0f5c38fb 100644 --- a/latest/index.html +++ b/latest/index.html @@ -1 +1 @@ - 水系核心 - HydroRollCore 核心文档 (草案)

水系核心

一个基于通用规则包标准的规则包加载器。.

快速开始 查看标准
\ No newline at end of file + 水系核心 - HydroRollCore 核心文档 (草案)

水系核心

一个基于通用规则包标准的规则包加载器.

快速开始 查看标准
\ No newline at end of file diff --git a/latest/search/search_index.json b/latest/search/search_index.json index fc8fa1cd..87da903c 100644 --- a/latest/search/search_index.json +++ b/latest/search/search_index.json @@ -1 +1 @@ -{"config":{"lang":["en"],"separator":"[\\s\\u200b\\-_,:!=\\[\\]()\"`/]+|\\.(?!\\d)|&[lg]t;|(?!\\b)(?=[A-Z][a-z])","pipeline":["stemmer"]},"docs":[{"location":"","title":"\u6c34\u7cfb\u6838\u5fc3","text":"

\u4f60\u597d!\u4e16\u754c\u4e3b\u3002

"},{"location":"changelog/","title":"Changelog","text":""},{"location":"changelog/#101-2023-10-07","title":"1.0.1 (2023-10-07)","text":""},{"location":"changelog/#bug-fix","title":"BUG FIX","text":""},{"location":"changelog/#012-2023-10-07","title":"0.1.2 (2023-10-07)","text":"

\u540c\u6b65\u7248\u672c\u6240\u505a\u7684\u6d4b\u8bd5\u3002

"},{"location":"changelog/#011-2023-10-07","title":"0.1.1 (2023-10-07)","text":""},{"location":"changelog/#bug-fix_1","title":"BUG FIX","text":""},{"location":"changelog/#010-rc1-2023-10-07","title":"0.1.0-rc1 (2023-10-07)","text":""},{"location":"changelog/#chore","title":"CHORE","text":""},{"location":"changelog/#010-2023-10-07","title":"0.1.0 (2023-10-07)","text":""},{"location":"changelog/#features","title":"Features","text":""},{"location":"changelog/#001-2023-07-04","title":"0.0.1 (2023-07-04)","text":""},{"location":"changelog/#features_1","title":"Features","text":""},{"location":"changelog/#breaking-change","title":"BREAKING CHANGE","text":""},{"location":"CLI/","title":"CLI Reference","text":"

```python exec=\"1\" idprefix=\"\" import argparse import re from HydroRollCore import Cli

parser = Cli().parser

MONOSPACED = (\"pyproject.toml\", \"pdm.lock\", \".pdm-python\", \":pre\", \":post\", \":all\")

def clean_help(help: str) -> str: # Make dunders monospaced avoiding italic markdown rendering help = re.sub(r\"([\\w\\d_]+)\", r\"__\\1__\", help) # Make env vars monospaced help = re.sub(r\"env var: ([A-Z_]+)\", r\"env var: \\1\", help) for monospaced in MONOSPACED: help = re.sub(rf\"\\s(['\\\"]?{monospaced}['\\\"]?)\", f\"{monospaced}\", help) return help

def render_parser( parser: argparse.ArgumentParser, title: str, heading_level: int = 2 ) -> str: \"\"\"Render the parser help documents as a string.\"\"\" result = [f\"{'#' * heading_level} {title}\\n\"] if parser.description and title != \"HydroRollCore\": result.append(\"> \" + parser.description + \"\\n\")

for group in sorted(\n    parser._action_groups, key=lambda g: g.title.lower(), reverse=True\n):\n    if not any(\n        bool(action.option_strings or action.dest)\n        or isinstance(action, argparse._SubParsersAction)\n        for action in group._group_actions\n    ):\n        continue\n\n    result.append(f\"{group.title.title()}:\\n\")\n    for action in group._group_actions:\n        if isinstance(action, argparse._SubParsersAction):\n            for name, subparser in action._name_parser_map.items():\n                result.append(render_parser(subparser, name, heading_level + 1))\n            continue\n\n        opts = [f\"`{opt}`\" for opt in action.option_strings]\n        if not opts:\n            line = f\"- `{action.dest}`\"\n        else:\n            line = f\"- {', '.join(opts)}\"\n        if action.metavar:\n            line += f\" `{action.metavar}`\"\n        line += f\": {clean_help(action.help)}\"\n        if action.default and action.default != argparse.SUPPRESS:\n            line += f\" (default: `{action.default}`)\"\n        result.append(line)\n    result.append(\"\")\n\nreturn \"\\n\".join(result)\n

print(render_parser(parser, \"HydroRollCore\")) ```

"},{"location":"Core/","title":"\u6838\u5fc3\u6982\u89c8","text":"HydroRollCore'\u6c34\u7cfb\u6838\u5fc3"},{"location":"Core/#getting","title":"\ud83c\udf81 Getting","text":"
  1. \u5b89\u88c5\u5e93

\u5728\u547d\u4ee4\u884c\u8f93\u5165\u3002

git clone https://github.com/HydroRoll-Team/HydroRollCore.git\ncd HydroRollCore\npdm install\n# \u6216\u8005\u4f7f\u7528pip\n# pip install HydroRollCore\n
  1. \u521b\u5efa\u89c4\u5219\u5305\u5b9e\u4f8b
mkdir myrules && cd myrules && mkdir rule1\necho.> config.toml\necho.> __init__.py\n

\u5728 __init__.py \u521b\u5efa\u4e00\u4e2a rule \u5b9e\u4f8b\u5e76\u7ee7\u627f Rule \u57fa\u7c7b, \u901a\u8fc7\u7f16\u5199\u5408\u9002\u7684\u76f8\u5173\u65b9\u6cd5\u4e0e\u7c7b\u6ce8\u518c\u89c4\u5219\u5305\u5b9e\u73b0\u89c4\u5219\u7684\u81ea\u5b9a\u4e49\u3002

from HydroRollCore import Rule\n\nclass Myrule(Rule):\n  \"\"\"\u81ea\u8bbe\u89c4\u5219\u5305\uff0c\u7ee7\u627f Rule \u57fa\u7c7b\"\"\"\n
  1. \u5408\u7406\u4fee\u6539\u4f60\u7684 config.toml \u914d\u7f6e\u6587\u4ef6\uff0c\u5b8c\u6210\u6ce8\u518c!
"},{"location":"Core/#license","title":"\ud83d\udcc4 License","text":"

MIT \u00a9 2023-PRESENT \u7b80\u5f8b\u7eaf

"},{"location":"RulePackage/intro/","title":"\u89c4\u5219\u5305\u7b80\u4ecb","text":"

Warning

\u6b64\u7ae0\u8282\u6d89\u53ca\u5230\u771f\u6b63\u7684 Python \u89c4\u8303\u95ee\u9898\uff0c\u56e0\u6b64\u8bf7\u8ba4\u771f\u9605\u8bfb\u5e76\u591a\u52a0\u7ec3\u4e60\uff0c\u65b9\u80fd\u5199\u51fa\u6f02\u4eae\u7684\u4ee3\u7801\u3002

"},{"location":"RulePackage/getStart/attribute/","title":"attribute \u5c5e\u6027","text":"

Info

\u5173\u8054\u5230\u4e00\u4e2a\u5bf9\u8c61\u7684\u503c\uff0c\u901a\u5e38\u4f7f\u7528\u70b9\u53f7\u8868\u8fbe\u5f0f\u6309\u540d\u79f0\u6765\u5f15\u7528\u3002 \u4e3e\u4f8b\u6765\u8bf4\uff0c\u5982\u679c\u5bf9\u8c61 o \u5177\u6709\u5c5e\u6027 a \u5219\u53ef\u4ee5\u7528 o.a \u6765\u5f15\u7528\u5b83\u3002

\u5982\u679c\u5bf9\u8c61\u5141\u8bb8\uff0c\u5c06\u672a\u88ab\u5b9a\u4e49\u4e3a \u6807\u8bc6\u7b26\u548c\u5173\u952e\u5b57 \u7684\u975e\u6807\u8bc6\u540d\u79f0\u7528\u4f5c\u4e00\u4e2a\u5bf9\u8c61\u7684\u5c5e\u6027\u4e5f\u662f\u53ef\u4ee5\u7684\uff0c\u4f8b\u5982\u4f7f\u7528 setattr()\u3002 \u8fd9\u6837\u7684\u5c5e\u6027\u5c06\u65e0\u6cd5\u4f7f\u7528\u70b9\u53f7\u8868\u8fbe\u5f0f\u6765\u8bbf\u95ee\uff0c\u800c\u662f\u5fc5\u987b\u901a\u8fc7 getattr() \u6765\u83b7\u53d6\u3002

"},{"location":"RulePackage/getStart/class/","title":"class \u7c7b","text":"

Info

\u7528\u6765\u521b\u5efa\u7528\u6237\u5b9a\u4e49\u5bf9\u8c61\u7684\u6a21\u677f\u3002\u7c7b\u5b9a\u4e49\u901a\u5e38\u5305\u542b\u5bf9\u8be5\u7c7b\u7684\u5b9e\u4f8b\u8fdb\u884c\u64cd\u4f5c\u7684\u65b9\u6cd5\u5b9a\u4e49\u3002

"},{"location":"RulePackage/getStart/method/","title":"method \u65b9\u6cd5","text":"

Info

\u5728\u7c7b\u5185\u90e8\u5b9a\u4e49\u7684\u51fd\u6570\u3002\u5982\u679c\u4f5c\u4e3a\u8be5\u7c7b\u7684\u5b9e\u4f8b\u7684\u4e00\u4e2a\u5c5e\u6027\u6765\u8c03\u7528\uff0c\u65b9\u6cd5\u5c06\u4f1a\u83b7\u53d6\u5b9e\u4f8b\u5bf9\u8c61\u4f5c\u4e3a\u5176\u7b2c\u4e00\u4e2a argument (\u901a\u5e38\u547d\u540d\u4e3a self)\u3002\u53c2\u89c1 function \u548c nested scope\u3002

"},{"location":"RulePackage/getStart/getDeeper/Module/","title":"Module \u6a21\u5757","text":"

Info

\u6b64\u5bf9\u8c61\u662f Python \u4ee3\u7801\u7684\u4e00\u79cd\u7ec4\u7ec7\u5355\u4f4d\u3002\u5404\u6a21\u5757\u5177\u6709\u72ec\u7acb\u7684\u547d\u540d\u7a7a\u95f4\uff0c\u53ef\u5305\u542b\u4efb\u610f Python \u5bf9\u8c61\u3002\u6a21\u5757\u53ef\u901a\u8fc7 importing \u64cd\u4f5c\u88ab\u52a0\u8f7d\u5230 Python \u4e2d\u3002

\u53e6\u89c1 package\u3002

"},{"location":"RulePackage/getStart/getDeeper/Package/","title":"Package \u5305","text":"

Info

\u4e00\u79cd\u53ef\u5305\u542b\u5b50\u6a21\u5757\u6216\u9012\u5f52\u5730\u5305\u542b\u5b50\u5305\u7684 Python module\u3002 \u4ece\u6280\u672f\u4e0a\u8bf4\uff0c\u5305\u662f\u5177\u6709 path \u5c5e\u6027\u7684 Python \u6a21\u5757\u3002

\u53e6\u53c2\u89c1 regular package \u548c namespace package\u3002

"},{"location":"RulePackage/getStart/getDeeper/object/","title":"object \u5bf9\u8c61","text":"

Info

\u4efb\u4f55\u5177\u6709\u72b6\u6001\uff08\u5c5e\u6027\u6216\u503c\uff09\u4ee5\u53ca\u9884\u5b9a\u4e49\u884c\u4e3a\uff08\u65b9\u6cd5\uff09\u7684\u6570\u636e\u3002object \u4e5f\u662f\u4efb\u4f55 new-style class \u7684\u6700\u9876\u5c42\u57fa\u7c7b\u540d\u3002

"},{"location":"Standard/what-is-rule-package/","title":"\u4ec0\u4e48\u662f\u89c4\u5219\u5305\uff1f","text":"

\u89c4\u5219\u5305\u662f\u6c34\u7cfb\u6838\u5fc3\u7528\u6765\u52a0\u8f7d\u7684\u5bf9\u8c61\uff0c\u53ef\u4ee5\u7406\u89e3\u4e3a\u6c34\u7cfb\u6838\u5fc3\u52a0\u8f7d\u7684\u4e00\u4e2a\u4e00\u4e2a\u89c4\u5219\u5b9e\u4f8b\u3002

\u89c4\u5219\u5305\u66f4\u7c7b\u4f3c\u4e8e\u63d2\u4ef6\u7684\u8bbe\u8ba1\uff0c\u6240\u4ee5\u89c4\u5219\u5305\u4e5f\u53ef\u4ee5\u662f\u4e00\u4e2aPython\u6587\u4ef6\u6216\u8005\u4e00\u4e2aPython\u5305\uff0c\u4f46\u5b83\u5fc5\u987b\u50cf\u63d2\u4ef6\u90a3\u6837\u7ee7\u627f\u4e00\u4e2a\u50cfPlugin\u8fd9\u6837\u7684\u7c7b\uff08\u4e0d\u7136\u65e0\u6cd5\u8bfb\u53d6\uff0c\u6211\u4eec\u59d1\u4e14\u53eb\u8fd9\u4e2a\u7c7b\u4e3aRule\uff09\uff0c\u4ee5\u53ca\u5728Rule\u7684\u5b50\u7c7b\u91cc\u5b9e\u73b0\u4e00\u4e9b\u50cfhandle()\u6216\u8005rule()\u8fd9\u6837\u5fc5\u987b\u5b9e\u73b0\u7684\u65b9\u6cd5\uff08\u4e5f\u53eb\u51fd\u6570\uff09\uff0c\u800c\u8fd9\u4e9b\u5fc5\u987b\u5b9e\u73b0\u7684\u65b9\u6cd5\uff0c\u5c31\u662f\u6211\u4eec\u8981\u8ba8\u8bba\u7684\uff0c\u4e00\u4e2a\u901a\u7528\u89c4\u5219\u5305\u6807\u51c6\u5c31\u662f\u660e\u786e\u4e86\u4e00\u4e2a\u7ee7\u627f\u81eaRule\u7c7b\u7684\u5b50\u7c7b\u5b83\u672c\u8eab\u5e94\u8be5\u5b9e\u73b0\u4ec0\u4e48\u65b9\u6cd5\u3002

\u4e3e\u4e2a\u4f8b\u5b50\uff08\u968f\u4fbf\u5199\u7684\uff0c\u5176\u4e2d\u4e00\u4e9b\u5fc5\u987b\u5b9e\u73b0\u7684\u5c5e\u6027\u6216\u8005\u7c7b\u540d\u90fd\u662f\u4e0d\u786e\u5b9a\u7684\uff0c\u4ee5\u540e\u6216\u8bb8\u4f1a\u6539\uff09\uff1a

from HydroRolicore import RuLe\n\nclass MyRule(Rule):\n    \"\"\"\u6211\u7684\u81ea\u5b9a\u4e49\u89c4\u5219\u5305\n\n    check \u51fd\u6570\u662f\u5fc5\u987b\u5b9e\u73b0\u7684\u65b9\u6cd5\u4e4b\u4e00\n    name\u5c5e\u6027\u662f\u5fc5\u987b\u5b9e\u73b0\u7684\u5c5e\u6027\u4e4b\u4e00\uff0c\u7528\u6765\u5b9a\u4e49\u8fd9\u4e2a\u89c4\u5219\u5305\u7684\u540d\u5b57\n    priority\u662f\u53ef\u9009\u5b9e\u73b0\u7684\u5c5e\u6027\u4e4b\u4e00\uff0c\u9ed8\u8ba40\n    \"\"\"\n\n    name = \"\u6211\u7684\u81ea\u5b9a\u4e49\u89c4\u5219\u5305\"\n    priority = 0 # \u4f18\u5148\u7ea7\n\n    def check(self):\n        \"\"\"\u68c0\u5b9a\u65b9\u6cd5\n\n        self.result \u662f\u9700\u8981\u68c0\u5b9a\u65f6\u8ba1\u7b97\u7684\u7ed3\u679c\uff0c\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528\n        self.rule.ability \u662fRule\u7c7b\u91cc\u63d0\u4f9b\u7684\u7528\u4e8e\u5224\u65ad\u68c0\u5b9a\u60c5\u51b5\u7684\u5c5e\u6027\n        \"\"\"\n\n        if self.result < 5 and self.result > 0:\n            return self.rule.ability.success # \u8fd4\u56de\u5927\u6210\u529f\u65f6\u9ab0\u4e3b\u81ea\u5b9a\u4e49\u7684\u5927\u6210\u529f\u6587\u672c\n        else:\n            ... # \u5176\u4ed6\u7684\u68c0\u5b9a\u60c5\u51b5\n

\u8fd9\u6837\u5c31\u5b9e\u73b0\u4e86\u4e00\u4e2a\u6c34\u7cfb\u89c4\u5219\u5305\uff0c\u5f53pl\u4f7f\u7528\u68c0\u5b9a\u63b7\u9ab0\u6307\u4ee4\u65f6\u5c31\u4f1a\u8c03\u7528check()\u65b9\u6cd5\uff0c\u5982\u679c\u68c0\u5b9a\u7ed3\u679c\u6570\u503c\u5c0f\u4e8e5\u4e14\u5927\u4e8e0\u90a3\u4e48\u8fd4\u56de\u5927\u6210\u529f\u3002

\u6211\u4eec\u8981\u505a\u7684\u901a\u7528\u89c4\u5219\u5305\u6807\u51c6\u5c31\u662f\u8fd9\u6837\u4e00\u4e2a\u201c\u5230\u5e95\u9700\u8981\u5728Rule\u7684\u5b50\u7c7bMyRule\u91cc\u5fc5\u987b\u5b9e\u73b0\u54ea\u4e9b\u65b9\u6cd5\uff1f\u201d\u7684\u95ee\u9898\u3002

"},{"location":"Standard/Term/DefaultDice/","title":"DefaultDice \u9ed8\u8ba4\u9ab0\u5b50","text":"

Tip

\u8fd9\u662f\u4e00\u4e2a\u5fc5\u987b\u7684\u7c7b\uff0c\u6839\u636e\u4e0d\u540c\u89c4\u5219\u4e66\u7684\u8981\u6c42\u8bbe\u7f6e\u76f8\u5bf9\u5e94\u7684\u503c

"},{"location":"Standard/Term/DefaultDice/#_1","title":"\u7c7b\u8bf4\u660e","text":"

\u7528\u4e8e\u89c4\u5b9a\u9ed8\u8ba4\u6295\u63b7\u65f6\u9ab0\u5b50\u7684\u5404\u79cd\u5c5e\u6027\uff0c\u4f8b\u5982\u9ed8\u8ba4\u9ab0\u5b50\u6570\u91cf\uff0c\u9762\u6570

"},{"location":"Standard/Term/DefaultDice/_counts/","title":"_counts \u9ab0\u5b50\u4e2a\u6570","text":"

Tip

\u8fd9\u662f\u4e00\u4e2a\u5fc5\u987b\u7684\u503c\uff0c\u6839\u636e\u4e0d\u540c\u89c4\u5219\u4e66\u7684\u8981\u6c42\u8bbe\u7f6e\u76f8\u5bf9\u5e94\u7684\u503c

"},{"location":"Standard/Term/DefaultDice/_counts/#_1","title":"\u5c5e\u6027\u8bf4\u660e","text":"

\u7528\u4e8e\u89c4\u5b9a\u9ed8\u8ba4\u6295\u63b7\u65f6\u9ab0\u5b50\u7684\u4e2a\u6570

"},{"location":"Standard/Term/DefaultDice/_sides/","title":"_sides \u9ab0\u5b50\u9762\u6570","text":""},{"location":"Standard/Term/DefaultDice/_sides/#_1","title":"\u5c5e\u6027\u8bf4\u660e","text":"

\u7528\u4e8e\u89c4\u5b9a\u9ed8\u8ba4\u6295\u63b7\u65f6\u9ab0\u5b50\u7684\u9762\u6570

"},{"location":"Standard/Term/PlayerCard/","title":"PlayerCard \u4eba\u7269\u5361","text":"

Tip

\u8fd9\u662f\u4e00\u4e2a\u53ef\u9009\u5b9e\u73b0\u4f46\u662f{\u5efa\u8bae\u5c3d\u91cf\u5fc5\u987b\u5b9e\u73b0}\u7684\u65b9\u6cd5\uff0c\u4e3b\u8981\u8868\u73b0\u5728\u89c4\u5219\u4e66\u6b63\u662f\u68c0\u5b9a\u65b9\u6cd5\u4e0d\u540c\u800c\u6709\u6240\u4e0d\u540c\u4e0a\u3002

"},{"location":"Standard/Term/PlayerCard/#_1","title":"\u7c7b\u8bf4\u660e","text":"

\u7528\u4e8e\u89c4\u5b9a\u4eba\u7269\u5361\u7684\u683c\u5f0f\uff0c\u5305\u62ec\u4eba\u7269\u5c5e\u6027\uff0c\u5c5e\u6027\u4e4b\u95f4\u7684\u8ba1\u7b97\u5173\u7cfb\u7b49

"},{"location":"Standard/Term/check/","title":"check \u68c0\u5b9a","text":"

Tip

\u8fd9\u662f\u4e00\u4e2a\u53ef\u9009\u5b9e\u73b0\u4f46\u662f{\u5efa\u8bae\u5c3d\u91cf\u5fc5\u987b\u5b9e\u73b0}\u7684\u65b9\u6cd5\uff0c\u4e3b\u8981\u8868\u73b0\u5728\u89c4\u5219\u4e66\u6b63\u662f\u68c0\u5b9a\u65b9\u6cd5\u4e0d\u540c\u800c\u6709\u6240\u4e0d\u540c\u4e0a\u3002

"},{"location":"Standard/Term/check/#_1","title":"\u65b9\u6cd5\u8bf4\u660e","text":"

\u4f7f\u7528check\u6216\u8005ability\u65b9\u6cd5, \u5fc5\u987b\u5bf9\u68c0\u5b9a\u7ed3\u679c\u8bbe\u5b9a\u4e00\u4e2a\u5b8c\u6574\u7684\u8f93\u51fa\u5224\u5b9a\u8303\u56f4\u3002

"},{"location":"Standard/Term/check/#_2","title":"\u68c0\u5b9a\u7ed3\u679c\u8868","text":"

\u5982\u65b9\u6cd5\u6240\u8a00\uff0c\u4f60\u5fc5\u987b\u4e3a\u68c0\u5b9a\u7684\u7ed3\u679c\u8bbe\u8ba1\u4e00\u4e2a\u5b8c\u6574\u7684\u8f93\u51fa\u5224\u5b9a\u8303\u56f4\uff0c\u56e0\u6b64\u4f60\u9700\u8981\u4e25\u683c\u5e76\u4e14\u5408\u7406\u7684\u5206\u914d\u5212\u5206\u754c\u9650\uff0c\u4fdd\u8bc1\u6240\u6709\u60c5\u51b5\u90fd\u5728\u5141\u8bb8\u8303\u56f4\u5185\u6709\u4e00\u4e2a\u7c7b\u4f3c\u201d\u6210\u529f\u201d\u201d\u5931\u8d25\u201d\u7684\u8f93\u51fa\u3002

"},{"location":"Standard/Term/check/ability/","title":"ability \u68c0\u5b9a","text":"

Info

\u5173\u4e8e\u8fd9\u90e8\u5206\u5185\u5bb9\u8bf7\u79fb\u6b65\u6b63\u5f0f\u672f\u8bed: check \u68c0\u5b9a

\u8fd9\u90e8\u5206\u5176\u5b9e\u5df2\u7ecf\u79fb\u9664\u3002

"},{"location":"Standard/Term/duration/","title":"duration (\u65f6\u957f)","text":""},{"location":"blog/","title":"Blog","text":""},{"location":"blog/2023/10/07/rule/","title":"Rule \u57fa\u7c7b\u5df2\u7ecf\u652f\u6301\u6cdb\u578b\u4e86","text":"

Hey there! You're looking at our new blog, built with the brand new built-in blog plugin. With this plugin, you can easily build a blog alongside your documentation or standalone.

Proper support for blogging, as requested by many users over the past few years, was something that was desperately missing from Material for MkDocs' feature set. While everybody agreed that blogging support was a blind spot, it was not obvious whether MkDocs could be extended in a way to allow for blogging as we know it from Jekyll and friends. The built-in blog plugin proves that it is, after all, possible to build a blogging engine on top of MkDocs, in order to create a technical blog alongside your documentation, or as the main thing.

This article explains how to build a standalone blog with Material for MkDocs. If you want to build a blog alongside your documentation, please refer to the plugin's documentation.

"},{"location":"blog/2023/10/07/rule/#quick-start","title":"Quick start","text":""},{"location":"blog/2023/10/07/rule/#creating-a-standalone-blog","title":"Creating a standalone blog","text":"

You can bootstrap a new project using the mkdocs executable:

mkdocs new .\n

This will create the following structure:

.\n\u251c\u2500 docs/\n\u2502  \u2514\u2500 index.md\n\u2514\u2500 mkdocs.yml\n
"},{"location":"blog/2023/10/07/rule/#configuration","title":"Configuration","text":"

In this article, we're going to build a standalone blog, which means that the blog lives at the root of your project. For this reason, open mkdocs.yml, and replace its contents with:

site_name: My Blog\ntheme:\n  name: material\n  features:\n    - navigation.sections\nplugins:\n  - blog:\n      blog_dir: . # (1)!\n  - search\n  - tags\nnav:\n  - index.md\n
  1. This is the important part \u2013 we're hosting the blog at the root of the project, and not in a subdirectory. For more information, see the blog_dir configuration option.
"},{"location":"blog/2023/10/07/rule/#blog-setup","title":"Blog setup","text":"

The blog index page lives in docs/index.md. This page was pre-filled by MkDocs with some content, so we're going to replace it with what we need to bootstrap the blog:

# Blog\n

That's it.

"},{"location":"blog/2023/10/07/rule/#writing-your-first-post","title":"Writing your first post","text":"

Now that we have set up the built-in blog plugin, we can start writing our first post. All blog posts are written with the exact same Markdown flavor as already included with Material for MkDocs. First, create a folder called posts with a file called hello-world.md:

.\n\u251c\u2500 docs/\n\u2502  \u251c\u2500 posts/\n\u2502  \u2502  \u2514\u2500 hello-world.md # (1)!\n\u2502  \u2514\u2500 index.md\n\u2514\u2500 mkdocs.yml\n
  1. If you'd like to arrange posts differently, you're free to do so. The URLs are built from the format specified in post_url_format and the titles and dates of posts, no matter how they are organized inside the posts directory.

Then, open up hello-world.md, and add the following lines:

---\ndraft: true # (1)!\ndate: 2022-01-31\ncategories:\n  - Hello\n  - World\n---\n\n# Hello world!\n\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque nec\nmaximus ex. Sed consequat, nulla quis malesuada dapibus, elit metus vehicula\nerat, ut egestas tellus eros at risus. In hac habitasse platea dictumst.\nPhasellus id lacus pulvinar erat consequat pretium. Morbi malesuada arcu mauris\nNam vel justo sem. Nam placerat purus non varius luctus. Integer pretium leo in\nsem rhoncus, quis gravida orci mollis. Proin id aliquam est. Vivamus in nunc ac\nmetus tristique pellentesque. Suspendisse viverra urna in accumsan aliquet.\n\n<!-- more -->\n\nDonec volutpat, elit ac volutpat laoreet, turpis dolor semper nibh, et dictum\nmassa ex pulvinar elit. Curabitur commodo sit amet dolor sed mattis. Etiam\ntempor odio eu nisi gravida cursus. Maecenas ante enim, fermentum sit amet\nmolestie nec, mollis ac libero. Vivamus sagittis suscipit eros ut luctus.\n\nNunc vehicula sagittis condimentum. Cras facilisis bibendum lorem et feugiat.\nIn auctor accumsan ligula, at consectetur erat commodo quis. Morbi ac nunc\npharetra, pellentesque risus in, consectetur urna. Nulla id enim facilisis\narcu tincidunt pulvinar. Vestibulum laoreet risus scelerisque porta congue.\nIn velit purus, dictum quis neque nec, molestie viverra risus. Nam pellentesque\ntellus id elit ultricies, vel finibus erat cursus.\n
  1. If you mark a post as a draft, a red marker appears next to the post date on index pages. When the site is built, drafts are not included in the output. This behavior can be changed, e.g. for rendering drafts when building deploy previews.

When you spin up the live preview server, you should be greeted by your first post! You'll also realize, that archive and category indexes have been automatically generated for you:

However, this is just the start. The built-in blog plugin packs a lot of functionality needed in day-to-day blogging. Visit the documentation of the plugin to learn about the following topics:

Additionally, the built-in blog plugin has dozens of configuration options which allow for fine-tuning the output. You can configure post slugs, general behavior and much more.

"},{"location":"blog/2023/10/07/rule/#whats-next","title":"What's next?","text":"

Getting basic blogging support out the door was quite a challenge \u2013 the built-in blog plugin is probably the biggest release this year and already packs a lot of functionality. However, Material for MkDocs is used in many different contexts, which is why we'd expect to iterate, as always.

Some ideas already proposed by users:

What's still missing from the brand new built-in blog plugin? Feel free to share your ideas in the comments. Together, we can build one of the best modern engines for technical blogging!

"},{"location":"blog/archive/2023/","title":"2023","text":""},{"location":"blog/category/rules/","title":"Rules","text":""}]} \ No newline at end of file +{"config":{"lang":["en"],"separator":"[\\s\\u200b\\-_,:!=\\[\\]()\"`/]+|\\.(?!\\d)|&[lg]t;|(?!\\b)(?=[A-Z][a-z])","pipeline":["stemmer"]},"docs":[{"location":"","title":"\u6c34\u7cfb\u6838\u5fc3","text":"

\u4f60\u597d!\u4e16\u754c\u4e3b\u3002

"},{"location":"changelog/","title":"Changelog","text":""},{"location":"changelog/#102-2023-10-07","title":"1.0.2 (2023-10-07)","text":""},{"location":"changelog/#features","title":"FEATURES","text":""},{"location":"changelog/#101-2023-10-07","title":"1.0.1 (2023-10-07)","text":""},{"location":"changelog/#bug-fix","title":"BUG FIX","text":""},{"location":"changelog/#012-2023-10-07","title":"0.1.2 (2023-10-07)","text":"

\u540c\u6b65\u7248\u672c\u6240\u505a\u7684\u6d4b\u8bd5\u3002

"},{"location":"changelog/#011-2023-10-07","title":"0.1.1 (2023-10-07)","text":""},{"location":"changelog/#bug-fix_1","title":"BUG FIX","text":""},{"location":"changelog/#010-rc1-2023-10-07","title":"0.1.0-rc1 (2023-10-07)","text":""},{"location":"changelog/#chore","title":"CHORE","text":""},{"location":"changelog/#010-2023-10-07","title":"0.1.0 (2023-10-07)","text":""},{"location":"changelog/#features_1","title":"Features","text":""},{"location":"changelog/#001-2023-07-04","title":"0.0.1 (2023-07-04)","text":""},{"location":"changelog/#features_2","title":"Features","text":""},{"location":"changelog/#breaking-change","title":"BREAKING CHANGE","text":""},{"location":"CLI/","title":"CLI Reference","text":"

```python exec=\"1\" idprefix=\"\" import argparse import re from HydroRollCore import Cli

parser = Cli().parser

MONOSPACED = (\"pyproject.toml\", \"pdm.lock\", \".pdm-python\", \":pre\", \":post\", \":all\")

def clean_help(help: str) -> str: # Make dunders monospaced avoiding italic markdown rendering help = re.sub(r\"([\\w\\d_]+)\", r\"__\\1__\", help) # Make env vars monospaced help = re.sub(r\"env var: ([A-Z_]+)\", r\"env var: \\1\", help) for monospaced in MONOSPACED: help = re.sub(rf\"\\s(['\\\"]?{monospaced}['\\\"]?)\", f\"{monospaced}\", help) return help

def render_parser( parser: argparse.ArgumentParser, title: str, heading_level: int = 2 ) -> str: \"\"\"Render the parser help documents as a string.\"\"\" result = [f\"{'#' * heading_level} {title}\\n\"] if parser.description and title != \"HydroRollCore\": result.append(\"> \" + parser.description + \"\\n\")

for group in sorted(\n    parser._action_groups, key=lambda g: g.title.lower(), reverse=True\n):\n    if not any(\n        bool(action.option_strings or action.dest)\n        or isinstance(action, argparse._SubParsersAction)\n        for action in group._group_actions\n    ):\n        continue\n\n    result.append(f\"{group.title.title()}:\\n\")\n    for action in group._group_actions:\n        if isinstance(action, argparse._SubParsersAction):\n            for name, subparser in action._name_parser_map.items():\n                result.append(render_parser(subparser, name, heading_level + 1))\n            continue\n\n        opts = [f\"`{opt}`\" for opt in action.option_strings]\n        if not opts:\n            line = f\"- `{action.dest}`\"\n        else:\n            line = f\"- {', '.join(opts)}\"\n        if action.metavar:\n            line += f\" `{action.metavar}`\"\n        line += f\": {clean_help(action.help)}\"\n        if action.default and action.default != argparse.SUPPRESS:\n            line += f\" (default: `{action.default}`)\"\n        result.append(line)\n    result.append(\"\")\n\nreturn \"\\n\".join(result)\n

print(render_parser(parser, \"HydroRollCore\")) ```

"},{"location":"Core/","title":"\u6838\u5fc3\u6982\u89c8","text":"HydroRollCore'\u6c34\u7cfb\u6838\u5fc3"},{"location":"Core/#getting","title":"\ud83c\udf81 Getting","text":"
  1. \u5b89\u88c5\u5e93

\u5728\u547d\u4ee4\u884c\u8f93\u5165\u3002

git clone https://github.com/HydroRoll-Team/HydroRollCore.git\ncd HydroRollCore\npdm install\n# \u6216\u8005\u4f7f\u7528pip\n# pip install HydroRollCore\n
  1. \u521b\u5efa\u89c4\u5219\u5305\u5b9e\u4f8b
mkdir myrules && cd myrules && mkdir rule1\necho.> config.toml\necho.> __init__.py\n

\u5728 __init__.py \u521b\u5efa\u4e00\u4e2a rule \u5b9e\u4f8b\u5e76\u7ee7\u627f Rule \u57fa\u7c7b, \u901a\u8fc7\u7f16\u5199\u5408\u9002\u7684\u76f8\u5173\u65b9\u6cd5\u4e0e\u7c7b\u6ce8\u518c\u89c4\u5219\u5305\u5b9e\u73b0\u89c4\u5219\u7684\u81ea\u5b9a\u4e49\u3002

from HydroRollCore import Rule\n\nclass Myrule(Rule):\n  \"\"\"\u81ea\u8bbe\u89c4\u5219\u5305\uff0c\u7ee7\u627f Rule \u57fa\u7c7b\"\"\"\n
  1. \u5408\u7406\u4fee\u6539\u4f60\u7684 config.toml \u914d\u7f6e\u6587\u4ef6\uff0c\u5b8c\u6210\u6ce8\u518c!
"},{"location":"Core/#license","title":"\ud83d\udcc4 License","text":"

MIT \u00a9 2023-PRESENT \u7b80\u5f8b\u7eaf

"},{"location":"RulePackage/intro/","title":"\u89c4\u5219\u5305\u7b80\u4ecb","text":"

Warning

\u6b64\u7ae0\u8282\u6d89\u53ca\u5230\u771f\u6b63\u7684 Python \u89c4\u8303\u95ee\u9898\uff0c\u56e0\u6b64\u8bf7\u8ba4\u771f\u9605\u8bfb\u5e76\u591a\u52a0\u7ec3\u4e60\uff0c\u65b9\u80fd\u5199\u51fa\u6f02\u4eae\u7684\u4ee3\u7801\u3002

"},{"location":"RulePackage/getStart/attribute/","title":"attribute \u5c5e\u6027","text":"

Info

\u5173\u8054\u5230\u4e00\u4e2a\u5bf9\u8c61\u7684\u503c\uff0c\u901a\u5e38\u4f7f\u7528\u70b9\u53f7\u8868\u8fbe\u5f0f\u6309\u540d\u79f0\u6765\u5f15\u7528\u3002 \u4e3e\u4f8b\u6765\u8bf4\uff0c\u5982\u679c\u5bf9\u8c61 o \u5177\u6709\u5c5e\u6027 a \u5219\u53ef\u4ee5\u7528 o.a \u6765\u5f15\u7528\u5b83\u3002

\u5982\u679c\u5bf9\u8c61\u5141\u8bb8\uff0c\u5c06\u672a\u88ab\u5b9a\u4e49\u4e3a \u6807\u8bc6\u7b26\u548c\u5173\u952e\u5b57 \u7684\u975e\u6807\u8bc6\u540d\u79f0\u7528\u4f5c\u4e00\u4e2a\u5bf9\u8c61\u7684\u5c5e\u6027\u4e5f\u662f\u53ef\u4ee5\u7684\uff0c\u4f8b\u5982\u4f7f\u7528 setattr()\u3002 \u8fd9\u6837\u7684\u5c5e\u6027\u5c06\u65e0\u6cd5\u4f7f\u7528\u70b9\u53f7\u8868\u8fbe\u5f0f\u6765\u8bbf\u95ee\uff0c\u800c\u662f\u5fc5\u987b\u901a\u8fc7 getattr() \u6765\u83b7\u53d6\u3002

"},{"location":"RulePackage/getStart/class/","title":"class \u7c7b","text":"

Info

\u7528\u6765\u521b\u5efa\u7528\u6237\u5b9a\u4e49\u5bf9\u8c61\u7684\u6a21\u677f\u3002\u7c7b\u5b9a\u4e49\u901a\u5e38\u5305\u542b\u5bf9\u8be5\u7c7b\u7684\u5b9e\u4f8b\u8fdb\u884c\u64cd\u4f5c\u7684\u65b9\u6cd5\u5b9a\u4e49\u3002

"},{"location":"RulePackage/getStart/method/","title":"method \u65b9\u6cd5","text":"

Info

\u5728\u7c7b\u5185\u90e8\u5b9a\u4e49\u7684\u51fd\u6570\u3002\u5982\u679c\u4f5c\u4e3a\u8be5\u7c7b\u7684\u5b9e\u4f8b\u7684\u4e00\u4e2a\u5c5e\u6027\u6765\u8c03\u7528\uff0c\u65b9\u6cd5\u5c06\u4f1a\u83b7\u53d6\u5b9e\u4f8b\u5bf9\u8c61\u4f5c\u4e3a\u5176\u7b2c\u4e00\u4e2a argument (\u901a\u5e38\u547d\u540d\u4e3a self)\u3002\u53c2\u89c1 function \u548c nested scope\u3002

"},{"location":"RulePackage/getStart/getDeeper/Module/","title":"Module \u6a21\u5757","text":"

Info

\u6b64\u5bf9\u8c61\u662f Python \u4ee3\u7801\u7684\u4e00\u79cd\u7ec4\u7ec7\u5355\u4f4d\u3002\u5404\u6a21\u5757\u5177\u6709\u72ec\u7acb\u7684\u547d\u540d\u7a7a\u95f4\uff0c\u53ef\u5305\u542b\u4efb\u610f Python \u5bf9\u8c61\u3002\u6a21\u5757\u53ef\u901a\u8fc7 importing \u64cd\u4f5c\u88ab\u52a0\u8f7d\u5230 Python \u4e2d\u3002

\u53e6\u89c1 package\u3002

"},{"location":"RulePackage/getStart/getDeeper/Package/","title":"Package \u5305","text":"

Info

\u4e00\u79cd\u53ef\u5305\u542b\u5b50\u6a21\u5757\u6216\u9012\u5f52\u5730\u5305\u542b\u5b50\u5305\u7684 Python module\u3002 \u4ece\u6280\u672f\u4e0a\u8bf4\uff0c\u5305\u662f\u5177\u6709 path \u5c5e\u6027\u7684 Python \u6a21\u5757\u3002

\u53e6\u53c2\u89c1 regular package \u548c namespace package\u3002

"},{"location":"RulePackage/getStart/getDeeper/object/","title":"object \u5bf9\u8c61","text":"

Info

\u4efb\u4f55\u5177\u6709\u72b6\u6001\uff08\u5c5e\u6027\u6216\u503c\uff09\u4ee5\u53ca\u9884\u5b9a\u4e49\u884c\u4e3a\uff08\u65b9\u6cd5\uff09\u7684\u6570\u636e\u3002object \u4e5f\u662f\u4efb\u4f55 new-style class \u7684\u6700\u9876\u5c42\u57fa\u7c7b\u540d\u3002

"},{"location":"Standard/what-is-rule-package/","title":"\u4ec0\u4e48\u662f\u89c4\u5219\u5305\uff1f","text":"

\u89c4\u5219\u5305\u662f\u6c34\u7cfb\u6838\u5fc3\u7528\u6765\u52a0\u8f7d\u7684\u5bf9\u8c61\uff0c\u53ef\u4ee5\u7406\u89e3\u4e3a\u6c34\u7cfb\u6838\u5fc3\u52a0\u8f7d\u7684\u4e00\u4e2a\u4e00\u4e2a\u89c4\u5219\u5b9e\u4f8b\u3002

\u89c4\u5219\u5305\u66f4\u7c7b\u4f3c\u4e8e\u63d2\u4ef6\u7684\u8bbe\u8ba1\uff0c\u6240\u4ee5\u89c4\u5219\u5305\u4e5f\u53ef\u4ee5\u662f\u4e00\u4e2aPython\u6587\u4ef6\u6216\u8005\u4e00\u4e2aPython\u5305\uff0c\u4f46\u5b83\u5fc5\u987b\u50cf\u63d2\u4ef6\u90a3\u6837\u7ee7\u627f\u4e00\u4e2a\u50cfPlugin\u8fd9\u6837\u7684\u7c7b\uff08\u4e0d\u7136\u65e0\u6cd5\u8bfb\u53d6\uff0c\u6211\u4eec\u59d1\u4e14\u53eb\u8fd9\u4e2a\u7c7b\u4e3aRule\uff09\uff0c\u4ee5\u53ca\u5728Rule\u7684\u5b50\u7c7b\u91cc\u5b9e\u73b0\u4e00\u4e9b\u50cfhandle()\u6216\u8005rule()\u8fd9\u6837\u5fc5\u987b\u5b9e\u73b0\u7684\u65b9\u6cd5\uff08\u4e5f\u53eb\u51fd\u6570\uff09\uff0c\u800c\u8fd9\u4e9b\u5fc5\u987b\u5b9e\u73b0\u7684\u65b9\u6cd5\uff0c\u5c31\u662f\u6211\u4eec\u8981\u8ba8\u8bba\u7684\uff0c\u4e00\u4e2a\u901a\u7528\u89c4\u5219\u5305\u6807\u51c6\u5c31\u662f\u660e\u786e\u4e86\u4e00\u4e2a\u7ee7\u627f\u81eaRule\u7c7b\u7684\u5b50\u7c7b\u5b83\u672c\u8eab\u5e94\u8be5\u5b9e\u73b0\u4ec0\u4e48\u65b9\u6cd5\u3002

\u4e3e\u4e2a\u4f8b\u5b50\uff08\u968f\u4fbf\u5199\u7684\uff0c\u5176\u4e2d\u4e00\u4e9b\u5fc5\u987b\u5b9e\u73b0\u7684\u5c5e\u6027\u6216\u8005\u7c7b\u540d\u90fd\u662f\u4e0d\u786e\u5b9a\u7684\uff0c\u4ee5\u540e\u6216\u8bb8\u4f1a\u6539\uff09\uff1a

from HydroRolicore import RuLe\n\nclass MyRule(Rule):\n    \"\"\"\u6211\u7684\u81ea\u5b9a\u4e49\u89c4\u5219\u5305\n\n    check \u51fd\u6570\u662f\u5fc5\u987b\u5b9e\u73b0\u7684\u65b9\u6cd5\u4e4b\u4e00\n    name\u5c5e\u6027\u662f\u5fc5\u987b\u5b9e\u73b0\u7684\u5c5e\u6027\u4e4b\u4e00\uff0c\u7528\u6765\u5b9a\u4e49\u8fd9\u4e2a\u89c4\u5219\u5305\u7684\u540d\u5b57\n    priority\u662f\u53ef\u9009\u5b9e\u73b0\u7684\u5c5e\u6027\u4e4b\u4e00\uff0c\u9ed8\u8ba40\n    \"\"\"\n\n    name = \"\u6211\u7684\u81ea\u5b9a\u4e49\u89c4\u5219\u5305\"\n    priority = 0 # \u4f18\u5148\u7ea7\n\n    def check(self):\n        \"\"\"\u68c0\u5b9a\u65b9\u6cd5\n\n        self.result \u662f\u9700\u8981\u68c0\u5b9a\u65f6\u8ba1\u7b97\u7684\u7ed3\u679c\uff0c\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528\n        self.rule.ability \u662fRule\u7c7b\u91cc\u63d0\u4f9b\u7684\u7528\u4e8e\u5224\u65ad\u68c0\u5b9a\u60c5\u51b5\u7684\u5c5e\u6027\n        \"\"\"\n\n        if self.result < 5 and self.result > 0:\n            return self.rule.ability.success # \u8fd4\u56de\u5927\u6210\u529f\u65f6\u9ab0\u4e3b\u81ea\u5b9a\u4e49\u7684\u5927\u6210\u529f\u6587\u672c\n        else:\n            ... # \u5176\u4ed6\u7684\u68c0\u5b9a\u60c5\u51b5\n

\u8fd9\u6837\u5c31\u5b9e\u73b0\u4e86\u4e00\u4e2a\u6c34\u7cfb\u89c4\u5219\u5305\uff0c\u5f53pl\u4f7f\u7528\u68c0\u5b9a\u63b7\u9ab0\u6307\u4ee4\u65f6\u5c31\u4f1a\u8c03\u7528check()\u65b9\u6cd5\uff0c\u5982\u679c\u68c0\u5b9a\u7ed3\u679c\u6570\u503c\u5c0f\u4e8e5\u4e14\u5927\u4e8e0\u90a3\u4e48\u8fd4\u56de\u5927\u6210\u529f\u3002

\u6211\u4eec\u8981\u505a\u7684\u901a\u7528\u89c4\u5219\u5305\u6807\u51c6\u5c31\u662f\u8fd9\u6837\u4e00\u4e2a\u201c\u5230\u5e95\u9700\u8981\u5728Rule\u7684\u5b50\u7c7bMyRule\u91cc\u5fc5\u987b\u5b9e\u73b0\u54ea\u4e9b\u65b9\u6cd5\uff1f\u201d\u7684\u95ee\u9898\u3002

"},{"location":"Standard/Term/DefaultDice/","title":"DefaultDice \u9ed8\u8ba4\u9ab0\u5b50","text":"

Tip

\u8fd9\u662f\u4e00\u4e2a\u5fc5\u987b\u7684\u7c7b\uff0c\u6839\u636e\u4e0d\u540c\u89c4\u5219\u4e66\u7684\u8981\u6c42\u8bbe\u7f6e\u76f8\u5bf9\u5e94\u7684\u503c

"},{"location":"Standard/Term/DefaultDice/#_1","title":"\u7c7b\u8bf4\u660e","text":"

\u7528\u4e8e\u89c4\u5b9a\u9ed8\u8ba4\u6295\u63b7\u65f6\u9ab0\u5b50\u7684\u5404\u79cd\u5c5e\u6027\uff0c\u4f8b\u5982\u9ed8\u8ba4\u9ab0\u5b50\u6570\u91cf\uff0c\u9762\u6570

"},{"location":"Standard/Term/DefaultDice/_counts/","title":"_counts \u9ab0\u5b50\u4e2a\u6570","text":"

Tip

\u8fd9\u662f\u4e00\u4e2a\u5fc5\u987b\u7684\u503c\uff0c\u6839\u636e\u4e0d\u540c\u89c4\u5219\u4e66\u7684\u8981\u6c42\u8bbe\u7f6e\u76f8\u5bf9\u5e94\u7684\u503c

"},{"location":"Standard/Term/DefaultDice/_counts/#_1","title":"\u5c5e\u6027\u8bf4\u660e","text":"

\u7528\u4e8e\u89c4\u5b9a\u9ed8\u8ba4\u6295\u63b7\u65f6\u9ab0\u5b50\u7684\u4e2a\u6570

"},{"location":"Standard/Term/DefaultDice/_sides/","title":"_sides \u9ab0\u5b50\u9762\u6570","text":""},{"location":"Standard/Term/DefaultDice/_sides/#_1","title":"\u5c5e\u6027\u8bf4\u660e","text":"

\u7528\u4e8e\u89c4\u5b9a\u9ed8\u8ba4\u6295\u63b7\u65f6\u9ab0\u5b50\u7684\u9762\u6570

"},{"location":"Standard/Term/PlayerCard/","title":"PlayerCard \u4eba\u7269\u5361","text":"

Tip

\u8fd9\u662f\u4e00\u4e2a\u53ef\u9009\u5b9e\u73b0\u4f46\u662f{\u5efa\u8bae\u5c3d\u91cf\u5fc5\u987b\u5b9e\u73b0}\u7684\u65b9\u6cd5\uff0c\u4e3b\u8981\u8868\u73b0\u5728\u89c4\u5219\u4e66\u6b63\u662f\u68c0\u5b9a\u65b9\u6cd5\u4e0d\u540c\u800c\u6709\u6240\u4e0d\u540c\u4e0a\u3002

"},{"location":"Standard/Term/PlayerCard/#_1","title":"\u7c7b\u8bf4\u660e","text":"

\u7528\u4e8e\u89c4\u5b9a\u4eba\u7269\u5361\u7684\u683c\u5f0f\uff0c\u5305\u62ec\u4eba\u7269\u5c5e\u6027\uff0c\u5c5e\u6027\u4e4b\u95f4\u7684\u8ba1\u7b97\u5173\u7cfb\u7b49

"},{"location":"Standard/Term/check/","title":"check \u68c0\u5b9a","text":"

Tip

\u8fd9\u662f\u4e00\u4e2a\u53ef\u9009\u5b9e\u73b0\u4f46\u662f{\u5efa\u8bae\u5c3d\u91cf\u5fc5\u987b\u5b9e\u73b0}\u7684\u65b9\u6cd5\uff0c\u4e3b\u8981\u8868\u73b0\u5728\u89c4\u5219\u4e66\u6b63\u662f\u68c0\u5b9a\u65b9\u6cd5\u4e0d\u540c\u800c\u6709\u6240\u4e0d\u540c\u4e0a\u3002

"},{"location":"Standard/Term/check/#_1","title":"\u65b9\u6cd5\u8bf4\u660e","text":"

\u4f7f\u7528check\u6216\u8005ability\u65b9\u6cd5, \u5fc5\u987b\u5bf9\u68c0\u5b9a\u7ed3\u679c\u8bbe\u5b9a\u4e00\u4e2a\u5b8c\u6574\u7684\u8f93\u51fa\u5224\u5b9a\u8303\u56f4\u3002

"},{"location":"Standard/Term/check/#_2","title":"\u68c0\u5b9a\u7ed3\u679c\u8868","text":"

\u5982\u65b9\u6cd5\u6240\u8a00\uff0c\u4f60\u5fc5\u987b\u4e3a\u68c0\u5b9a\u7684\u7ed3\u679c\u8bbe\u8ba1\u4e00\u4e2a\u5b8c\u6574\u7684\u8f93\u51fa\u5224\u5b9a\u8303\u56f4\uff0c\u56e0\u6b64\u4f60\u9700\u8981\u4e25\u683c\u5e76\u4e14\u5408\u7406\u7684\u5206\u914d\u5212\u5206\u754c\u9650\uff0c\u4fdd\u8bc1\u6240\u6709\u60c5\u51b5\u90fd\u5728\u5141\u8bb8\u8303\u56f4\u5185\u6709\u4e00\u4e2a\u7c7b\u4f3c\u201d\u6210\u529f\u201d\u201d\u5931\u8d25\u201d\u7684\u8f93\u51fa\u3002

"},{"location":"Standard/Term/check/ability/","title":"ability \u68c0\u5b9a","text":"

Info

\u5173\u4e8e\u8fd9\u90e8\u5206\u5185\u5bb9\u8bf7\u79fb\u6b65\u6b63\u5f0f\u672f\u8bed: check \u68c0\u5b9a

\u8fd9\u90e8\u5206\u5176\u5b9e\u5df2\u7ecf\u79fb\u9664\u3002

"},{"location":"Standard/Term/duration/","title":"duration (\u65f6\u957f)","text":""},{"location":"blog/","title":"Blog","text":""},{"location":"blog/2023/10/07/rule/","title":"Rule \u57fa\u7c7b\u5df2\u7ecf\u652f\u6301\u6cdb\u578b\u4e86","text":"

Hey there! You're looking at our new blog, built with the brand new built-in blog plugin. With this plugin, you can easily build a blog alongside your documentation or standalone.

Proper support for blogging, as requested by many users over the past few years, was something that was desperately missing from Material for MkDocs' feature set. While everybody agreed that blogging support was a blind spot, it was not obvious whether MkDocs could be extended in a way to allow for blogging as we know it from Jekyll and friends. The built-in blog plugin proves that it is, after all, possible to build a blogging engine on top of MkDocs, in order to create a technical blog alongside your documentation, or as the main thing.

This article explains how to build a standalone blog with Material for MkDocs. If you want to build a blog alongside your documentation, please refer to the plugin's documentation.

"},{"location":"blog/2023/10/07/rule/#quick-start","title":"Quick start","text":""},{"location":"blog/2023/10/07/rule/#creating-a-standalone-blog","title":"Creating a standalone blog","text":"

You can bootstrap a new project using the mkdocs executable:

mkdocs new .\n

This will create the following structure:

.\n\u251c\u2500 docs/\n\u2502  \u2514\u2500 index.md\n\u2514\u2500 mkdocs.yml\n
"},{"location":"blog/2023/10/07/rule/#configuration","title":"Configuration","text":"

In this article, we're going to build a standalone blog, which means that the blog lives at the root of your project. For this reason, open mkdocs.yml, and replace its contents with:

site_name: My Blog\ntheme:\n  name: material\n  features:\n    - navigation.sections\nplugins:\n  - blog:\n      blog_dir: . # (1)!\n  - search\n  - tags\nnav:\n  - index.md\n
  1. This is the important part \u2013 we're hosting the blog at the root of the project, and not in a subdirectory. For more information, see the blog_dir configuration option.
"},{"location":"blog/2023/10/07/rule/#blog-setup","title":"Blog setup","text":"

The blog index page lives in docs/index.md. This page was pre-filled by MkDocs with some content, so we're going to replace it with what we need to bootstrap the blog:

# Blog\n

That's it.

"},{"location":"blog/2023/10/07/rule/#writing-your-first-post","title":"Writing your first post","text":"

Now that we have set up the built-in blog plugin, we can start writing our first post. All blog posts are written with the exact same Markdown flavor as already included with Material for MkDocs. First, create a folder called posts with a file called hello-world.md:

.\n\u251c\u2500 docs/\n\u2502  \u251c\u2500 posts/\n\u2502  \u2502  \u2514\u2500 hello-world.md # (1)!\n\u2502  \u2514\u2500 index.md\n\u2514\u2500 mkdocs.yml\n
  1. If you'd like to arrange posts differently, you're free to do so. The URLs are built from the format specified in post_url_format and the titles and dates of posts, no matter how they are organized inside the posts directory.

Then, open up hello-world.md, and add the following lines:

---\ndraft: true # (1)!\ndate: 2022-01-31\ncategories:\n  - Hello\n  - World\n---\n\n# Hello world!\n\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque nec\nmaximus ex. Sed consequat, nulla quis malesuada dapibus, elit metus vehicula\nerat, ut egestas tellus eros at risus. In hac habitasse platea dictumst.\nPhasellus id lacus pulvinar erat consequat pretium. Morbi malesuada arcu mauris\nNam vel justo sem. Nam placerat purus non varius luctus. Integer pretium leo in\nsem rhoncus, quis gravida orci mollis. Proin id aliquam est. Vivamus in nunc ac\nmetus tristique pellentesque. Suspendisse viverra urna in accumsan aliquet.\n\n<!-- more -->\n\nDonec volutpat, elit ac volutpat laoreet, turpis dolor semper nibh, et dictum\nmassa ex pulvinar elit. Curabitur commodo sit amet dolor sed mattis. Etiam\ntempor odio eu nisi gravida cursus. Maecenas ante enim, fermentum sit amet\nmolestie nec, mollis ac libero. Vivamus sagittis suscipit eros ut luctus.\n\nNunc vehicula sagittis condimentum. Cras facilisis bibendum lorem et feugiat.\nIn auctor accumsan ligula, at consectetur erat commodo quis. Morbi ac nunc\npharetra, pellentesque risus in, consectetur urna. Nulla id enim facilisis\narcu tincidunt pulvinar. Vestibulum laoreet risus scelerisque porta congue.\nIn velit purus, dictum quis neque nec, molestie viverra risus. Nam pellentesque\ntellus id elit ultricies, vel finibus erat cursus.\n
  1. If you mark a post as a draft, a red marker appears next to the post date on index pages. When the site is built, drafts are not included in the output. This behavior can be changed, e.g. for rendering drafts when building deploy previews.

When you spin up the live preview server, you should be greeted by your first post! You'll also realize, that archive and category indexes have been automatically generated for you:

However, this is just the start. The built-in blog plugin packs a lot of functionality needed in day-to-day blogging. Visit the documentation of the plugin to learn about the following topics:

Additionally, the built-in blog plugin has dozens of configuration options which allow for fine-tuning the output. You can configure post slugs, general behavior and much more.

"},{"location":"blog/2023/10/07/rule/#whats-next","title":"What's next?","text":"

Getting basic blogging support out the door was quite a challenge \u2013 the built-in blog plugin is probably the biggest release this year and already packs a lot of functionality. However, Material for MkDocs is used in many different contexts, which is why we'd expect to iterate, as always.

Some ideas already proposed by users:

What's still missing from the brand new built-in blog plugin? Feel free to share your ideas in the comments. Together, we can build one of the best modern engines for technical blogging!

"},{"location":"blog/archive/2023/","title":"2023","text":""},{"location":"blog/category/rules/","title":"Rules","text":""}]} \ No newline at end of file diff --git a/latest/sitemap.xml.gz b/latest/sitemap.xml.gz index 2b2e4b2b..e0323911 100644 Binary files a/latest/sitemap.xml.gz and b/latest/sitemap.xml.gz differ diff --git a/latest/stylesheets/extra.css b/latest/stylesheets/extra.css index 2ddd1bc4..0d329d97 100644 --- a/latest/stylesheets/extra.css +++ b/latest/stylesheets/extra.css @@ -13,6 +13,18 @@ } } +.md-header { + background-color: #30323a; + box-shadow: 0 0 0.2rem #0000, 0 0.2rem 0.4rem #0000; + color: var(--md-primary-bg-color); + display: block; + left: 0; + position: sticky; + right: 0; + top: 0; + z-index: 4; +} + .md-typeset .twitter { color: #00acee } @@ -304,6 +316,11 @@ max-height: none } +.md-banner--warning { + background-color: #fa7575; + color: var(--md-warning-fg-color); +} + .mdx-container { background: url("data:image/svg+xml;utf8,") no-repeat bottom, linear-gradient(to bottom, var(--md-primary-fg-color), #a63fd9 99%, var(--md-default-bg-color) 99%); padding-top: 1rem -- cgit v1.2.3-70-g09d2