Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
10 changes: 6 additions & 4 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
sphinx==5.0.0
# torch
# PyTorch Theme
-e git+https://github.com/pytorch/pytorch_sphinx_theme.git#egg=pytorch_sphinx_theme
sphinx>=7.2.0
-e git+https://github.com/pytorch/pytorch_sphinx_theme.git@pytorch_sphinx_theme2#egg=pytorch_sphinx_theme2
sphinx-design==0.6.1
sphinx-sitemap==2.7.1
sphinxext-opengraph
docutils>=0.18.1,<0.21
# For Graph Visualization
graphviz
15 changes: 0 additions & 15 deletions docs/source/_static/css/custom.css

This file was deleted.

8 changes: 0 additions & 8 deletions docs/source/_templates/layout.html

This file was deleted.

69 changes: 57 additions & 12 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import os
import sys

import pytorch_sphinx_theme
import pytorch_sphinx_theme2
import torchdata

# sys.path.insert(0, os.path.abspath('.'))
Expand Down Expand Up @@ -55,14 +55,21 @@
"sphinx.ext.intersphinx",
"sphinx.ext.doctest",
"sphinx.ext.graphviz",
"sphinx_design",
"sphinx_sitemap",
"pytorch_sphinx_theme2",
"sphinxext.opengraph",
]

# Do not execute standard reST doctest blocks so that documentation can
# be successively migrated to sphinx's doctest directive.
doctest_test_doctest_blocks = ""

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
templates_path = [
"_templates",
os.path.join(os.path.dirname(pytorch_sphinx_theme2.__file__), "templates"),
]

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand All @@ -75,27 +82,65 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
# html_theme = 'alabaster'
html_theme = "pytorch_sphinx_theme"
html_theme_path = [pytorch_sphinx_theme.get_html_theme_path()]
html_theme = "pytorch_sphinx_theme2"
html_theme_path = [pytorch_sphinx_theme2.get_html_theme_path()]

# OpenGraph settings
ogp_site_url = "https://pytorch.org/data/"
ogp_image = "https://pytorch.org/assets/images/social-share.jpg"

# Theme options
theme_variables = pytorch_sphinx_theme2.get_theme_variables()

html_theme_options = {
"collapse_navigation": False,
"navigation_with_keys": False,
"analytics_id": "GTM-T8XT4PS",
"logo": {
"text": "TorchData",
},
"icon_links": [
{
"name": "GitHub",
"url": "https://github.com/pytorch/data",
"icon": "fa-brands fa-github",
},
{
"name": "PyPi",
"url": "https://pypi.org/project/torchdata/",
"icon": "fa-brands fa-python",
},
],
"use_edit_page_button": True,
"navbar_center": "navbar-nav",
"navbar_start": ["pytorch_version"],
"display_version": True,
"logo_only": True,
"pytorch_project": "docs",
"navigation_with_keys": True,
"analytics_id": "UA-117752657-2",
}

html_context = {
"theme_variables": theme_variables,
"display_github": True,
"github_url": "https://github.com",
"github_user": "pytorch",
"github_repo": "data",
"github_version": "main",
"doc_path": "docs/source",
"library_links": theme_variables.get("library_links", []),
"community_links": theme_variables.get("community_links", []),
}

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]

html_css_files = [
"css/custom.css",
# Sitemap settings
html_baseurl = f"https://pytorch.org/data/{version}/"
sitemap_locales = [None]
sitemap_excludes = [
"search.html",
"genindex.html",
]
sitemap_url_scheme = "{link}"

signature_replacements = {}

Expand Down
Loading