diff --git a/docs/assets/logo-osr-apps.png b/docs/assets/logo-osr-apps.png new file mode 100644 index 0000000..9c38385 Binary files /dev/null and b/docs/assets/logo-osr-apps.png differ diff --git a/docs/index.md b/docs/index.md index 000ea34..ed0b913 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,17 +1,9 @@ -# Welcome to MkDocs +# OSR Console -For full documentation visit [mkdocs.org](https://www.mkdocs.org). +OSR Console is an experimental turn-based dungeon crawler RPG in the old-school renaissance (OSR) style for your terminal. -## Commands +## Packages -* `mkdocs new [dir-name]` - Create a new project. -* `mkdocs serve` - Start the live-reloading docs server. -* `mkdocs build` - Build the documentation site. -* `mkdocs -h` - Print help message and exit. - -## Project layout - - mkdocs.yml # The configuration file. - docs/ - index.md # The documentation homepage. - ... # Other markdown pages, images and other files. +- [osrlib](osrlib.md) - Turn-based RPG game engine library. +- [osrgame](osrgame.md) - Demo console application built with the [Textual](https://textual.textualize.io/) TUI framework. +- [tests](tests.md) - Pytest-based unit and integration tests for `osrlib`. diff --git a/docs/main.css b/docs/main.css new file mode 100644 index 0000000..806a7c2 --- /dev/null +++ b/docs/main.css @@ -0,0 +1,24 @@ +.md-content__inner a { + color: #d17d00; /* Change for normal state */ +} + +.md-content__inner a:hover { + color: #ffa600; /* Change for hover state */ +} + +.md-nav__link { + color: #d17d00; /* Change for normal state */ +} + +.md-nav__link:hover, .md-nav__link--active { + color: #ffa600; /* Change for hover and active states */ +} + +.md-nav__item--active > .md-nav__link--active { + color: #ffa600; /* Replace with your desired color */ +} + +.md-nav__item--active > .md-nav__link, +.md-nav__item--active .md-nav__link--active { + color: #ffa600; /* Replace with your desired color for active folder links */ +} \ No newline at end of file diff --git a/docs/osrgame.md b/docs/osrgame.md new file mode 100644 index 0000000..d0b875d --- /dev/null +++ b/docs/osrgame.md @@ -0,0 +1,3 @@ +# osrgame + +--8<-- "osrgame/README.md:2" diff --git a/docs/osrlib.md b/docs/osrlib.md new file mode 100644 index 0000000..0638abd --- /dev/null +++ b/docs/osrlib.md @@ -0,0 +1,3 @@ +# osrlib + +--8<-- "osrlib/README.md:2" diff --git a/docs/tests.md b/docs/tests.md new file mode 100644 index 0000000..10671bf --- /dev/null +++ b/docs/tests.md @@ -0,0 +1,3 @@ +# tests + +--8<-- "tests/README.md:2" diff --git a/mkdocs.yml b/mkdocs.yml index c97182f..0918a2a 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1 +1,77 @@ -site_name: My Docs +site_name: OSR Console Documentation +site_author: Marsh Macy +site_description: Adventures in turn-based text +site_url: https://osrapps.github.io/osr-console +repo_name: osr-console +repo_url: https://github.com/osrapps/osr-console + +theme: + name: material + logo: assets/logo-osr-apps.png + favicon: assets/logo-osr-apps.png + icon: + repo: fontawesome/brands/github + + palette: + - media: "(prefers-color-scheme: light)" + scheme: default + primary: blue grey + accent: orange + toggle: + icon: material/brightness-7 + name: Switch to dark mode + - media: "(prefers-color-scheme: dark)" + scheme: slate + primary: blue grey + accent: orange + toggle: + icon: material/brightness-4 + name: Switch to light mode + + font: + text: Sora + #text: PT Sans Caption + #text: Actor + #text: Alef + #text: Palanquin + + code: Martian Mono + #code: JetBrains Mono + #code: BIZ UDPGothic + #code: Palanquin Dark + #code: Oxygen Mono + #code: IBM Plex Mono + + features: + - navigation.instant + - navigation.instant.progress + - navigation.tracking + - navigation.sections + - navigation.prune + - navigation.indexes + - navigation.top + - navigation.footer + - toc.follow + + - search.suggest + - search.highlight + - search.share + + - header.autohide + +markdown_extensions: + - attr_list + - md_in_html + - pymdownx.emoji: + emoji_index: !!python/name:material.extensions.emoji.twemoji + emoji_generator: !!python/name:material.extensions.emoji.to_svg + - pymdownx.highlight: + anchor_linenums: true + line_spans: __span + pygments_lang_class: true + - pymdownx.inlinehilite + - pymdownx.snippets + - pymdownx.superfences + +extra_css: + - 'main.css' diff --git a/osrlib/poetry.lock b/osrlib/poetry.lock index 64a742d..3fc5091 100644 --- a/osrlib/poetry.lock +++ b/osrlib/poetry.lock @@ -578,15 +578,30 @@ watchdog = ">=2.0" i18n = ["babel (>=2.9.0)"] min-versions = ["babel (==2.9.0)", "click (==7.0)", "colorama (==0.4)", "ghp-import (==1.0)", "importlib-metadata (==4.3)", "jinja2 (==2.11.1)", "markdown (==3.2.1)", "markupsafe (==2.0.1)", "mergedeep (==1.3.4)", "packaging (==20.5)", "pathspec (==0.11.1)", "platformdirs (==2.2.0)", "pyyaml (==5.1)", "pyyaml-env-tag (==0.1)", "typing-extensions (==3.10)", "watchdog (==2.0)"] +[[package]] +name = "mkdocs-autorefs" +version = "0.5.0" +description = "Automatically link across pages in MkDocs." +optional = false +python-versions = ">=3.8" +files = [ + {file = "mkdocs_autorefs-0.5.0-py3-none-any.whl", hash = "sha256:7930fcb8ac1249f10e683967aeaddc0af49d90702af111a5e390e8b20b3d97ff"}, + {file = "mkdocs_autorefs-0.5.0.tar.gz", hash = "sha256:9a5054a94c08d28855cfab967ada10ed5be76e2bfad642302a610b252c3274c0"}, +] + +[package.dependencies] +Markdown = ">=3.3" +mkdocs = ">=1.1" + [[package]] name = "mkdocs-material" -version = "9.5.4" +version = "9.5.5" description = "Documentation that simply works" optional = false python-versions = ">=3.8" files = [ - {file = "mkdocs_material-9.5.4-py3-none-any.whl", hash = "sha256:efd7cc8ae03296d728da9bd38f4db8b07ab61f9738a0cbd0dfaf2a15a50e7343"}, - {file = "mkdocs_material-9.5.4.tar.gz", hash = "sha256:3d196ee67fad16b2df1a458d650a8ac1890294eaae368d26cee71bc24ad41c40"}, + {file = "mkdocs_material-9.5.5-py3-none-any.whl", hash = "sha256:ac50b2431a79a3b160fdefbba37c9132485f1a69166aba115ad49fafdbbbc5df"}, + {file = "mkdocs_material-9.5.5.tar.gz", hash = "sha256:4480d9580faf42fed0123d0465502bfc1c0c239ecc9c4d66159cf0459ea1b4ae"}, ] [package.dependencies] @@ -604,7 +619,7 @@ requests = ">=2.26,<3.0" [package.extras] git = ["mkdocs-git-committers-plugin-2 (>=1.1,<2.0)", "mkdocs-git-revision-date-localized-plugin (>=1.2,<2.0)"] -imaging = ["cairosvg (>=2.6,<3.0)", "pillow (>=9.4,<10.0)"] +imaging = ["cairosvg (>=2.6,<3.0)", "pillow (>=10.2,<11.0)"] recommended = ["mkdocs-minify-plugin (>=0.7,<1.0)", "mkdocs-redirects (>=1.2,<2.0)", "mkdocs-rss-plugin (>=1.6,<2.0)"] [[package]] @@ -618,6 +633,32 @@ files = [ {file = "mkdocs_material_extensions-1.3.1.tar.gz", hash = "sha256:10c9511cea88f568257f960358a467d12b970e1f7b2c0e5fb2bb48cab1928443"}, ] +[[package]] +name = "mkdocstrings" +version = "0.24.0" +description = "Automatic documentation from sources, for MkDocs." +optional = false +python-versions = ">=3.8" +files = [ + {file = "mkdocstrings-0.24.0-py3-none-any.whl", hash = "sha256:f4908560c10f587326d8f5165d1908817b2e280bbf707607f601c996366a2264"}, + {file = "mkdocstrings-0.24.0.tar.gz", hash = "sha256:222b1165be41257b494a9d29b14135d2b7ca43f38161d5b10caae03b87bd4f7e"}, +] + +[package.dependencies] +click = ">=7.0" +Jinja2 = ">=2.11.1" +Markdown = ">=3.3" +MarkupSafe = ">=1.1" +mkdocs = ">=1.4" +mkdocs-autorefs = ">=0.3.1" +platformdirs = ">=2.2.0" +pymdown-extensions = ">=6.3" + +[package.extras] +crystal = ["mkdocstrings-crystal (>=0.3.4)"] +python = ["mkdocstrings-python (>=0.5.2)"] +python-legacy = ["mkdocstrings-python-legacy (>=0.2.1)"] + [[package]] name = "mypy-extensions" version = "1.0.0" @@ -1349,4 +1390,4 @@ watchmedo = ["PyYAML (>=3.10)"] [metadata] lock-version = "2.0" python-versions = "^3.11" -content-hash = "95c4d13b0e6ea97b70a933d525d27b0384a2f4d1d33b06bbbd87ffaa3504e67b" +content-hash = "c6573d89b64b1d8a939b2f84df12e9b497d832c3cfc0373c4c50bbc040788d86" diff --git a/osrlib/pyproject.toml b/osrlib/pyproject.toml index 1435d8e..0f923ab 100644 --- a/osrlib/pyproject.toml +++ b/osrlib/pyproject.toml @@ -16,6 +16,7 @@ black = "^23.9.1" flake8 = "^6.1.0" flake8-docstrings = "^1.7.0" mkdocs-material = "^9.4.6" +mkdocstrings = "^0.24.0" pytest = "^7.4.2" pytest-cov = "^4.1.0" pytest-mock = "^3.12.0"