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

Remove the Creating Documentation tutorial #1345

Merged
merged 2 commits into from
Nov 5, 2023

Conversation

willingc
Copy link
Contributor

@willingc willingc commented Nov 5, 2023

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
Copy link
Contributor

jeanas commented Nov 5, 2023

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
Copy link
Member

pradyunsg commented Nov 5, 2023

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
Copy link
Contributor Author

willingc commented Nov 5, 2023

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

Copy link
Contributor

@sinoroc sinoroc left a comment

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 pypa:main with commit 870a1bc Nov 5, 2023
3 checks passed
@pradyunsg pradyunsg deleted the remove-doc-tutorial branch November 5, 2023 20:43
@jeanas
Copy link
Contributor

jeanas commented Nov 5, 2023

documatt/sphinx-reredirects#6 😉

@pradyunsg
Copy link
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