djangoproject.com icon indicating copy to clipboard operation
djangoproject.com copied to clipboard

Add link to 'Stable' doc version in the Warning Alert on top

Open SomeAB opened this issue 7 months ago • 5 comments

As discussed on discord in #documentation channel here

I think this will provide 'further convenience' to website users to upgrade the documentation version by simply clicking on the link in the warning itself as well:

Current Behavior of the Warning Alert on Top:

Image

Proposed change (text can be adjusted accordingly):

Image

Rationale:

  • The warning alert already exists, and draws eye attention towards itself (due to its bright color)
  • Adding a clickable link is 'further convenience' in terms of UX
  • Requires small change in code

SomeAB avatar Jun 11 '25 15:06 SomeAB

Hi, I’m trying to contribute to this issue. I noticed that the warning banner for the development version isn’t located in docs/_templates or conf.py. Is this injected via ReadTheDocs config or the sphinx-version-warning extension? If so, would it be appropriate to update it via the RTD config or do you expect it somewhere else?

AyushPatiTripathi avatar Jun 17 '25 03:06 AyushPatiTripathi

I had a look at the .readthedocs.yml file and didn’t see any explicit version-warning setting, so it seems like the “Development Version” banner is automatically added by Read the Docs based on the branch.

To add a link to the stable docs in that banner, would you prefer one of the following approaches?

Adding a small Sphinx extension in docs/ that detects if it’s a dev build and injects a custom banner with the link, or

Overriding the layout.html template to include the link conditionally ? so which one should i go with

Really enjoying working on my first issue

AyushPatiTripathi avatar Jun 17 '25 08:06 AyushPatiTripathi

@AyushPatiTripathi Please let the existing author know first if you are willing to take over an issue.

This message is a part of a template file. I pushed my changes here: https://github.com/django/djangoproject.com/pull/2101. It will need a styling update; feel free to take over.

ulgens avatar Jun 17 '25 13:06 ulgens

@ulgens Thanks for the update ,I saw your note and appreciate the work you've already done I’d be happy to continue from here and finalize the changes.

AyushPatiTripathi avatar Jun 17 '25 15:06 AyushPatiTripathi

kindly assign this to mee

NikitaJaiswal77 avatar Jul 09 '25 06:07 NikitaJaiswal77