Skip to content
This repository was archived by the owner on Aug 19, 2025. It is now read-only.

Commit b9f35e5

Browse files
woileaminalaee
andauthored
fix documentation syntax highlight (#326)
* Add `scripts/docs` and `scripts/build` Co-authored-by: Amin Alaee <mohammadamin.alaee@gmail.com>
1 parent cc3246a commit b9f35e5

5 files changed

Lines changed: 30 additions & 5 deletions

File tree

.github/workflows/publish.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ jobs:
1616
- uses: "actions/setup-python@v1"
1717
with:
1818
python-version: 3.7
19-
- name: "Publish"
19+
- name: "Install dependencies"
20+
run: "scripts/install"
21+
- name: "Build package & docs"
22+
run: "scripts/build"
23+
- name: "Publish to PyPI & deploy docs"
2024
run: "scripts/publish"
2125
env:
2226
TWINE_USERNAME: __token__

mkdocs.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,7 @@ nav:
1515
- Tests & Migrations: 'tests_and_migrations.md'
1616

1717
markdown_extensions:
18+
- mkautodoc
1819
- admonition
19-
- codehilite
20+
- pymdownx.highlight
21+
- pymdownx.superfences

requirements.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,12 @@ pytest
2323
pytest-cov
2424
starlette
2525
requests
26+
27+
# Documentation
28+
mkdocs
29+
mkdocs-material
30+
mkautodoc
31+
32+
# Packaging
33+
twine
34+
wheel

scripts/build

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/sh -e
2+
3+
if [ -d 'venv' ] ; then
4+
PREFIX="venv/bin/"
5+
else
6+
PREFIX=""
7+
fi
8+
9+
set -x
10+
11+
${PREFIX}python setup.py sdist bdist_wheel
12+
${PREFIX}twine check dist/*
13+
${PREFIX}mkdocs build

scripts/publish

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/bin/sh -e
22

33
VERSION_FILE="databases/__init__.py"
4-
PYTHONPATH=.
54

65
if [ -d 'venv' ] ; then
76
PREFIX="venv/bin/"
@@ -23,7 +22,5 @@ fi
2322

2423
set -x
2524

26-
${PREFIX}pip install twine wheel mkdocs mkdocs-material mkautodoc
27-
${PREFIX}python setup.py sdist bdist_wheel
2825
${PREFIX}twine upload dist/*
2926
${PREFIX}mkdocs gh-deploy --force

0 commit comments

Comments
 (0)