Skip to content

Commit

Permalink
feat: mkdocs alfa version
Browse files Browse the repository at this point in the history
  • Loading branch information
ShashkovS committed Nov 12, 2023
1 parent a3b1565 commit 41dc392
Show file tree
Hide file tree
Showing 10 changed files with 119 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: ci
on:
push:
branches:
- master
- main
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v3
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install mkdocs-material mkdocstrings-python
- run: mkdocs gh-deploy --force
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ venv/
/**/.idea/
*egg-info*
.coverage
site/
1 change: 1 addition & 0 deletions docs/animation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# DrawZero animations
13 changes: 13 additions & 0 deletions docs/examples.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# DrawZero examples


![00_hello_world](ex_00.png)
``` title="00_hello_world.py"
--8<-- "src/drawzero/examples/00_hello_world.py"
```


![01_grid_and_coordinates](ex_01.png)
``` title="01_grid_and_coordinates.py"
--8<-- "src/drawzero/examples/01_grid_and_coordinates.py"
```
4 changes: 4 additions & 0 deletions docs/gradient.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
::: drawzero.utils.gradient
options:
show_bases: false
show_source: true
1 change: 1 addition & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# DrawZero
18 changes: 18 additions & 0 deletions docs/installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Installation

In a Terminal window, type:
```shell
pip install drawzero --upgrade --user
```


Or run the following program:

```python
import os, sys
python = sys.executable
user = '--user' if 'venv' not in python and 'virtualenvs' not in python else ''
cmd = f'"{python}" -m pip install drawzero --upgrade {user}'
os.system(cmd)
from drawzero import *
```
4 changes: 4 additions & 0 deletions docs/pt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
::: drawzero.utils.pt
options:
show_bases: false
show_source: true
50 changes: 50 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
site_name: DrawZero — zero boilerplate canvas drawing and animation
site_url: https://drawzero.ru
repo_url: https://github.com/ShashkovS/drawzero

nav:
- DrawZero: index.md
- Installation: installation.md
- Examples: examples.md
- Animations: animation.md
- Code Reference:
- Pt: pt.md
- Gradient: gradient.md

theme:
name: material
highlightjs: true
language: ru
features:
- navigation.instant
- navigation.instant.prefetch
- navigation.tracking
- navigation.expand
- navigation.path
- toc.follow
- navigation.top
- search.suggest
- search.highlight

extra:
alternate:
- name: English
link: /en/
homepage: https://drawzero.ru

plugins:
- search:
lang:
- ru
- en
- mkdocstrings:
default_handler: python

markdown_extensions:
- pymdownx.snippets
- pymdownx.highlight:
use_pygments: true
- pymdownx.superfences

watch:
- src
2 changes: 2 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ pytest
coverage
wheel
twine
mkdocs-material
mkdocstrings-python

0 comments on commit 41dc392

Please sign in to comment.