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

Use kedro-sphinx-theme #3675

Merged
merged 5 commits into from
Apr 19, 2024
Merged

Use kedro-sphinx-theme #3675

merged 5 commits into from
Apr 19, 2024

Conversation

astrojuanlu
Copy link
Member

Description

#3586

Development notes

Developer Certificate of Origin

We need all contributions to comply with the Developer Certificate of Origin (DCO). All commits must be signed off by including a Signed-off-by line in the commit message. See our wiki for guidance.

If your PR is blocked due to unsigned commits, then you must follow the instructions under "Rebase the branch" on the GitHub Checks page for your PR. This will retroactively add the sign-off to all unsigned commits and allow the DCO check to pass.

Checklist

  • Read the contributing guidelines
  • Signed off each commit with a Developer Certificate of Origin (DCO)
  • Opened this PR as a 'Draft Pull Request' if it is work-in-progress
  • Updated the documentation to reflect the code changes
  • Added a description of this change in the RELEASE.md file
  • Added tests to cover my changes
  • Checked if this change will affect Kedro-Viz, and if so, communicated that with the Viz team

@astrojuanlu
Copy link
Member Author

astrojuanlu commented Mar 1, 2024

This is now fulfilling the vision I outlined in #3586 and is using the newly created https://github.com/kedro-org/kedro-sphinx-theme to style the documenation. Notice that this PR removes our custom layout.html (that now lives in the theme) as well as some custom Sphinx hooks.

It's clear that

image

https://kedro--3675.org.readthedocs.build/en/3675/

@tynandebold @jitu5 @rashidakanchwala shall we have a look at this sometime soon?

@astrojuanlu
Copy link
Member Author

I fixed the CSS, now I think it's equal pixel by pixel 👍🏽 Please review

@astrojuanlu
Copy link
Member Author

(This wasn't planned, so no rush)

@astrojuanlu astrojuanlu marked this pull request as ready for review March 3, 2024 21:25
Comment on lines -496 to -506
def env_override(default_appid):
build_version = os.getenv("READTHEDOCS_VERSION")

if build_version == "latest":
return os.environ["HEAP_APPID_QA"]
if build_version == "stable":
return os.environ["HEAP_APPID_PROD"]

return default_appid # default to Development for local builds


def _add_jinja_filters(app):
Copy link
Member Author

Choose a reason for hiding this comment

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

Thinking that maybe these functions should stay here, instead of being in the theme itself

str(css_path / "qb1-sphinx-rtd.css"),
str(css_path / "theme-overrides.css"),
)
return (str(css_path / "copybutton.css"),)
Copy link
Member Author

Choose a reason for hiding this comment

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

Just found out that this function exists after doing this PR, and I noticed that it's used in all the starters...

"sphinx-autodoc-typehints==1.20.2",
"sphinx_copybutton==0.5.2",
"sphinx-notfound-page",
"kedro-sphinx-theme @ git+https://github.com/kedro-org/kedro-sphinx-theme@main",
Copy link
Member Author

Choose a reason for hiding this comment

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

If this approach is well received obviously this should be pinned to a tag, or even a proper release on PyPI

Copy link
Member

@tynandebold tynandebold left a comment

Choose a reason for hiding this comment

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

The styles and preview look great! Nothing looks off to my eye. Approving along that axis.

tynandebold and others added 4 commits April 12, 2024 13:52
Signed-off-by: Juan Luis Cano Rodríguez <[email protected]>
Signed-off-by: Juan Luis Cano Rodríguez <[email protected]>
Signed-off-by: Juan Luis Cano Rodríguez <[email protected]>
Signed-off-by: Juan Luis Cano Rodríguez <[email protected]>
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