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

DOC: Simplify pandas theme footer #51536

Open
datapythonista opened this issue Feb 21, 2023 · 9 comments
Open

DOC: Simplify pandas theme footer #51536

datapythonista opened this issue Feb 21, 2023 · 9 comments

Comments

@datapythonista
Copy link
Member

The sphinx theme that we're using didn't let us specify what exactly to show in our footer in the configuration file. So, what we did was to create a custom template to overwrite everything. Seems like now they changed this in their end, and we should be able to implement in our end the footer we want without requiring the extra template. I didn't check in detail, so some research is needed to see if this is really possible.

Their changes haven't been released yet, so we can't really get this into production until they do. But we can get the PR ready by temporary changing the pydata-sphinx-theme dependency to the git version.

@HaripriyaGnanasekaran
Copy link

take

@natmokval
Copy link
Contributor

Hi @RamanathanVaradharajan, how is it going with this issue?
If you don't mind I would like to work on it.

@datapythonista
Copy link
Member Author

You can probably go ahead @natmokval, thanks for the help!

@natmokval
Copy link
Contributor

Hi @datapythonista. I started to work on this issue and got stuck. I created a pr #52149 to show the changes I've made so far. Could you please help and advise me on what could be my next step?

@AbrhamSayd
Copy link

AbrhamSayd commented May 13, 2023

Hi @datapythonista I'm working on it.

@AbrhamSayd
Copy link

AbrhamSayd commented May 18, 2023

Hi @datapythonista
After researching and exploring different ways of displaying the pandas footer without using an extra template
I haven't found a solution to stop using it.
My closest approach was to use the 'html_context' setting to define the footer content inside the conf.py

#Variable for the footer
footer = f"""{datetime.now().year}
pandas via <a href="https://numfocus.org">NumFOCUS, Inc.
</a> Hosted by <a href="https://www.ovhcloud.com">OVHcloud</a>"""

html_context = {
    "redirects": dict(moved_api_pages),
    "header": header,
    "footer": footer
}

And just pass the variable to the pandas_footer.html

<p class="copyright">
    &copy {{footer}} 
</p>

But the template is still needed to render the context variable

html_theme_options = {
    "external_links": [],
    "footer_start": ["pandas_footer", "sphinx-version"],
    "github_url": "https://github.com/pandas-dev/pandas",
    "twitter_url": "https://twitter.com/pandas_dev",
    }

This is how its render
image

Does anyone have any more ideas for getting rid of the template?

AbrhamSayd added a commit to BlackArrowGang/pandas that referenced this issue May 19, 2023
@AbrhamSayd
Copy link

Hi @datapythonista I've submitted a pull request that proposes a potential solution.

@BabaYaga1221
Copy link

Hello everyone, I just continue the work from the last PR which is now drafted. Can you take a look and provide suggestions? Thank you @datapythonista

@Spraveen8-chary
Copy link

Hi @datapythonista , I would like to work on it.

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

Successfully merging a pull request may close this issue.

6 participants