Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade documentation techstack #6470

Merged
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ data structures and algorithms in both C++ and Python. The backend is highly
optimized and is set up for parallelization. We welcome contributions from
the open-source community.

[![Ubuntu CI](https://github.com/isl-org/Open3D/workflows/Ubuntu%20CI/badge.svg)](https://github.com/isl-org/Open3D/actions?query=workflow%3A%22Ubuntu+CI%22)
[![macOS CI](https://github.com/isl-org/Open3D/workflows/macOS%20CI/badge.svg)](https://github.com/isl-org/Open3D/actions?query=workflow%3A%22macOS+CI%22)
[![Windows CI](https://github.com/isl-org/Open3D/workflows/Windows%20CI/badge.svg)](https://github.com/isl-org/Open3D/actions?query=workflow%3A%22Windows+CI%22)
[![Ubuntu CI](https://github.com/isl-org/Open3D/actions/workflows/ubuntu.yml/badge.svg)](https://github.com/isl-org/Open3D/actions?query=workflow%3A%22Ubuntu+CI%22)
[![macOS CI](https://github.com/isl-org/Open3D/actions/workflows/macos.yml/badge.svg)](https://github.com/isl-org/Open3D/actions?query=workflow%3A%22macOS+CI%22)
[![Windows CI](https://github.com/isl-org/Open3D/actions/workflows/windows.yml/badge.svg)](https://github.com/isl-org/Open3D/actions?query=workflow%3A%22Windows+CI%22)

**Core features of Open3D include:**

Expand Down
19 changes: 0 additions & 19 deletions docs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,3 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/getting_started.in.rst
${CMAKE_CURRENT_SOURCE_DIR}/getting_started.rst @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/docker.in.rst
${CMAKE_CURRENT_SOURCE_DIR}/docker.rst @ONLY)

include(FetchContent)

FetchContent_Declare(
ext_open3d_sphinx_theme
PREFIX open3d_sphinx_theme
URL https://github.com/isl-org/open3d_sphinx_theme/archive/c71d2728eb5afd1aeeb20dc27a5a0d42bb402d83.tar.gz
URL_HASH SHA256=98af8b7fdb75a74280b6187dbb58ea601db978d4f3f8956d3d87c59c20786f73
DOWNLOAD_DIR "${OPEN3D_THIRD_PARTY_DOWNLOAD_DIR}/open3d_sphinx_theme"
)

if(NOT ext_open3d_sphinx_theme_POPULATED)
FetchContent_Populate(ext_open3d_sphinx_theme)

set(OPEN3D_SPHINX_THEME_SOURCE_DIR ${ext_open3d_sphinx_theme_SOURCE_DIR})
endif()

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/conf.in.py
${CMAKE_CURRENT_SOURCE_DIR}/conf.py @ONLY)
20 changes: 20 additions & 0 deletions docs/_templates/versions.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{% if display_all_docs_versions %}
{# Add rst-badge after rst-versions for small badge style. #}
<div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="versions">
<span class="rst-current-version" data-toggle="rst-current-version">
<span class="fa fa-book"> Docs version</span>
{{ version }}
<span class="fa fa-caret-down"></span>
</span>
<!-- A hack to include an external page to get around CORS policy -->
<!-- https://stackoverflow.com/a/15250208/1255535 -->
<div class="rst-other-versions">
<dl>
<dt>{{ _('Versions') }}</dt>
<dd><ul>
<script src="http://www.open3d.org/docs/versions.js"></script>
</ul></dd>
</dl>
</div>
</div>
{% endif %}
24 changes: 9 additions & 15 deletions docs/conf.in.py → docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ def get_git_short_hash():
"sphinx.ext.napoleon",
"sphinx.ext.todo",
"nbsphinx",
'm2r2',
"m2r2",
"sphinx_rtd_theme",
]

if os.environ.get("skip_notebooks", "false") == "true":
Expand Down Expand Up @@ -139,17 +140,12 @@ def get_git_short_hash():

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
# html_theme = 'alabaster'
theme_path = "@OPEN3D_SPHINX_THEME_SOURCE_DIR@"
html_theme = "sphinx_rtd_theme"
html_theme_path = [theme_path]
html_favicon = "_static/open3d_logo.ico"

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
html_theme_options = {
# 'display_version': True
}
Expand All @@ -159,15 +155,13 @@ def get_git_short_hash():
# so a file named "default.css" will overwrite the builtin "default.css".

# '_static' contains the theme overwrite
static_path = os.path.join(theme_path, "sphinx_rtd_theme", "static")
html_static_path = [static_path, "_static"]

# Force table wrap: https://rackerlabs.github.io/docs-rackspace/tools/rtd-tables.html
html_context = {
"css_files": [
"_static/theme_overrides.css" # override wide tables in RTD theme
]
}
html_static_path = ["_static"]

# Display selection of all documentation versions.
html_context = {'display_all_docs_versions': True}

# Override theme css
html_css_files = ["theme_overrides.css"]

# added by Jaesik to hide "View page source"
html_show_sourcelink = False
Expand Down
14 changes: 7 additions & 7 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
sphinx==3.3.1
sphinx-rtd-theme==0.5.2
nbsphinx==0.8.3
matplotlib==3.3.3
jinja2==3.0.3
m2r2==0.2.7
mistune==0.8.4
docutils==0.17.0
jinja2==3.1.2
m2r2==0.3.2
matplotlib==3.7.3
nbsphinx==0.9.3
sphinx==5.3.0
sphinx-rtd-theme==1.3.0