mirror of
https://github.com/thegeeklab/corenetworks.git
synced 2024-11-13 00:10:42 +00:00
use pdoc to genrate markdown api docs
This commit is contained in:
parent
5f7f9650a4
commit
dbbfedff6d
1
.gitignore
vendored
1
.gitignore
vendored
@ -110,3 +110,4 @@ resources/_gen/
|
||||
# Misc
|
||||
.local/
|
||||
.corenetworks*
|
||||
docs/api/corenetworks/
|
||||
|
21
Makefile
21
Makefile
@ -1,7 +1,9 @@
|
||||
export GEEKDOC_VERSION ?= latest
|
||||
BASE_DIR := docs
|
||||
THEME := hugo-geekdoc
|
||||
THEME_DIR := $(BASE_DIR)/themes
|
||||
BASEDIR := docs
|
||||
THEMEDIR := $(BASEDIR)/themes
|
||||
APIDIR := $(BASEDIR)/content/api
|
||||
PACKAGE := corenetworks
|
||||
|
||||
.PHONY: all
|
||||
all: doc
|
||||
@ -11,16 +13,17 @@ doc: doc-assets doc-generate
|
||||
|
||||
.PHONY: doc-assets
|
||||
doc-assets:
|
||||
mkdir -p $(THEME_DIR)/$(THEME)/ ; \
|
||||
curl -sSL "https://github.com/xoxys/$(THEME)/releases/$${GEEKDOC_VERSION}/download/$(THEME).tar.gz" | tar -xz -C $(THEME_DIR)/$(THEME)/ --strip-components=1
|
||||
mkdir -p $(THEMEDIR)/$(THEME)/ ; \
|
||||
curl -sSL "https://github.com/xoxys/$(THEME)/releases/$${GEEKDOC_VERSION}/download/$(THEME).tar.gz" | tar -xz -C $(THEMEDIR)/$(THEME)/ --strip-components=1
|
||||
|
||||
.PHONY: doc-generate
|
||||
doc-generate:
|
||||
cd $(BASE_DIR) ; \
|
||||
cp templates/usage_index.md content/usage/_index.md ; \
|
||||
pydocmd simple corenetworks.authenticators++ corenetworks.client++ corenetworks.exceptions++ >> content/usage/_index.md
|
||||
pdoc --template-dir $(BASEDIR)/templates/ -o $(APIDIR) --force \
|
||||
$(PACKAGE).authenticators \
|
||||
$(PACKAGE).client \
|
||||
$(PACKAGE).exceptions
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf $(THEME_DIR) && \
|
||||
rm -f $(BASE_DIR)/content/usage/_index.md
|
||||
rm -rf $(THEMEDIR) && \
|
||||
rm -rf $(APIDIR)/$(PACKAGE)
|
||||
|
@ -18,4 +18,4 @@ pytest-cov
|
||||
bandit
|
||||
requests-mock
|
||||
yapf
|
||||
pydoc-markdown
|
||||
pdoc; python_version >= "3.6"
|
||||
|
@ -2,5 +2,11 @@
|
||||
main:
|
||||
- name: Setup
|
||||
ref: "/setup"
|
||||
- name: Usage
|
||||
ref: "/usage"
|
||||
- name: API
|
||||
sub:
|
||||
- name: corenetworks.authenticators
|
||||
ref: "/api/corenetworks/authenticators"
|
||||
- name: corenetworks.client
|
||||
ref: "/api/corenetworks/client"
|
||||
- name: corenetworks.exceptions
|
||||
ref: "/api/corenetworks/exceptions"
|
||||
|
5
docs/templates/usage_index.md
vendored
5
docs/templates/usage_index.md
vendored
@ -1,5 +0,0 @@
|
||||
---
|
||||
title: Usage
|
||||
---
|
||||
|
||||
{{< toc >}}
|
Loading…
Reference in New Issue
Block a user