From 75a0116fcc474d0e7519a5c5c4264e21727aca56 Mon Sep 17 00:00:00 2001 From: agnieszkawierzbowska <55345953+agnieszkawierzbowska@users.noreply.github.com> Date: Sun, 15 Sep 2019 12:21:27 +0200 Subject: [PATCH] Update how-it-works.rst "When these events are triggered, our functions are called and they manipulate the doctree and context passed to the template." I had a problem rephrasing this since I don't get the context... what are "our functions that are called"? It could be more specific here. --- docs/how-it-works.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/how-it-works.rst b/docs/how-it-works.rst index 8d71c09..06377b5 100644 --- a/docs/how-it-works.rst +++ b/docs/how-it-works.rst @@ -1,7 +1,7 @@ How It Works ============ -The extension subscribes to some events emitted by Sphinx application. +The extension subscribes to some events emitted by the Sphinx application. When these events are triggered, our functions are called and they manipulate the doctree and context passed to the template. @@ -9,20 +9,20 @@ our functions are called and they manipulate the doctree and context passed to t Events subscribed ----------------- -There are 3 main events that this extension subscribes, +There are 3 main events that this extension subscribes: * ``doctree-resolved`` * ``html-collect-pages`` * ``html-page-context`` Each one has an specific goal persuading the same objective: -make all the resources URLs absolutes. +make all resources URLs absolutes. doctree-resolved ~~~~~~~~~~~~~~~~ -Once Sphinx has parsed our source files, this event is triggered. +After Sphinx has parsed our source files, this event is triggered. Here, we check if the page being rendered is ``notfound_pagename`` and in that case, we replace all the URLs for ``.. image::``, ``.. figure::`` and other directives to point the right path. @@ -32,8 +32,8 @@ html-collect-pages After all HTML pages are collected and this event is emitted, we check for the existence of a ``404`` page already. -If the is one, we do nothing here. -On the other hand, if the user has not defined this page, +If there is one, we do not need to do anything here. +If the user has not defined this page, we render the template ``notfound_template`` with the context ``notfound_context``.