Skip to content

Commit

Permalink
Add initial mkdocs and readthedocs configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
davidyuk committed Nov 5, 2020
1 parent 28f7e6f commit b688a96
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version: 2
mkdocs:
configuration: mkdocs.yml
conda:
environment: docs/conda.yml
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ jobs:
- npm run build
- npm run test:unit
- npm run report-coverage
- npm run docs:docco
- npm run docs:api
- pyenv global 3.8
- pip3 install -r docs/requirements.txt
- mkdocs build
deploy:
- provider: pages
skip_cleanup: true
Expand Down
6 changes: 6 additions & 0 deletions docs/conda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dependencies:
- python>=3.8
- nodejs=10.*
- pip
- pip:
- -r file:requirements.txt
8 changes: 8 additions & 0 deletions docs/hooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import os.path
import subprocess

def pre_build(**kwargs):
if not os.path.exists('node_modules'):
subprocess.run(['npm', 'install', '--ignore-scripts'], check=True)
subprocess.run(['npm', 'run', 'docs:docco'], check=True)
subprocess.run(['npm', 'run', 'docs:api'], check=True)
2 changes: 2 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
mkdocs==1.1.2
mkdocs-simple-hooks==0.1.2
7 changes: 7 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
site_name: Aeternity JavaScript SDK
plugins:
- search
- mkdocs-simple-hooks:
hooks:
on_pre_build: "docs.hooks:pre_build"
repo_url: 'https://github.com/aeternity/aepp-sdk-js'

0 comments on commit b688a96

Please sign in to comment.