aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/docs
diff options
context:
space:
mode:
author简律纯 <i@jyunko.cn>2024-03-04 03:58:29 +0800
committer简律纯 <i@jyunko.cn>2024-03-04 03:58:29 +0800
commitcff0ce84eef922912bcc277cd613e96f3571575e (patch)
tree434a0080d1fd8472310a12673d4112b811c3d730 /docs
parent967ce6dc6fb3329b93293862c4e9178b8ce87091 (diff)
downloadHydroRollCore-cff0ce84eef922912bcc277cd613e96f3571575e.tar.gz
HydroRollCore-cff0ce84eef922912bcc277cd613e96f3571575e.zip
refactor!: rewrite in rust
Diffstat (limited to 'docs')
-rw-r--r--docs/Makefile26
-rw-r--r--docs/_static/logo.pngbin0 -> 235361 bytes
-rw-r--r--docs/requirements.txt7
-rw-r--r--docs/source/COPYING.rst1
-rw-r--r--docs/source/changelog.rst3
-rw-r--r--docs/source/conf.py96
-rw-r--r--docs/source/index.rst23
-rw-r--r--docs/source/pages/contributing.rst1
-rw-r--r--docs/source/pages/quick-start.rst3
9 files changed, 160 insertions, 0 deletions
diff --git a/docs/Makefile b/docs/Makefile
new file mode 100644
index 0000000..fc24907
--- /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 = .
+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
new file mode 100644
index 0000000..8b5a14c
--- /dev/null
+++ b/docs/_static/logo.png
Binary files differ
diff --git a/docs/requirements.txt b/docs/requirements.txt
new file mode 100644
index 0000000..899492a
--- /dev/null
+++ b/docs/requirements.txt
@@ -0,0 +1,7 @@
+furo>=2023.3.27
+sphinx-autobuild>=2021.3.14
+myst-parser>=0.18.1
+sphinx>=5.3.0
+tomli
+sphinx_design
+sphinx-intl>=2.1.0 \ No newline at end of file
diff --git a/docs/source/COPYING.rst b/docs/source/COPYING.rst
new file mode 100644
index 0000000..ea3bea4
--- /dev/null
+++ b/docs/source/COPYING.rst
@@ -0,0 +1 @@
+.. include:: ../../COPYING \ No newline at end of file
diff --git a/docs/source/changelog.rst b/docs/source/changelog.rst
new file mode 100644
index 0000000..19a8b62
--- /dev/null
+++ b/docs/source/changelog.rst
@@ -0,0 +1,3 @@
+.. maxdepth: 1
+
+.. 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..27e20a6
--- /dev/null
+++ b/docs/source/conf.py
@@ -0,0 +1,96 @@
+# 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 os, sys
+
+if sys.version_info >= (3, 11):
+ import tomllib
+else:
+ import tomli as tomllib
+
+DATA = None
+PYPROJECT = os.path.join("..", "..", "Cargo.toml")
+with open(PYPROJECT, "r", encoding="utf8") as f:
+ pyproject = f.read()
+ DATA = tomllib.loads(pyproject)
+PROJECT_VERSION = DATA["package"]["version"]
+PROJECT_NAME = DATA["package"]["name"]
+AUTHOR_TABLE = DATA["package"]["authors"]
+AUTHORS = ",".join([f"{aut}" for aut in AUTHOR_TABLE])
+
+# -- Project information -----------------------------------------------------
+# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
+
+project = PROJECT_NAME # "Infini"
+release = PROJECT_VERSION # "latest"
+copyright = "2023-PRESENT, HydroRoll-Team & AICMUniversity."
+author = AUTHORS # "Hsiang Nianian"
+
+html_title = "Nivis ❄"
+
+# -- 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/nivis-python/%s", "issue %s"),
+ "doc": ("https://nivis.hydroroll.team/en/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://cdn.jsdelivr.net/gh/HydroRoll-Team/nivis-python@main/docs/_static/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 = {
+ "announcement": "<em><a href='#'>documentation</a> is still under construction now, welcome any <a href='contributing.html'>contribution</a>!</em>",
+ "source_repository": "https://github.com/HydroRoll-Team/nivis-python/",
+ "source_branch": "main",
+ "source_directory": "docs/source/",
+ "footer_icons": [
+ {
+ "name": "GitHub",
+ "url": "https://github.com/HydroRoll-Team/nivis-python/",
+ "html": "",
+ "class": "fa-brands fa-github",
+ },
+ {
+ "name": "Pypi",
+ "url": "https://pypi.org/project/nivis-python/",
+ "html": "",
+ "class": "fa-brands fa-python",
+ },
+ ],
+}
diff --git a/docs/source/index.rst b/docs/source/index.rst
new file mode 100644
index 0000000..3b2f020
--- /dev/null
+++ b/docs/source/index.rst
@@ -0,0 +1,23 @@
+.. hide-toc: true
+
+Nivis - ❄
+=========
+
+.. include:: ../../README.rst
+ :start-after: .. index-start
+ :end-before: .. index-end
+
+
+.. toctree::
+ :hidden:
+
+ Quick start <pages/quick-start.rst>
+
+
+.. toctree::
+ :caption: Development
+ :hidden:
+
+ CONTRIBUTING <pages/development/contributing.rst>
+ CHANGELOG <changelog.rst>
+ COPYING <COPYING.rst> \ No newline at end of file
diff --git a/docs/source/pages/contributing.rst b/docs/source/pages/contributing.rst
new file mode 100644
index 0000000..64b74a9
--- /dev/null
+++ b/docs/source/pages/contributing.rst
@@ -0,0 +1 @@
+.. include:: ../../../CONTRIBUTING.md \ No newline at end of file
diff --git a/docs/source/pages/quick-start.rst b/docs/source/pages/quick-start.rst
new file mode 100644
index 0000000..61ba1ad
--- /dev/null
+++ b/docs/source/pages/quick-start.rst
@@ -0,0 +1,3 @@
+Welcome to the nivis!
+=====================
+