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

No way for a page to know the source_suffix of it's source #1873

Closed
ericholscher opened this issue May 5, 2015 · 1 comment
Closed

No way for a page to know the source_suffix of it's source #1873

ericholscher opened this issue May 5, 2015 · 1 comment
Milestone

Comments

@ericholscher
Copy link
Contributor

We want to be able to link to the GitHub repo for a specific page when we build it. With the availability of multiple source_suffix's, we need to know what the actual suffix was for the specific file we're rendering is.

It feels like it should be included in the get_doc_context function: https://github.com/sphinx-doc/sphinx/blob/master/sphinx/builders/html.py#L360-L428 -- but I don't know the best way to pull it off. I could call doc2path, but if a specific docname has multiple extensions (eg. foo.rst and foo.md) in a directory, then I think that will result in a bug. It seems we should be passing the extension in, as we render the specific file.

I'll look into it a bit more and hopefully have a patch for this soon.

@ericholscher
Copy link
Contributor Author

Upon further thought, we can only output one page per docname, so using doc2path on the env is the proper solution.

ericholscher added a commit to ericholscher/sphinx that referenced this issue May 6, 2015
shimizukawa added a commit that referenced this issue Jun 7, 2015
shimizukawa added a commit that referenced this issue Feb 9, 2016
@tk0miya tk0miya added this to the 1.3.6 milestone Feb 14, 2016
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants