Synchronized build
This commit is contained in:
parent
974aac9f83
commit
79ad24695b
|
@ -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-a365f97a982543458d791c9df3747515">
|
<div class="carousel slide" data-ride="carousel" data-interval="8500" id="carousel-e55abcd5be9c4a19942ccffd6d139ade">
|
||||||
|
|
||||||
<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-a365f97a982543458d791c9df3747515" role="button" data-slide="prev">
|
<a class="left carousel-control" href="#carousel-e55abcd5be9c4a19942ccffd6d139ade" 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-a365f97a982543458d791c9df3747515" role="button" data-slide="next">
|
<a class="right carousel-control" href="#carousel-e55abcd5be9c4a19942ccffd6d139ade" 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>
|
||||||
|
|
|
@ -131,59 +131,56 @@
|
||||||
<h2>Project Description</h2>
|
<h2>Project Description</h2>
|
||||||
|
|
||||||
<p>This plugin adds support for <cite>Google analytics</cite> to <cite>Lektor CMS</cite>.</p>
|
<p>This plugin adds support for <cite>Google analytics</cite> to <cite>Lektor CMS</cite>.</p>
|
||||||
<p>Once the plugin is enabled, a <tt>generate_google_analytics()</tt> function
|
<p>Once the plugin is enabled, a <span class="docutils literal">generate_google_analytics()</span> function
|
||||||
is available to be included in target <tt>template</tt> which automatically
|
is available to be included in target <span class="docutils literal">template</span> which automatically
|
||||||
include Google-Analytics code in final HTML files rendered by
|
include Google-Analytics code in final HTML files rendered by
|
||||||
<tt>Lektor</tt>.</p>
|
<span class="docutils literal">Lektor</span>.</p>
|
||||||
<div class="section" id="basic-usage">
|
<section id="basic-usage">
|
||||||
<h2>Basic Usage</h2>
|
<h2>Basic Usage</h2>
|
||||||
<div class="section" id="enabling-the-plugin">
|
<section id="enabling-the-plugin">
|
||||||
<h3>Enabling the Plugin</h3>
|
<h3>Enabling the Plugin</h3>
|
||||||
<p>To enable the plugin add this to your project file:</p>
|
<p>To enable the plugin add this to your project file:</p>
|
||||||
<pre><span class="k">[packages]</span><span class="w">
|
<pre><code><span class="k">[packages]</span><span class="w">
|
||||||
</span><span class="na">lektor-google-analytics</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">0.1</span>
|
</span><span class="na">lektor-google-analytics</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><s>0.1</s></code></pre>
|
||||||
</pre>
|
</section>
|
||||||
</div>
|
<section id="configuring-the-plugin">
|
||||||
<div class="section" id="configuring-the-plugin">
|
|
||||||
<h3>Configuring the Plugin</h3>
|
<h3>Configuring the Plugin</h3>
|
||||||
<p>The plugin needs a config file with your <tt>Google analytics</tt> code in
|
<p>The plugin needs a config file with your <span class="docutils literal">Google analytics</span> code in
|
||||||
it.</p>
|
it.</p>
|
||||||
<p>Just create a file named <tt><span class="pre">google-analytics.ini</span></tt> into <tt>./configs</tt>
|
<p>Just create a file named <span class="docutils literal"><span class="pre">google-analytics.ini</span></span> into <span class="docutils literal">./configs</span>
|
||||||
folder in your Lektor project’s base directory. And, put the
|
folder in your Lektor project’s base directory. And, put the
|
||||||
<tt>GOOGLE_ANALYTICS_ID</tt> key with target property ID of form
|
<span class="docutils literal">GOOGLE_ANALYTICS_ID</span> key with target property ID of form
|
||||||
<tt><span class="pre">UA-XXXXXXXX-Y</span></tt> which you obtained from:</p>
|
<span class="docutils literal"><span class="pre">UA-XXXXXXXX-Y</span></span> which you obtained from:</p>
|
||||||
<pre><span class="na">GOOGLE_ANALYTICS_ID</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">UA-XXXXXXXX-Y</span>
|
<pre><code><span class="na">GOOGLE_ANALYTICS_ID</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><s>UA-XXXXXXXX-Y</s></code></pre>
|
||||||
</pre>
|
</section>
|
||||||
</div>
|
<section id="using-in-templates">
|
||||||
<div class="section" id="using-in-templates">
|
|
||||||
<h3>Using in Templates</h3>
|
<h3>Using in Templates</h3>
|
||||||
<p>Now you can add a Google analytics code-snippet in your templates by
|
<p>Now you can add a Google analytics code-snippet in your templates by
|
||||||
just calling the <tt>generate_google_analytics</tt> function inside its <tt><body> </body></tt> tags.</p>
|
just calling the <span class="docutils literal">generate_google_analytics</span> function inside its <span class="docutils literal"><body> </body></span> tags.</p>
|
||||||
<pre><span class="p"><</span><span class="nt">div</span> <span class="na">class</span><span class="o">=</span><span class="s">"ga-script"</span><span class="p">></span>{{ generate_google_analytics() }}<span class="p"></</span><span class="nt">div</span><span class="p">></span>
|
<pre><code><span class="p"><</span><span class="nt">div</span> <span class="na">class</span><span class="o">=</span><s>"ga-script"</s><span class="p">></span>{{ generate_google_analytics() }}<span class="p"></</span><span class="nt">div</span><span class="p">></span></code></pre>
|
||||||
</pre>
|
<p>That’s it. All the <span class="docutils literal">HTML</span> files that rendered from that template will
|
||||||
<p>That’s it. All the <tt>HTML</tt> files that rendered from that template will
|
|
||||||
include Google-Analytics code automatically.</p>
|
include Google-Analytics code automatically.</p>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="advanced">
|
<section id="advanced">
|
||||||
<h2>Advanced</h2>
|
<h2>Advanced</h2>
|
||||||
<dl>
|
<dl class="simple">
|
||||||
<dt>You can use <tt>GOOGLE_ANALYTICS_PROPERTY</tt> property to include your</dt>
|
<dt>You can use <span class="docutils literal">GOOGLE_ANALYTICS_PROPERTY</span> property to include your</dt>
|
||||||
<dd>custom-built Google Analytics tracking code. In that case, your
|
<dd><p>custom-built Google Analytics tracking code. In that case, your
|
||||||
<tt><span class="pre">./configs/google-analytics.ini</span></tt> will look like this:</dd>
|
<span class="docutils literal"><span class="pre">./configs/google-analytics.ini</span></span> will look like this:</p>
|
||||||
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<pre><span class="na">GOOGLE_ANALYTICS_ID</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">UA-XXXXXXXX-Y</span><span class="w">
|
<pre><code><span class="na">GOOGLE_ANALYTICS_ID</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><s>UA-XXXXXXXX-Y</s><span class="w">
|
||||||
</span><span class="na">GOOGLE_ANALYTICS_PROPERTY</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">'my custom code'</span>
|
</span><span class="na">GOOGLE_ANALYTICS_PROPERTY</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><s>'my custom code'</s></code></pre>
|
||||||
</pre>
|
|
||||||
<p>Don’t use this property unless you know what are you doing. By default,
|
<p>Don’t use this property unless you know what are you doing. By default,
|
||||||
it is set to <tt>auto</tt>.</p>
|
it is set to <span class="docutils literal">auto</span>.</p>
|
||||||
<p>To go deeper than this, please refer to <cite>Google-Analytics
|
<p>To go deeper than this, please refer to <cite>Google-Analytics
|
||||||
documentation</cite>.</p>
|
documentation</cite>.</p>
|
||||||
<hr class="docutils">
|
<hr class="docutils">
|
||||||
<p><strong>Copyright</strong> (c) 2015, Khaled Monsoor</p>
|
<p><strong>Copyright</strong> (c) 2015, Khaled Monsoor</p>
|
||||||
<p>All rights reserved.</p>
|
<p>All rights reserved.</p>
|
||||||
<p>Licensed under <cite>BSD</cite> license.</p>
|
<p>Licensed under <cite>BSD</cite> license.</p>
|
||||||
</div>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -140,40 +140,38 @@
|
||||||
<h2>Project Description</h2>
|
<h2>Project Description</h2>
|
||||||
|
|
||||||
<p>This plugin for <a href="https://www.getlektor.com" rel="nofollow">Lektor CMS</a> adds <a href="http://gulpjs.com" rel="nofollow">gulp</a> support to projects. When
|
<p>This plugin for <a href="https://www.getlektor.com" rel="nofollow">Lektor CMS</a> adds <a href="http://gulpjs.com" rel="nofollow">gulp</a> support to projects. When
|
||||||
enabled with the <tt><span class="pre">-f</span> gulp</tt> flag it runs <tt>npm install</tt> and then the
|
enabled with the <span class="docutils literal"><span class="pre">-f</span> gulp</span> flag it runs <span class="docutils literal">npm install</span> and then the
|
||||||
gulp <tt>default</tt> or <tt>watch</tt> tasks as they are defined into your own
|
gulp <span class="docutils literal">default</span> or <span class="docutils literal">watch</span> tasks as they are defined into your own
|
||||||
<tt>gulpfile.js</tt>.</p>
|
<span class="docutils literal">gulpfile.js</span>.</p>
|
||||||
<p>The general documentation about Lektor plugins is <a href="https://www.getlektor.com/docs/plugins/" rel="nofollow">here</a>.</p>
|
<p>The general documentation about Lektor plugins is <a href="https://www.getlektor.com/docs/plugins/" rel="nofollow">here</a>.</p>
|
||||||
<div class="section" id="lektor-build">
|
<section id="lektor-build">
|
||||||
<h2>lektor build</h2>
|
<h2>lektor build</h2>
|
||||||
<p>The command <tt>lektor build <span class="pre">-f</span> gulp</tt> runs the <strong>``default``</strong> gulp task,
|
<p>The command <span class="docutils literal">lektor build <span class="pre">-f</span> gulp</span> runs the <strong>``default``</strong> gulp task,
|
||||||
for example defined as something like:</p>
|
for example defined as something like:</p>
|
||||||
<pre>gulp.task('build', ['clean', 'copy', 'js', 'css', 'imagemin'], () => { });
|
<pre><code>gulp.task('build', ['clean', 'copy', 'js', 'css', 'imagemin'], () => { });
|
||||||
gulp.task('default', ['build'], () => { });
|
gulp.task('default', ['build'], () => { });</code></pre>
|
||||||
</pre>
|
<p>In the above example the <span class="docutils literal">default</span> task points to a <span class="docutils literal">build</span> task,
|
||||||
<p>In the above example the <tt>default</tt> task points to a <tt>build</tt> task,
|
|
||||||
which is usually composed by several other gulp tasks, etc.</p>
|
which is usually composed by several other gulp tasks, etc.</p>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="lektor-server">
|
<section id="lektor-server">
|
||||||
<h2>lektor server</h2>
|
<h2>lektor server</h2>
|
||||||
<p>The command <tt>lektor server <span class="pre">-f</span> gulp</tt> runs the Lektor embedded server on
|
<p>The command <span class="docutils literal">lektor server <span class="pre">-f</span> gulp</span> runs the Lektor embedded server on
|
||||||
<a href="http://localhost:5000" rel="nofollow">http://localhost:5000</a>, starting a gulp <strong>``watch``</strong> task in background.
|
<a href="http://localhost:5000" rel="nofollow">http://localhost:5000</a>, starting a gulp <strong>``watch``</strong> task in background.
|
||||||
For example, you can define something such as:</p>
|
For example, you can define something such as:</p>
|
||||||
<pre>gulp.task('watch', () => {
|
<pre><code>gulp.task('watch', () => {
|
||||||
gulp.watch('lib/js/**/*.js', ['js']);
|
gulp.watch('lib/js/**/*.js', ['js']);
|
||||||
gulp.watch('lib/css/**/*.css', ['css']);
|
gulp.watch('lib/css/**/*.css', ['css']);
|
||||||
});
|
});</code></pre>
|
||||||
</pre>
|
|
||||||
<p>In the above example, each time one touches Javascript or CSS files in
|
<p>In the above example, each time one touches Javascript or CSS files in
|
||||||
the <tt>lib/</tt> folder then assets could be minified, concatenated and
|
the <span class="docutils literal">lib/</span> folder then assets could be minified, concatenated and
|
||||||
copied into the standard <tt>assets/static/</tt> lektor folder, or whatever
|
copied into the standard <span class="docutils literal">assets/static/</span> lektor folder, or whatever
|
||||||
is defined into your own <tt>gulpfile.js</tt>.</p>
|
is defined into your own <span class="docutils literal">gulpfile.js</span>.</p>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="credits">
|
<section id="credits">
|
||||||
<h2>Credits</h2>
|
<h2>Credits</h2>
|
||||||
<p>This plugin is based on the official <a href="https://github.com/lektor/lektor-webpack-support" rel="nofollow">Webpack plugin</a> with very little
|
<p>This plugin is based on the official <a href="https://github.com/lektor/lektor-webpack-support" rel="nofollow">Webpack plugin</a> with very little
|
||||||
differences.</p>
|
differences.</p>
|
||||||
</div>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -134,28 +134,25 @@
|
||||||
<p>HTML minifier for Lektor that automatically minifies generated .html files.</p>
|
<p>HTML minifier for Lektor that automatically minifies generated .html files.</p>
|
||||||
<p>Uses <a href="https://github.com/mankyd/htmlmin" rel="nofollow">htmlmin</a> and looks for .html files,
|
<p>Uses <a href="https://github.com/mankyd/htmlmin" rel="nofollow">htmlmin</a> and looks for .html files,
|
||||||
minifying them as part of the build process.</p>
|
minifying them as part of the build process.</p>
|
||||||
<div class="section" id="installing">
|
<section id="installing">
|
||||||
<h2>Installing</h2>
|
<h2>Installing</h2>
|
||||||
<p>You can install the plugin with Lektor’s installer:</p>
|
<p>You can install the plugin with Lektor’s installer:</p>
|
||||||
<pre>lektor plugins add lektor-htmlmin
|
<pre>lektor plugins add lektor-htmlmin</pre>
|
||||||
</pre>
|
|
||||||
<p>Or by hand, adding the plugin to the packages section in your lektorproject file:</p>
|
<p>Or by hand, adding the plugin to the packages section in your lektorproject file:</p>
|
||||||
<pre>[packages]
|
<pre>[packages]
|
||||||
lektor-htmlmin = 1.0
|
lektor-htmlmin = 1.0</pre>
|
||||||
</pre>
|
</section>
|
||||||
</div>
|
<section id="usage">
|
||||||
<div class="section" id="usage">
|
|
||||||
<h2>Usage</h2>
|
<h2>Usage</h2>
|
||||||
<p>To enable minification, pass the <cite>htmlmin</cite> flag when starting the development
|
<p>To enable minification, pass the <cite>htmlmin</cite> flag when starting the development
|
||||||
server or when running a build:</p>
|
server or when running a build:</p>
|
||||||
<pre>lektor build -O my_build_folder -f htmlmin
|
<pre>lektor build -O my_build_folder -f htmlmin</pre>
|
||||||
</pre>
|
|
||||||
<p>When the flag is present, htmlmin will overwrite all HTML files in the output
|
<p>When the flag is present, htmlmin will overwrite all HTML files in the output
|
||||||
directory with their minified counterparts.</p>
|
directory with their minified counterparts.</p>
|
||||||
<p><em>Note:</em> The htmlmin plugin currently minifies every file in the project after a build.
|
<p><em>Note:</em> The htmlmin plugin currently minifies every file in the project after a build.
|
||||||
Not just files that have been changed. This should have no ill effects, but
|
Not just files that have been changed. This should have no ill effects, but
|
||||||
might increase build times if there are many files to minify.</p>
|
might increase build times if there are many files to minify.</p>
|
||||||
</div>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -118,11 +118,10 @@
|
||||||
<a href="https://lektor-make.readthedocs.io/en/latest/" rel="nofollow"><img alt="https://readthedocs.org/projects/lektor-make/badge/?version=latest" src="https://readthedocs.org/projects/lektor-make/badge/?version=latest"></a>
|
<a href="https://lektor-make.readthedocs.io/en/latest/" rel="nofollow"><img alt="https://readthedocs.org/projects/lektor-make/badge/?version=latest" src="https://readthedocs.org/projects/lektor-make/badge/?version=latest"></a>
|
||||||
<a href="https://pypi.org/project/lektor-make" rel="nofollow"><img alt="https://img.shields.io/pypi/v/lektor-make?color=success" src="https://img.shields.io/pypi/v/lektor-make?color=success"></a>
|
<a href="https://pypi.org/project/lektor-make" rel="nofollow"><img alt="https://img.shields.io/pypi/v/lektor-make?color=success" src="https://img.shields.io/pypi/v/lektor-make?color=success"></a>
|
||||||
<p>Lektor plugin to run <cite>make lektor</cite> for custom build systems.</p>
|
<p>Lektor plugin to run <cite>make lektor</cite> for custom build systems.</p>
|
||||||
<div class="section" id="install">
|
<section id="install">
|
||||||
<h2>Install</h2>
|
<h2>Install</h2>
|
||||||
<pre>python3 -m pip install lektor-make
|
<pre><code>python3 -m pip install lektor-make</code></pre>
|
||||||
</pre>
|
</section>
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -131,19 +131,13 @@
|
||||||
<p>This plugin adds filter for Markdown body excerpt.</p>
|
<p>This plugin adds filter for Markdown body excerpt.</p>
|
||||||
<p>## Enabling the Plugin</p>
|
<p>## Enabling the Plugin</p>
|
||||||
<p>To enable the plugin run this command:</p>
|
<p>To enable the plugin run this command:</p>
|
||||||
<p><tt>`ini
|
<p><span class="docutils literal">`ini $ lektor plugins add <span class="pre">markdown-excerpt</span> `</span></p>
|
||||||
$ lektor plugins add <span class="pre">markdown-excerpt</span>
|
|
||||||
`</tt></p>
|
|
||||||
<p>## In Templates</p>
|
<p>## In Templates</p>
|
||||||
<p>Plugin provides the <cite>|excerpt</cite> filter that can be used to render first
|
<p>Plugin provides the <cite>|excerpt</cite> filter that can be used to render first
|
||||||
paragraph of Markdown:</p>
|
paragraph of Markdown:</p>
|
||||||
<p><tt>`jinja
|
<p><span class="docutils literal">`jinja {{ post.body|excerpt }} `</span></p>
|
||||||
{{ post.body|excerpt }}
|
|
||||||
`</tt></p>
|
|
||||||
<p>It takes one optional argument which is the separator for the excerpt:</p>
|
<p>It takes one optional argument which is the separator for the excerpt:</p>
|
||||||
<p><tt>`jinja
|
<p><span class="docutils literal">`jinja {{ <span class="pre">post.body|excerpt:'\n\n##'</span> }} `</span></p>
|
||||||
{{ <span class="pre">post.body|excerpt:'\n\n##'</span> }}
|
|
||||||
`</tt></p>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -134,19 +134,13 @@
|
||||||
<p>This plugin adds support for Tawk to Lektor. Once the plugin is enabled a render_tawk function will render a Tawk Live Chat.</p>
|
<p>This plugin adds support for Tawk to Lektor. Once the plugin is enabled a render_tawk function will render a Tawk Live Chat.</p>
|
||||||
<p>## Enabling the Plugin</p>
|
<p>## Enabling the Plugin</p>
|
||||||
<p>To enable the plugin add this to your project file:</p>
|
<p>To enable the plugin add this to your project file:</p>
|
||||||
<p><tt>`
|
<p><span class="docutils literal">` $ lektor plugins add <span class="pre">lektor-tawk</span> `</span></p>
|
||||||
$ lektor plugins add <span class="pre">lektor-tawk</span>
|
|
||||||
`</tt></p>
|
|
||||||
<p>## Configuring the Plugin</p>
|
<p>## Configuring the Plugin</p>
|
||||||
<p>The plugin has a config file that is needed to inform it about your website. Just create a file named tawk.ini into your configs/ folder and configure the live_chat_code key with the ID if your Tawk:</p>
|
<p>The plugin has a config file that is needed to inform it about your website. Just create a file named tawk.ini into your configs/ folder and configure the live_chat_code key with the ID if your Tawk:</p>
|
||||||
<p><tt>`
|
<p><span class="docutils literal">` live_chat_code = your_live_chat_code `</span></p>
|
||||||
live_chat_code = your_live_chat_code
|
|
||||||
`</tt></p>
|
|
||||||
<p>## In Templates</p>
|
<p>## In Templates</p>
|
||||||
<p>Now you can render to any of your templates by just using the render_tawk function. Just calling it is enough to get the live chat:</p>
|
<p>Now you can render to any of your templates by just using the render_tawk function. Just calling it is enough to get the live chat:</p>
|
||||||
<p><tt>`
|
<p><span class="docutils literal">` <span class="pre"><div>{{</span> render_tawk <span class="pre">}}</div></span> `</span></p>
|
||||||
<span class="pre"><div>{{</span> render_tawk <span class="pre">}}</div></span>
|
|
||||||
`</tt></p>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -132,23 +132,20 @@
|
||||||
|
|
||||||
<p>This plugin adds support for <a href="https://metrica.yandex.com" rel="nofollow">Yandex Metrica</a>
|
<p>This plugin adds support for <a href="https://metrica.yandex.com" rel="nofollow">Yandex Metrica</a>
|
||||||
to <a href="https://www.getlektor.com" rel="nofollow">Lektor CMS</a></p>
|
to <a href="https://www.getlektor.com" rel="nofollow">Lektor CMS</a></p>
|
||||||
<div class="section" id="enabling-the-plugin">
|
<section id="enabling-the-plugin">
|
||||||
<h2>Enabling the Plugin</h2>
|
<h2>Enabling the Plugin</h2>
|
||||||
<pre>lektor plugins add lektor-yandex-metrica
|
<pre><code>lektor plugins add lektor-yandex-metrica</code></pre>
|
||||||
</pre>
|
</section>
|
||||||
</div>
|
<section id="configuring-the-plugin">
|
||||||
<div class="section" id="configuring-the-plugin">
|
|
||||||
<h2>Configuring the Plugin</h2>
|
<h2>Configuring the Plugin</h2>
|
||||||
<p>Just create a file named <code>yandex-metrica.ini</code> in your <code>configs/</code> folder and configure <code>id</code> key with the provided counter id:</p>
|
<p>Just create a file named <code>yandex-metrica.ini</code> in your <code>configs/</code> folder and configure <code>id</code> key with the provided counter id:</p>
|
||||||
<pre><span class="na">id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">YOUR_COUNTER_ID</span>
|
<pre><code><span class="na">id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><s>YOUR_COUNTER_ID</s></code></pre>
|
||||||
</pre>
|
</section>
|
||||||
</div>
|
<section id="in-templates">
|
||||||
<div class="section" id="in-templates">
|
|
||||||
<h2>In Templates</h2>
|
<h2>In Templates</h2>
|
||||||
<p>Now you can add a Yandex Metrica counter to any of your templates by just using the <code>generate_yandex_metrica</code> function in its tag as below.</p>
|
<p>Now you can add a Yandex Metrica counter to any of your templates by just using the <code>generate_yandex_metrica</code> function in its tag as below.</p>
|
||||||
<pre>{{ generate_yandex_metrica() }}
|
<pre><code>{{ generate_yandex_metrica() }}</code></pre>
|
||||||
</pre>
|
</section>
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue