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

Allow ..image:: directive on 404.rst #21

Merged
merged 6 commits into from
Jun 4, 2019

Conversation

humitos
Copy link
Member

@humitos humitos commented May 29, 2019

The URIs for all the .. image:: directive used in 404.rst will be replaced to point to the proper URL.

@humitos humitos requested a review from a team May 29, 2019 10:07
@@ -101,19 +104,7 @@ def toctree(*args, **kwargs):
return None

# https://github.com/sphinx-doc/sphinx/blob/2adeb68af1763be46359d5e808dae59d708661b1/sphinx/environment/adapters/toctree.py#L260-L266
Copy link
Member

Choose a reason for hiding this comment

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

Looks like this comment isn't valid anymore

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeap. I moved into the function where it belongs to.

@@ -129,6 +120,27 @@ def toctree(*args, **kwargs):
context['toctree'] = toctree


# https://www.sphinx-doc.org/en/stable/extdev/appapi.html#event-doctree-resolved
Copy link
Member

Choose a reason for hiding this comment

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

Any reason this can't be included in the docstring?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't want to display it in the autoapi docs.

@@ -8,3 +8,16 @@ This file should be rendered instead of the default one.

Variables Sphinx substitution should be allowed here.
Example, version: |version|.

Including an image using ``.. image::`` directive,
Copy link
Member

Choose a reason for hiding this comment

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

I would just put both directives in the same sentence, like: using .. image:: or .. figure::

Copy link
Member Author

Choose a reason for hiding this comment

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

This is used for the tests to check that they render properly. Both directive are needed.

Copy link
Member

Choose a reason for hiding this comment

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

Thought this was an actual doc page p:

@@ -0,0 +1 @@
This is just a file to be found by Sphinx when using ".. figure::" and do not fail.
Copy link
Member

Choose a reason for hiding this comment

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

Maybe better to include an actual image here?

chunks = [
# .. image::
'<img alt="An image" src="/en/latest/test.png" />',

Copy link
Member

Choose a reason for hiding this comment

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

extra space :D

@humitos humitos force-pushed the humitos/allow-image-directive branch from 3d62d47 to 197f863 Compare June 4, 2019 08:22
@humitos humitos merged commit e654ed4 into master Jun 4, 2019
@delete-merged-branch delete-merged-branch bot deleted the humitos/allow-image-directive branch June 4, 2019 08:25
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.

2 participants