Skip to content

Commit

Permalink
setup docs with Mkdocs
Browse files Browse the repository at this point in the history
[MkDocs](https://www.mkdocs.org/) is going to be used to build doc website.  So that we can use markdown instead of [rst](https://docutils.sourceforge.io/rst.html) to write tutorials and docs. 

Major changes
- Remove old setup of docs that depends on Sphinx
- Add new setup of docs using MkDocs
  • Loading branch information
CunliangGeng authored Mar 5, 2024
1 parent 189a5b3 commit d79b15c
Show file tree
Hide file tree
Showing 9 changed files with 115 additions and 170 deletions.
7 changes: 0 additions & 7 deletions .readthedocs.yaml

This file was deleted.

20 changes: 0 additions & 20 deletions docs/Makefile

This file was deleted.

89 changes: 0 additions & 89 deletions docs/conf.py

This file was deleted.

File renamed without changes.
18 changes: 0 additions & 18 deletions docs/index.rst

This file was deleted.

36 changes: 0 additions & 36 deletions docs/make.bat

This file was deleted.

Binary file removed docs/webapp.jpg
Binary file not shown.
108 changes: 108 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
site_name: NPLinker
site_description: Natural Products Linker
strict: true
site_url: https://nplinker.github.io/nplinker/

theme:
name: 'material'
custom_dir: 'docs/theme' # https://squidfunk.github.io/mkdocs-material/customization/
palette:
- media: "(prefers-color-scheme: light)"
scheme: default
primary: deep orange
accent: indigo
toggle:
icon: material/weather-sunny
name: "Switch to dark mode"
- media: "(prefers-color-scheme: dark)"
scheme: slate
primary: deep orange
accent: indigo
toggle:
icon: material/weather-night
name: "Switch to light mode"
features:
- content.tabs.link
- content.code.annotate
- content.code.copy
- announce.dismiss
- navigation.tabs
icon:
logo: 'material/library-outline'
previous: fontawesome/solid/angle-left
next: fontawesome/solid/angle-right
favicon: 'favicon.png'

repo_name: nplinker/nplinker
repo_url: https://github.com/nplinker/nplinker
edit_uri: edit/dev/docs/
extra:
version:
provider: mike

# https://www.mkdocs.org/user-guide/configuration/#validation
validation:
omitted_files: warn
absolute_links: warn
unrecognized_links: warn

extra_css:
- 'extra/terminal.css'
- 'extra/tweaks.css'
extra_javascript:
- 'extra/fluff.js'
- 'https://samuelcolvin.github.io/mkdocs-run-code/run_code_main.js'

nav:
- Get Started:
- Welcome to NPLinker: index.md
- API:

markdown_extensions:
- tables
- toc:
permalink: true
title: Page contents
- admonition
- pymdownx.details
- pymdownx.superfences
- pymdownx.highlight:
anchor_linenums: true
pygments_lang_class: true
- pymdownx.extra
- pymdownx.tabbed:
alternate_style: true
- pymdownx.magiclink

watch:
- docs

plugins:
- mike:
alias_type: symlink
canonical_version: latest
- search
- exclude:
glob:
- theme/*
- __pycache__/*
- mkdocstrings:
handlers:
python:
paths: [src]
import:
- https://docs.python.org/3/objects.inv
- https://numpy.org/doc/stable/objects.inv
- https://docs.scipy.org/doc/scipy/objects.inv
- https://pandas.pydata.org/docs/objects.inv
options:
members_order: source
filters: ["!^_"]
merge_init_into_class: true
show_root_heading: true
show_root_full_path: false
show_signature_annotations: true
signature_crossrefs: true
separate_signature: true
show_symbol_type_heading: true
show_symbol_type_toc: true
7 changes: 7 additions & 0 deletions requirements.dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,10 @@ types-toml
types-Deprecated
myst_parser
wheel
# docs
mkdocs
mkdocs-material
mike
mkdocs-exclude
mkdocstrings-python
mkdocs-redirects

0 comments on commit d79b15c

Please sign in to comment.