Skip to content

Remove the Creating Documentation tutorial - #1345

Merged
pradyunsg merged 2 commits into
python:mainfrom
willingc:remove-doc-tutorial
Nov 5, 2023
Merged

pradyunsg merged 2 commits into
python:mainfrom
willingc:remove-doc-tutorial

Conversation

@willingc

@willingc willingc commented Nov 5, 2023

Copy link
Copy Markdown
Contributor

This tutorial is dated. It's also not directly related to packaging. It would be better to create a new docs tutorial or refer to existing documentation in other places.

I could see a future "How to" guide about making documentation be an extra installation.

@jeanas

jeanas commented Nov 5, 2023

Copy link
Copy Markdown
Contributor

Perhaps we can make the page a redirect to, e.g., https://www.sphinx-doc.org/en/master/tutorial/index.html, to avoid breaking links?

Patch:

diff --git a/requirements.txt b/requirements.txt
index d6e0d75..42fb1a1 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -5,3 +5,4 @@ python-docs-theme==2023.9
 sphinx-copybutton==0.5.0
 pypa-docs-theme @ git+https://github.com/pypa/pypa-docs-theme.git
 sphinx-toolbox==3.5.0
+sphinx-reredirects==0.1.3
diff --git a/source/conf.py b/source/conf.py
index 9113b8c..e083e7c 100644
--- a/source/conf.py
+++ b/source/conf.py
@@ -36,6 +36,7 @@ extensions = [
     'sphinx.ext.todo',
     'sphinx_inline_tabs',
     'sphinx_copybutton',
+    'sphinx_reredirects',
     'sphinx_toolbox.collapse',
 ]
 
@@ -446,3 +447,8 @@ nitpick_ignore = [
     ('py:func', 'setuptools.find_packages'),
     ('py:func', 'setuptools.setup'),
 ]
+
+# Redirects for deleted/moved pages
+redirects = {
+    "tutorials/creating-documentation": "https://www.sphinx-doc.org/en/master/tutorial",
+}

@pradyunsg

pradyunsg commented Nov 5, 2023 •

Copy link
Copy Markdown
Member

I do agree that we should drop this page, and I also share the concern of dropping the page without redirects breaking existing links.

However, I don't like the idea of silently redirecting to another domain though -- it's a hard-coded link in source code that can't be checked for whether it is out of date automatically via Sphinx's linkcheck.

@willingc How do you feel about keeping the toctree removal and replacing page with a orphan stub page? Something like the following (wrapping where appropriate)...

:orphan:

Creating documentation
======================

This tutorial has been removed since it is not related to packaging and was unmaintained. Please see the `Sphinx tutorial <https://www.sphinx-doc.org/en/master/tutorial>`_ instead.

@willingc

willingc commented Nov 5, 2023

Copy link
Copy Markdown
Contributor Author

Great suggestion about the breaking links. I like the @pradyunsg's suggestion for a stub.

@sinoroc sinoroc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even better now.

@pradyunsg
pradyunsg added this pull request to the merge queue Nov 5, 2023
Merged via the queue into python:main with commit 870a1bc Nov 5, 2023
@pradyunsg
pradyunsg deleted the remove-doc-tutorial branch November 5, 2023 20:43
@jeanas

jeanas commented Nov 5, 2023

Copy link
Copy Markdown
Contributor

documatt/sphinx-reredirects#6 😉

@pradyunsg

Copy link
Copy Markdown
Member

Hah, nice @jeanas! ^.^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants