From b6ee80862e606bdaaed3d2432662d1ad5808f2aa Mon Sep 17 00:00:00 2001 From: Leonard Xu Date: Fri, 6 Aug 2021 01:03:34 +0800 Subject: [PATCH] [doc] Support markdown tables in document website by recommonmark --- docs/build_docs.sh | 2 +- docs/conf.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/build_docs.sh b/docs/build_docs.sh index 3f0fbe08e..935235c3e 100755 --- a/docs/build_docs.sh +++ b/docs/build_docs.sh @@ -22,7 +22,7 @@ set -x # step-1: install dependencies apt-get update apt-get -y install git rsync python3-pip python3-sphinx python3-git python3-stemmer python3-virtualenv python3-setuptools -python3 -m pip install myst-parser pygments sphinx-rtd-theme +python3 -m pip install pygments sphinx-rtd-theme recommonmark sphinx-markdown-tables export SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct) export REPO_NAME="${GITHUB_REPOSITORY##*/}" diff --git a/docs/conf.py b/docs/conf.py index 66bcaf639..56e5f306a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -61,7 +61,8 @@ extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'sphinx.ext.githubpages', - 'myst_parser' + 'recommonmark', + 'sphinx-markdown-tables', ] # Add any paths that contain templates here, relative to this directory. @@ -72,10 +73,10 @@ templates_path = ['_templates'] # html_theme = 'sphinx_rtd_theme' -import myst_parser +from recommonmark.parser import CommonMarkParser source_parsers = { - '.md': myst_parser + '.md': CommonMarkParser } source_suffix = ['.md']