Skip to content

Commit

Permalink
add API docs (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids authored May 15, 2024
1 parent 8c2fa6f commit 1c6bfb3
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,21 @@ jobs:
with:
python-version: '3.12'

- name: Install Python requirements
- name: Install Python docs requirements
run: |
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Install Django-OAPIF
run: python -m pip install -e ..

- name: Build documentation
run: mkdocs build

- uses: actions/upload-artifact@v4
if: ${{ github.event_name == 'pull_request' }}
with:
name: docs
name: Django-OAPIF-documentation
path: docs/site
if-no-files-found: error

Expand Down
3 changes: 3 additions & 0 deletions docs/content/api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# API documentation

::: django_oapif.decorators
2 changes: 1 addition & 1 deletion docs/content/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ urlpatterns += [
# models.py

from django.contrib.gis.db import models
from django_oapif import register
from django_oapif.decorators import register_oapif_viewset


@register_oapif_viewset()
Expand Down
3 changes: 3 additions & 0 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ nav:
- Home: index.md
- Quick start: quick-start.md
- Demo: demo.md
- API: api.md
- Permissions: permissions.md
- Test and conformance: tests.md

Expand All @@ -64,10 +65,12 @@ markdown_extensions:
- fancyboxmd
- sane_lists
- admonition
- codehilite
- pymdownx.details
- pymdownx.tabbed:
alternate_style: true
- pymdownx.superfences

plugins:
- search
- mkdocstrings
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
mkdocstrings[python]
mkdocs-material==9.5.9
mkdocs-video==1.5.0
fancyboxmd==1.1.0

0 comments on commit 1c6bfb3

Please sign in to comment.