From d6d8a20d79573574f42f4d54978ba3cc8c2b44e4 Mon Sep 17 00:00:00 2001 From: Raymond Kim Date: Wed, 22 May 2024 18:51:43 +0000 Subject: [PATCH] #8534: Add sphinx-markdown-builder extension to docs build and add build directive in Make for it. Doesn't work yet because of https://github.com/liran-funaro/sphinx-markdown-builder/issues/21 --- docs/Makefile | 5 +++++ docs/requirements-docs.txt | 1 + docs/source/conf.py | 1 + 3 files changed, 7 insertions(+) diff --git a/docs/Makefile b/docs/Makefile index 367c9eb2c16..6472469ef42 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -11,6 +11,7 @@ DOXYGENDIR = doxygen_build HTMLDIR = $(BUILDDIR)/html TT_METALIUM_BUILDDIR = $(BUILDDIR)/tt-metalium TTNN_BUILDDIR = $(BUILDDIR)/ttnn +MARKDOWNDIR = $(BUILDDIR)/markdown PORT ?= 8888 DOCS_VERSION ?= latest @@ -49,6 +50,10 @@ html: html/tt-metalium html/ttnn mv -f $(TTNN_BUILDDIR) $(HTMLDIR)/ttnn cp source/index.html $(HTMLDIR)/ +markdown: build_doxygen sphinx_build_dir + @DOCS_VERSION=$(DOCS_VERSION) REQUESTED_DOCS_PKG=tt-metalium $(SPHINXBUILD) -M markdown "$(SOURCEDIR)/tt-metalium" build/tt-metalium-md $(SPHINXOPTS) $(O) + @DOCS_VERSION=$(DOCS_VERSION) REQUESTED_DOCS_PKG=ttnn $(SPHINXBUILD) -M markdown "$(SOURCEDIR)/ttnn" build/ttnn-md $(SPHINXOPTS) $(O) + ttnn_sweeps/check_directory: @if [ -d "$(TTNN_SWEEPS_DIR)" ]; then \ echo "Error: ttnn sweeps dir $(TTNN_SWEEPS_DIR) exists already."; \ diff --git a/docs/requirements-docs.txt b/docs/requirements-docs.txt index 1459d6b63e8..0df3b869386 100644 --- a/docs/requirements-docs.txt +++ b/docs/requirements-docs.txt @@ -8,3 +8,4 @@ nbsphinx==0.9.3 sphinxcontrib-jquery==4.1 ipython==8.12.3 pandoc==2.3 +sphinx-markdown-builder==0.6.6 diff --git a/docs/source/conf.py b/docs/source/conf.py index a12f2b57df0..79b2f3ae1aa 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -52,6 +52,7 @@ "sphinxcontrib.email", "sphinx.ext.mathjax", "breathe", + "sphinx_markdown_builder", ] # Napoleon settings