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 path for settings #293

Merged

Conversation

eviau-artefactual
Copy link
Contributor

Closes #291

Maybe this is not a good use case of the rst_prolog feature - https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-rst_prolog ... let me know ?

@fiver-watson
Copy link
Contributor

it may work, but reading about in the doc, it is not meant for random in-line subsitutions, but rather for adding static header (prolog) or footer (epilog) content that you want appended to every page. At least that is how I understand it:

rst_prolog

  • Type: str
  • Default: ' '

A string of reStructuredText that will be included at the beginning of every source file that is read. This is a possible place to add substitutions that should be available in every file

E.g. one possible use would be our CC license (though that is already in the website footer, so technically it is in fact visible on every page), or a docs version etc.

If they change this feature to enhance its intended use this way in future versions of sphinx-docs, that could cause problems? Just a thought...

@eviau-artefactual
Copy link
Contributor Author

I am trying to see if this is a good case to start reusing content to help with the unique feature of source...

Maybe it's too much for this path...?

@fiver-watson
Copy link
Contributor

I think you actually answered your own question though with your links! The RST substitution is a general purpose solution for in-line changes like you were trying to implement. In fact we have used it before (I used it to swap in the header icons into the section titles on the Navigate page), I had just forgotten.

On the other hand, the rst_prolog and epilog functions are specifically for page headers and footers that have repeated content.

I would recommend using the substitution for what you've tried to do here instead, personally.

Copy link
Contributor

@anvit anvit left a comment

Choose a reason for hiding this comment

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

Looks good!

@eviau-artefactual eviau-artefactual merged commit 1e92bb8 into artefactual:2.8 Aug 1, 2024
1 check passed
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.

XML export on creation/update doesn't specify where the setting is
3 participants