Deployed 046569e1 to dev with MkDocs 1.6.1 and mike 2.1.3

This commit is contained in:
github-actions 2025-05-25 09:59:31 +00:00
parent 33b81d0f2e
commit 06c057263b
4 changed files with 4 additions and 4 deletions

View file

@ -3,7 +3,7 @@
</code></pre></div> <p><a href=https://github.com/django-components/django-components/tree/master/src/django_components/templatetags/component_tags.py#L1024 target=_blank>See source code</a></p> <p>Marks location where CSS link tags should be rendered after the whole HTML has been generated.</p> <p>Generally, this should be inserted into the <code>&lt;head&gt;</code> tag of the HTML.</p> <p>If the generated HTML does NOT contain any <code>{% component_css_dependencies %}</code> tags, CSS links are by default inserted into the <code>&lt;head&gt;</code> tag of the HTML. (See <a href=../../concepts/advanced/rendering_js_css/#default-js-css-locations>Default JS / CSS locations</a>)</p> <p>Note that there should be only one <code>{% component_css_dependencies %}</code> for the whole HTML document. If you insert this tag multiple times, ALL CSS links will be duplicately inserted into ALL these places.</p> <h2 id=component_js_dependencies>component_js_dependencies<a class=headerlink href=#component_js_dependencies title="Permanent link">¤</a></h2> <div class=highlight><pre><span></span><code><a id=__codelineno-2-1 name=__codelineno-2-1 href=#__codelineno-2-1></a><span class=cp>{%</span> <span class=k>component_js_dependencies</span> <span class=cp>%}</span>
</code></pre></div> <p><a href=https://github.com/django-components/django-components/tree/master/src/django_components/templatetags/component_tags.py#L1046 target=_blank>See source code</a></p> <p>Marks location where JS link tags should be rendered after the whole HTML has been generated.</p> <p>Generally, this should be inserted at the end of the <code>&lt;body&gt;</code> tag of the HTML.</p> <p>If the generated HTML does NOT contain any <code>{% component_js_dependencies %}</code> tags, JS scripts are by default inserted at the end of the <code>&lt;body&gt;</code> tag of the HTML. (See <a href=../../concepts/advanced/rendering_js_css/#default-js-css-locations>Default JS / CSS locations</a>)</p> <p>Note that there should be only one <code>{% component_js_dependencies %}</code> for the whole HTML document. If you insert this tag multiple times, ALL JS scripts will be duplicately inserted into ALL these places.</p> <h2 id=component>component<a class=headerlink href=#component title="Permanent link">¤</a></h2> <div class=highlight><pre><span></span><code><a id=__codelineno-3-1 name=__codelineno-3-1 href=#__codelineno-3-1></a><span class=cp>{%</span> <span class=k>component</span> <span class=o>*</span><span class=nv>args</span><span class=o>:</span> <span class=nv>Any</span><span class=o>,</span> <span class=o>**</span><span class=nv>kwargs</span><span class=o>:</span> <span class=nv>Any</span> <span class=o>[</span><span class=nv>only</span><span class=o>]</span> <span class=cp>%}</span>
<a id=__codelineno-3-2 name=__codelineno-3-2 href=#__codelineno-3-2></a><span class=cp>{%</span> <span class=k>endcomponent</span> <span class=cp>%}</span>
</code></pre></div> <p><a href=https://github.com/django-components/django-components/tree/master/src/django_components/templatetags/component_tags.py#L3113 target=_blank>See source code</a></p> <p>Renders one of the components that was previously registered with <a href=../api/#django_components.register><code>@register()</code></a> decorator.</p> <p>The <code>{% component %}</code> tag takes:</p> <ul> <li>Component's registered name as the first positional argument,</li> <li>Followed by any number of positional and keyword arguments.</li> </ul> <div class=highlight><pre><span></span><code><a id=__codelineno-4-1 name=__codelineno-4-1 href=#__codelineno-4-1></a><span class=cp>{%</span> <span class=k>load</span> <span class=nv>component_tags</span> <span class=cp>%}</span>
</code></pre></div> <p><a href=https://github.com/django-components/django-components/tree/master/src/django_components/templatetags/component_tags.py#L3110 target=_blank>See source code</a></p> <p>Renders one of the components that was previously registered with <a href=../api/#django_components.register><code>@register()</code></a> decorator.</p> <p>The <code>{% component %}</code> tag takes:</p> <ul> <li>Component's registered name as the first positional argument,</li> <li>Followed by any number of positional and keyword arguments.</li> </ul> <div class=highlight><pre><span></span><code><a id=__codelineno-4-1 name=__codelineno-4-1 href=#__codelineno-4-1></a><span class=cp>{%</span> <span class=k>load</span> <span class=nv>component_tags</span> <span class=cp>%}</span>
<a id=__codelineno-4-2 name=__codelineno-4-2 href=#__codelineno-4-2></a><span class=x>&lt;div&gt;</span>
<a id=__codelineno-4-3 name=__codelineno-4-3 href=#__codelineno-4-3></a><span class=x> </span><span class=cp>{%</span> <span class=k>component</span> <span class=s2>&quot;button&quot;</span> <span class=nv>name</span><span class=o>=</span><span class=s2>&quot;John&quot;</span> <span class=nv>job</span><span class=o>=</span><span class=s2>&quot;Developer&quot;</span> <span class=o>/</span> <span class=cp>%}</span>
<a id=__codelineno-4-4 name=__codelineno-4-4 href=#__codelineno-4-4></a><span class=x>&lt;/div&gt;</span>

View file

@ -270,7 +270,7 @@
</code></pre></div> <p>Read more on <a href=https://django-components.github.io/django-components/0.140/concepts/advanced/component_caching/ >Component caching</a>.</p> </li> <li> <p>New extension hook <code>on_slot_rendered()</code></p> <p>This hook is called when a slot is rendered, and allows you to access and/or modify the rendered result.</p> <p>This is used by the <a href=https://django-components.github.io/django-components/0.140/guides/other/troubleshooting/#component-and-slot-highlighting>"debug highlight" feature</a>.</p> <p>To modify the rendered result, return the new value:</p> <div class=highlight><pre><span></span><code><a id=__codelineno-51-1 name=__codelineno-51-1 href=#__codelineno-51-1></a><span class=k>class</span><span class=w> </span><span class=nc>MyExtension</span><span class=p>(</span><span class=n>ComponentExtension</span><span class=p>):</span>
<a id=__codelineno-51-2 name=__codelineno-51-2 href=#__codelineno-51-2></a> <span class=k>def</span><span class=w> </span><span class=nf>on_slot_rendered</span><span class=p>(</span><span class=bp>self</span><span class=p>,</span> <span class=n>ctx</span><span class=p>:</span> <span class=n>OnSlotRenderedContext</span><span class=p>)</span> <span class=o>-&gt;</span> <span class=n>Optional</span><span class=p>[</span><span class=nb>str</span><span class=p>]:</span>
<a id=__codelineno-51-3 name=__codelineno-51-3 href=#__codelineno-51-3></a> <span class=k>return</span> <span class=n>ctx</span><span class=o>.</span><span class=n>result</span> <span class=o>+</span> <span class=s2>&quot;&lt;!-- Hello, world! --&gt;&quot;</span>
</code></pre></div> <p>If you don't want to modify the rendered result, return <code>None</code>.</p> <p>See all <a href=https://django-components.github.io/django-components/0.140/reference/extension_hooks/ >Extension hooks</a>.</p> </li> </ul> <h4 id=fix>Fix<a class=headerlink href=#fix title="Permanent link">¤</a></h4> <ul> <li>Fix bug: Context processors data was being generated anew for each component. Now the data is correctly created once and reused across components with the same request (<a href=https://github.com/django-components/django-components/issues/1165>#1165</a>).</li> </ul> <h2 id=v01391>v0.139.1<a class=headerlink href=#v01391 title="Permanent link">¤</a></h2> <h4 id=fix_1>Fix<a class=headerlink href=#fix_1 title="Permanent link">¤</a></h4> <ul> <li>Fix compatibility of component caching with <code>{% extend %}</code> block (<a href=https://github.com/django-components/django-components/issues/1135>#1135</a>)</li> </ul> <h4 id=refactor>Refactor<a class=headerlink href=#refactor title="Permanent link">¤</a></h4> <ul> <li> <p>Component ID is now prefixed with <code>c</code>, e.g. <code>c123456</code>.</p> </li> <li> <p>When typing a Component, you can now specify as few or as many parameters as you want.</p> <div class=highlight><pre><span></span><code><a id=__codelineno-52-1 name=__codelineno-52-1 href=#__codelineno-52-1></a><span class=n>Component</span><span class=p>[</span><span class=n>Args</span><span class=p>]</span>
</code></pre></div> <p>If you don't want to modify the rendered result, return <code>None</code>.</p> <p>See all <a href=https://django-components.github.io/django-components/0.140/reference/extension_hooks/ >Extension hooks</a>.</p> </li> </ul> <h4 id=fix>Fix<a class=headerlink href=#fix title="Permanent link">¤</a></h4> <ul> <li> <p>Fix bug: Context processors data was being generated anew for each component. Now the data is correctly created once and reused across components with the same request (<a href=https://github.com/django-components/django-components/issues/1165>#1165</a>).</p> </li> <li> <p>Fix KeyError on <code>component_context_cache</code> when slots are rendered outside of the component's render context. (<a href=https://github.com/django-components/django-components/issues/1189>#1189</a>)</p> </li> </ul> <h2 id=v01391>v0.139.1<a class=headerlink href=#v01391 title="Permanent link">¤</a></h2> <h4 id=fix_1>Fix<a class=headerlink href=#fix_1 title="Permanent link">¤</a></h4> <ul> <li>Fix compatibility of component caching with <code>{% extend %}</code> block (<a href=https://github.com/django-components/django-components/issues/1135>#1135</a>)</li> </ul> <h4 id=refactor>Refactor<a class=headerlink href=#refactor title="Permanent link">¤</a></h4> <ul> <li> <p>Component ID is now prefixed with <code>c</code>, e.g. <code>c123456</code>.</p> </li> <li> <p>When typing a Component, you can now specify as few or as many parameters as you want.</p> <div class=highlight><pre><span></span><code><a id=__codelineno-52-1 name=__codelineno-52-1 href=#__codelineno-52-1></a><span class=n>Component</span><span class=p>[</span><span class=n>Args</span><span class=p>]</span>
<a id=__codelineno-52-2 name=__codelineno-52-2 href=#__codelineno-52-2></a><span class=n>Component</span><span class=p>[</span><span class=n>Args</span><span class=p>,</span> <span class=n>Kwargs</span><span class=p>]</span>
<a id=__codelineno-52-3 name=__codelineno-52-3 href=#__codelineno-52-3></a><span class=n>Component</span><span class=p>[</span><span class=n>Args</span><span class=p>,</span> <span class=n>Kwargs</span><span class=p>,</span> <span class=n>Slots</span><span class=p>]</span>
<a id=__codelineno-52-4 name=__codelineno-52-4 href=#__codelineno-52-4></a><span class=n>Component</span><span class=p>[</span><span class=n>Args</span><span class=p>,</span> <span class=n>Kwargs</span><span class=p>,</span> <span class=n>Slots</span><span class=p>,</span> <span class=n>Data</span><span class=p>]</span>

File diff suppressed because one or more lines are too long

View file

@ -1,7 +1,7 @@
[
{
"version": "dev",
"title": "dev (6ff2d78)",
"title": "dev (046569e)",
"aliases": []
},
{