diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/Makefile | 26 | ||||
| -rw-r--r-- | docs/_static/logo.png | bin | 0 -> 235361 bytes | |||
| -rw-r--r-- | docs/_static/workspace.png | bin | 0 -> 1720722 bytes | |||
| -rw-r--r-- | docs/requirements.txt | 8 | ||||
| -rw-r--r-- | docs/source/CONTRIBUTING.md | 2 | ||||
| -rw-r--r-- | docs/source/changelog.md | 13 | ||||
| -rw-r--r-- | docs/source/conf.py | 98 | ||||
| -rw-r--r-- | docs/source/index.md | 46 | ||||
| -rw-r--r-- | docs/source/license.md | 21 |
9 files changed, 214 insertions, 0 deletions
diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000..c7af502 --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,26 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = ./source +BUILDDIR = _build +SPHINXINTL ?= sphinx-intl +lang ?= zh_CN + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +# update translation command +translate: + @$(SPHINXINTL) update -p ./build/gettext -l $(lang) $(O)
\ No newline at end of file diff --git a/docs/_static/logo.png b/docs/_static/logo.png Binary files differnew file mode 100644 index 0000000..8b5a14c --- /dev/null +++ b/docs/_static/logo.png diff --git a/docs/_static/workspace.png b/docs/_static/workspace.png Binary files differnew file mode 100644 index 0000000..204dac8 --- /dev/null +++ b/docs/_static/workspace.png diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 0000000..d276c4d --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,8 @@ +furo>=2023.3.27 +sphinx-autobuild>=2021.3.14 +myst-parser>=0.18.1 +sphinx>=5.3.0 +infini +tomli +sphinx_design +sphinx-intl>=2.1.0
\ No newline at end of file diff --git a/docs/source/CONTRIBUTING.md b/docs/source/CONTRIBUTING.md new file mode 100644 index 0000000..e75758c --- /dev/null +++ b/docs/source/CONTRIBUTING.md @@ -0,0 +1,2 @@ +```{include} ../../CONTRIBUTING.md +```
\ No newline at end of file diff --git a/docs/source/changelog.md b/docs/source/changelog.md new file mode 100644 index 0000000..769b66e --- /dev/null +++ b/docs/source/changelog.md @@ -0,0 +1,13 @@ +<!-- + +Version codenames style: + +date "+## %Y.%m.%d -- {adjective} {colorname}" | pbcopy + +https://patternbasedwriting.com/elementary_writing_success/list-4800-adjectives/ +https://en.wikipedia.org/wiki/Lists_of_colors + +--> + +```{include} ../../CHANGELOG.md +```
\ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py new file mode 100644 index 0000000..14d3ed9 --- /dev/null +++ b/docs/source/conf.py @@ -0,0 +1,98 @@ +# Configuration file for the Sphinx documentation builder. +# +# For the full list of built-in configuration values, see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +import GRPS +import os, sys + +if sys.version_info >= (3, 11): + import tomllib +else: + import tomli as tomllib + +DATA = None +PYPROJECT = os.path.join("..", "..", "pyproject.toml") +with open(PYPROJECT, "r", encoding="utf8") as f: + pyproject = f.read() + DATA = tomllib.loads(pyproject) +PROJECT_VERSION = DATA["project"]["version"] +PROJECT_NAME = DATA["project"]["name"] +AUTHOR_TABLE = DATA["project"]["authors"] +AUTHORS = ",".join([f"{aut['name']}" for aut in AUTHOR_TABLE]) + +# -- Project information ----------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information + +project = PROJECT_NAME +release = PROJECT_VERSION +copyright = ( + "2023-PRESENT, HydroRoll-Team." +) +author = AUTHORS + +html_title = "GRPS" + +# -- General configuration --------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration + +extensions = [ + "sphinx.ext.autodoc", + "sphinx.ext.viewcode", + "sphinx.ext.todo", + "sphinx.ext.napoleon", + "sphinx.ext.autosummary", + "sphinx.ext.extlinks", + "myst_parser", +] + +templates_path = ["_templates"] +exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] +extlinks = { + "issue": ("https://github.com/HydroRoll-Team/infini/%s", "issue %s"), + "doc": ("https://infini.hydroroll.team/zh-cn/latest/%s", "pages/%s"), +} +source_suffix = { + ".rst": "restructuredtext", + ".txt": "markdown", + ".md": "markdown", +} + +# locale_dirs = ["../locales/"] # path is example but recommended. +gettext_compact = False # optional. +gettext_uuid = True # optional. + +# -- Options for HTML output ------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output + +html_theme = "furo" +html_static_path = ["../_static"] +_html_logo = ( + "https://files.hydroroll.team/hotlink-ok/files/image/logo.png" +) +html_favicon = _html_logo + +html_css_files = [ + "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/fontawesome.min.css", + "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/brands.min.css", +] + +html_theme_options = { + "source_repository": "https://github.com/HydroRoll-Team/GRPS/", + "source_branch": "master", + "source_directory": "docs/source/", + "footer_icons": [ + { + "name": "GitHub", + "url": "https://github.com/HydroRoll-Team/GRPS/", + "html": "", + "class": "fa-brands fa-github", + }, + { + "name": "Pypi", + "url": "https://pypi.org/project/GRPS/", + "html": "", + "class": "fa-brands fa-python", + }, + ], +} diff --git a/docs/source/index.md b/docs/source/index.md new file mode 100644 index 0000000..5c32c61 --- /dev/null +++ b/docs/source/index.md @@ -0,0 +1,46 @@ +--- +hide-toc: true +--- + +# GRPS + +```{include} ../../README.md +:start-after: <!-- start index --> +:end-before: <!-- end index --> +``` + +```{toctree} +:hidden: + +简述 <index> +``` + +```{toctree} +:hidden: + +快速开始 <quick-start> +核心模块: core <pages/core> +生成器: generator <pages/generator> +处理器: handler <pages/handler> +注入模块: injector <pages/injector> +拦截器: interceptor <pages/interceptor> +包引用: internal <pages/internal> +注册器: register <pages/register> +工作流: workflow <pages/workflow> +``` + +```{toctree} +:caption: API 接口 +:hidden: + +阅读源码 <pages/api/index> +``` + +```{toctree} +:caption: 开发手册 +:hidden: + +社区贡献指引 <CONTRIBUTING> +变更日志 <changelog> +协议 <license> +``` diff --git a/docs/source/license.md b/docs/source/license.md new file mode 100644 index 0000000..3c74706 --- /dev/null +++ b/docs/source/license.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 HydroRoll-Team & Noctisynth, org + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. |
