diff --git a/.gitignore b/.gitignore index 90f231d..074e4f0 100644 --- a/.gitignore +++ b/.gitignore @@ -110,3 +110,4 @@ resources/_gen/ # Misc .local/ .corenetworks* +docs/api/corenetworks/ diff --git a/Makefile b/Makefile index 66e0e19..9f053a7 100644 --- a/Makefile +++ b/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) diff --git a/dev-requirements.txt b/dev-requirements.txt index 22602da..c4dbba4 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -18,4 +18,4 @@ pytest-cov bandit requests-mock yapf -pydoc-markdown +pdoc; python_version >= "3.6" diff --git a/docs/content/usage/.keep b/docs/content/usage/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/docs/data/menu/main.yml b/docs/data/menu/main.yml index 110a520..4e2a44a 100644 --- a/docs/data/menu/main.yml +++ b/docs/data/menu/main.yml @@ -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" diff --git a/docs/templates/usage_index.md b/docs/templates/usage_index.md deleted file mode 100644 index b7f7b73..0000000 --- a/docs/templates/usage_index.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Usage ---- - -{{< toc >}}