-
Notifications
You must be signed in to change notification settings - Fork 32
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
Conversation
notfound/extension.py
Outdated
@@ -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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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::
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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?
tests/test_urls.py
Outdated
chunks = [ | ||
# .. image:: | ||
'<img alt="An image" src="/en/latest/test.png" />', | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra space :D
The URIs for all the `.. image::` directive used in 404.rst will be replaced to point to the proper URL.
3d62d47
to
197f863
Compare
The URIs for all the
.. image::
directive used in 404.rst will be replaced to point to the proper URL.