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 tutorials and update User Guide layout #1749

Closed

Conversation

luisaFelixSalles
Copy link
Collaborator

This PR changes the general layout of the user guide documentation section

  • Update the Ansys sphinx theme
  • Add subtitles in the sidebar
  • Transfer the concepts section into the user guide section
  • Introduce the concept of Tutorials

@luisaFelixSalles luisaFelixSalles added the documentation Improvements or additions to documentation label Sep 16, 2024
@luisaFelixSalles luisaFelixSalles self-assigned this Sep 16, 2024
@PProfizi PProfizi changed the title Doc/documentation adjustments new layout Add tutorials and update User Guide layout Sep 16, 2024
@@ -193,7 +194,7 @@ def reset_servers(gallery_conf, fname, when):
# -- Options for HTML output -------------------------------------------------
html_short_title = html_title = "PyDPF-Core"
html_theme = "ansys_sphinx_theme"
html_logo = pyansys_logo_black
html_logo = pyansys_logo_light_mode
Copy link
Contributor

Choose a reason for hiding this comment

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

@luisaFelixSalles why do we need this change? Is it going to work in dark mode?

Copy link
Collaborator Author

@luisaFelixSalles luisaFelixSalles Sep 16, 2024

Choose a reason for hiding this comment

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

The current nav bar looks like this:

image

The logo has a black square background, but we dont see it because the navigation bar also has a black background.:
image

So, I changed the logo for the one with a light back ground, to match the new navigation bar color. It actually doesn't look good in dark mode, I'll look into other projects to see how they do it

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@Revathyvenugopal162 I would like to ask for your help also in this case:

I tried passing the logo as an html configuration option with:
image

But I get the following error when building the documentation:

image

Do you know if I'm missing other configuration changes in other to solve this problem?

Copy link
Contributor

Choose a reason for hiding this comment

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

This wont work with out new theme. Please add this "logo": "pyansys" in theme options. example PR , ansys/pyansys-geometry@40366c1#diff-d8d3ed25802824d15bf411f8e97416d8fc6f9247e821b0617f2b869dc584b99c

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I tried this but it gives me the same error.
Is there a way to implement the logo (that respects the light and dark modes) with the new theme?

Copy link
Contributor

@Revathyvenugopal162 Revathyvenugopal162 Sep 17, 2024

Choose a reason for hiding this comment

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

@luisaFelixSalles @PProfizi The logo issue was fixed in 33fade6 and this is the first time we are getting this issue. i will keep track on this and try to fix it in ansys sphinx theme if required. The recommended way is using "logo":"pyansys" in theme options.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thank you for your help ! 🙂

sphinxcontrib-napoleon==0.7
ansys-sphinx-theme[autoapi]==1.0.8
numpydoc==1.8.0
Copy link
Contributor

Choose a reason for hiding this comment

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

@luisaFelixSalles here you have to either run the pre-commit hooks or to order them alphabetically yourself. Also leave an empty line at the end of the file.

luisaFelixSalles and others added 2 commits September 16, 2024 17:41
Co-authored-by: Paul Profizi <100710998+PProfizi@users.noreply.github.com>
Co-authored-by: Paul Profizi <100710998+PProfizi@users.noreply.github.com>
@@ -193,7 +194,7 @@ def reset_servers(gallery_conf, fname, when):
# -- Options for HTML output -------------------------------------------------
html_short_title = html_title = "PyDPF-Core"
html_theme = "ansys_sphinx_theme"
html_logo = pyansys_logo_black
html_logo = pyansys_logo_light_mode
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
html_logo = pyansys_logo_light_mode

yes you need to remove this line, and then add "logo":"pyansys", in html theme options. That should work

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I just test this variation and it still gives me the same error

Copy link
Contributor

Choose a reason for hiding this comment

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

let me try it locally.

Copy link
Contributor

Choose a reason for hiding this comment

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

yes, you are correct, and i think it is because of some mismatch in configuration. i can fix with with another workaround and push that changes if its ok for you

@PProfizi PProfizi deleted the doc/documentation-adjustments-new-layout branch November 28, 2024 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants