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

Add warning when browsing developer docs #6896

Closed
wants to merge 1 commit into from

Conversation

stefanv
Copy link
Member

@stefanv stefanv commented Apr 15, 2023

This adds a warning banner to the top of the current "article" when the dev docs are being browsed (perhaps you want to look at stable docs?).

Unfortunately, I cannot figure out how to coax pydata-sphinx-theme into rendering the breadcrums either underneath or above the block.

Any ideas?

/cc @lagru

@jarrodmillman jarrodmillman added this to the 0.21 milestone Apr 15, 2023
@lagru
Copy link
Member

lagru commented Apr 15, 2023

The theme has the option to display an announcement banner which is displayed at the top of the screen, but will disappear once they start scrolling. I think that would be a perfect fit for what you want to achieve?

@lagru lagru added the 📄 type: Documentation Updates, fixes and additions to documentation label Apr 15, 2023
@lagru
Copy link
Member

lagru commented Apr 15, 2023

Additionally, we could also color the version switcher like SciPy does. That might be another hint to the user.

@lagru
Copy link
Member

lagru commented Apr 15, 2023

By the way, how is this relevant to the 0.21 release? It shouldn't be affected by this change in any way.

@lagru
Copy link
Member

lagru commented Apr 15, 2023

Should I update the PR with my suggested changes?

@stefanv
Copy link
Member Author

stefanv commented Apr 17, 2023

Can you make the banner only appear on the dev version? Ah, yes, that should be easy since it happens in conf.py. Go ahead and give it a try.

@jarrodmillman
Copy link
Contributor

jarrodmillman commented Apr 19, 2023

We use these templates in networkx:

When I make a release, I do the following in the same commit where I update the release version

git rm doc/_templates/layout.html

Then I add it back when I bump the release version after the release.

I haven't been good about it recently, I should update the NX release process documentation so I don't forget. But then I am supposed to manually insert

<div class="admonition warning">
<p class="admonition-title">Warning</p>
  <p>This documents an unmaintained version of NetworkX. Please upgrade to a maintained version and see <a href="https://networkx.org/documentation/stable/">the current NetworkX documentation</a>.</p>
</div>

In the past, I just use find and awk to insert the text from the command-line. I will just add the one-liner to the release process documentation or maybe to the README in the documentation repo.

At any rate, it would make sense to make this consistent between projects.

@stefanv
Copy link
Member Author

stefanv commented Sep 15, 2023

This is now supported by pydata-sphinx-theme; we just need to activate that feature.

@stefanv stefanv closed this Sep 15, 2023
@stefanv stefanv mentioned this pull request Sep 15, 2023
2 tasks
@lagru
Copy link
Member

lagru commented Sep 16, 2023

Continued in #7139.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📄 type: Documentation Updates, fixes and additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants