-
Notifications
You must be signed in to change notification settings - Fork 7
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
base: main
Are you sure you want to change the base?
Conversation
… this page' and 'show source' buttons.
…om/ansys/ansys-sphinx-theme into feat/adding-custon-vars-directives
… this page' and 'show source' buttons.
9ce6bce
to
3652b92
Compare
I leave that to you @Revathyvenugopal162 ... to decide and implement 😅 |
…om/ansys/ansys-sphinx-theme into feat/adding-custon-vars-directives
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. |
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.