Synchronized build
This commit is contained in:
parent
201a02c7df
commit
778a322969
|
@ -197,7 +197,7 @@ use of this property is to track dependencies.</p>
|
||||||
|
|
||||||
<span class="k">class</span> <span class="nc">MyPlugin</span><span class="p">(</span><span class="n">Plugin</span><span class="p">):</span>
|
<span class="k">class</span> <span class="nc">MyPlugin</span><span class="p">(</span><span class="n">Plugin</span><span class="p">):</span>
|
||||||
|
|
||||||
<span class="k">def</span> <span class="nf">on_env_setup</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">**</span><span class="n">extra</span><span class="p">):</span>
|
<span class="k">def</span> <span class="nf">on_setup_env</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">**</span><span class="n">extra</span><span class="p">):</span>
|
||||||
<span class="n">color</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">get_config</span><span class="p">()</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">'color'</span><span class="p">)</span>
|
<span class="n">color</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">get_config</span><span class="p">()</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">'color'</span><span class="p">)</span>
|
||||||
<span class="k">def</span> <span class="nf">get_css</span><span class="p">(</span><span class="n">artifact_name</span><span class="o">=</span><span class="s1">'/static/demo.css'</span><span class="p">):</span>
|
<span class="k">def</span> <span class="nf">get_css</span><span class="p">(</span><span class="n">artifact_name</span><span class="o">=</span><span class="s1">'/static/demo.css'</span><span class="p">):</span>
|
||||||
<span class="n">ctx</span> <span class="o">=</span> <span class="n">get_ctx</span><span class="p">()</span>
|
<span class="n">ctx</span> <span class="o">=</span> <span class="n">get_ctx</span><span class="p">()</span>
|
||||||
|
|
|
@ -193,7 +193,7 @@ event name is prefixed with the plugin ID.</p>
|
||||||
|
|
||||||
<span class="k">class</span> <span class="nc">MyPlugin</span><span class="p">(</span><span class="n">Plugin</span><span class="p">):</span>
|
<span class="k">class</span> <span class="nc">MyPlugin</span><span class="p">(</span><span class="n">Plugin</span><span class="p">):</span>
|
||||||
|
|
||||||
<span class="k">def</span> <span class="nf">on_env_setup</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">**</span><span class="n">extra</span><span class="p">):</span>
|
<span class="k">def</span> <span class="nf">on_setup_env</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">**</span><span class="n">extra</span><span class="p">):</span>
|
||||||
<span class="bp">self</span><span class="o">.</span><span class="n">emit</span><span class="p">(</span><span class="s1">'setup'</span><span class="p">,</span> <span class="n">foo</span><span class="o">=</span><span class="mi">42</span><span class="p">)</span>
|
<span class="bp">self</span><span class="o">.</span><span class="n">emit</span><span class="p">(</span><span class="s1">'setup'</span><span class="p">,</span> <span class="n">foo</span><span class="o">=</span><span class="mi">42</span><span class="p">)</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
<p>Another plugin can then hook this:</p>
|
<p>Another plugin can then hook this:</p>
|
||||||
|
|
|
@ -194,7 +194,7 @@ navigate to the <code>bar</code> key in the <code>[foo]</code> section.</p>
|
||||||
|
|
||||||
<span class="k">class</span> <span class="nc">MyPlugin</span><span class="p">(</span><span class="n">Plugin</span><span class="p">):</span>
|
<span class="k">class</span> <span class="nc">MyPlugin</span><span class="p">(</span><span class="n">Plugin</span><span class="p">):</span>
|
||||||
|
|
||||||
<span class="k">def</span> <span class="nf">on_env_setup</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">**</span><span class="n">extra</span><span class="p">):</span>
|
<span class="k">def</span> <span class="nf">on_setup_env</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">**</span><span class="n">extra</span><span class="p">):</span>
|
||||||
<span class="n">color</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">get_config</span><span class="p">()</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">'color'</span><span class="p">)</span>
|
<span class="n">color</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">get_config</span><span class="p">()</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">'color'</span><span class="p">)</span>
|
||||||
<span class="bp">self</span><span class="o">.</span><span class="n">env</span><span class="o">.</span><span class="n">jinja_env</span><span class="o">.</span><span class="n">globals</span><span class="p">[</span><span class="s1">'my_color'</span><span class="p">]</span> <span class="o">=</span> <span class="n">color</span>
|
<span class="bp">self</span><span class="o">.</span><span class="n">env</span><span class="o">.</span><span class="n">jinja_env</span><span class="o">.</span><span class="n">globals</span><span class="p">[</span><span class="s1">'my_color'</span><span class="p">]</span> <span class="o">=</span> <span class="n">color</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
|
@ -151,7 +151,7 @@ speak multiple languages and allow you to easily create localized websites.</li>
|
||||||
<div class="slideshow-wrapper">
|
<div class="slideshow-wrapper">
|
||||||
<div class="slideshow">
|
<div class="slideshow">
|
||||||
<div class="slideshow-inner">
|
<div class="slideshow-inner">
|
||||||
<div class="carousel slide" data-ride="carousel" data-interval="8500" id="carousel-24b0a7cfdde94bc9afb018d3e2fa518a">
|
<div class="carousel slide" data-ride="carousel" data-interval="8500" id="carousel-fb4269f74c454e56bfc594c7bc1b9160">
|
||||||
|
|
||||||
<div class="carousel-inner" role="listbox">
|
<div class="carousel-inner" role="listbox">
|
||||||
|
|
||||||
|
@ -210,11 +210,11 @@ be completely customized.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<a class="left carousel-control" href="#carousel-24b0a7cfdde94bc9afb018d3e2fa518a" role="button" data-slide="prev">
|
<a class="left carousel-control" href="#carousel-fb4269f74c454e56bfc594c7bc1b9160" role="button" data-slide="prev">
|
||||||
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
|
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
|
||||||
<span class="sr-only">Previous</span>
|
<span class="sr-only">Previous</span>
|
||||||
</a>
|
</a>
|
||||||
<a class="right carousel-control" href="#carousel-24b0a7cfdde94bc9afb018d3e2fa518a" role="button" data-slide="next">
|
<a class="right carousel-control" href="#carousel-fb4269f74c454e56bfc594c7bc1b9160" role="button" data-slide="next">
|
||||||
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
|
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
|
||||||
<span class="sr-only">Next</span>
|
<span class="sr-only">Next</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
Loading…
Reference in New Issue