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

feat: adding custom vars directives #523

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

germa89
Copy link
Contributor

@germa89 germa89 commented Oct 2, 2024

Add the directive "setpagevar" which allow us to set page variables which can later be used during the HTML building process ("html-page-context").

Additionally, to prove/test the directive, I coded two functions, one to remove the "edit this page" button and another one for remove the "show source" button.

This directive and functionalities have not been implemented in the ansys-sphinx-theme, but I don't see why we should not use them here to, so all the libraries using the theme can benefit from it.

Future steps should aim to have something for processing each page HTML after it has been build.
I guess we will need to use 'build-finished' event, and parse each page with beautiful soup so we can add stuff (like attributes) to HTML elements. Later we can overwrite the HTML pages.

This could allow us to get the same as ansys/pymapdl#3449 which is quite specific to the intended use.

This is all doable... I'm just lacking of time.

@germa89 germa89 requested a review from a team as a code owner October 2, 2024 10:48
@github-actions github-actions bot added documentation enhancement General improvements to existing features labels Oct 2, 2024
doc/source/conf.py Outdated Show resolved Hide resolved
@germa89 germa89 changed the title feat: adding custon vars directives feat: adding custom vars directives Oct 2, 2024
@germa89 germa89 force-pushed the feat/adding-custon-vars-directives branch from 9ce6bce to 3652b92 Compare October 2, 2024 11:28
@germa89
Copy link
Contributor Author

germa89 commented Oct 2, 2024

This directive and functionalities have not been implemented in the ansys-sphinx-theme, but I don't see why we should not use them here to, so all the libraries using the theme can benefit from it.

I leave that to you @Revathyvenugopal162 ... to decide and implement 😅

@Revathyvenugopal162
Copy link
Contributor

This directive and functionalities have not been implemented in the ansys-sphinx-theme, but I don't see why we should not use them here to, so all the libraries using the theme can benefit from it.

I leave that to you @Revathyvenugopal162 ... to decide and implement 😅

We can implement this in the Ansys Sphinx theme and provide it as a directive, making it reusable across different libraries. This would be particularly beneficial for libraries with card-based layouts on their landing pages. Ping @ansys/pyansys-core for visibility and insights.

@RobPasMue
Copy link
Member

We can implement this in the Ansys Sphinx theme and provide it as a directive, making it reusable across different libraries. This would be particularly beneficial for libraries with card-based layouts on their landing pages. Ping @ansys/pyansys-core for visibility and insights.

Fine by me - seems like a useful functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement General improvements to existing features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants