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">
|
||||
<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">
|
||||
|
||||
|
@ -210,11 +210,11 @@ be completely customized.</p>
|
|||
</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="sr-only">Previous</span>
|
||||
</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="sr-only">Next</span>
|
||||
</a>
|
||||
|
|
|
@ -131,59 +131,56 @@
|
|||
<h2>Project Description</h2>
|
||||
|
||||
<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
|
||||
is available to be included in target <tt>template</tt> which automatically
|
||||
<p>Once the plugin is enabled, a <span class="docutils literal">generate_google_analytics()</span> function
|
||||
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
|
||||
<tt>Lektor</tt>.</p>
|
||||
<div class="section" id="basic-usage">
|
||||
<span class="docutils literal">Lektor</span>.</p>
|
||||
<section id="basic-usage">
|
||||
<h2>Basic Usage</h2>
|
||||
<div class="section" id="enabling-the-plugin">
|
||||
<section id="enabling-the-plugin">
|
||||
<h3>Enabling the Plugin</h3>
|
||||
<p>To enable the plugin add this to your project file:</p>
|
||||
<pre><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>
|
||||
</pre>
|
||||
</div>
|
||||
<div class="section" id="configuring-the-plugin">
|
||||
<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><s>0.1</s></code></pre>
|
||||
</section>
|
||||
<section id="configuring-the-plugin">
|
||||
<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>
|
||||
<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
|
||||
<tt>GOOGLE_ANALYTICS_ID</tt> key with target property ID of form
|
||||
<tt><span class="pre">UA-XXXXXXXX-Y</span></tt> 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>
|
||||
</div>
|
||||
<div class="section" id="using-in-templates">
|
||||
<span class="docutils literal">GOOGLE_ANALYTICS_ID</span> key with target property ID of form
|
||||
<span class="docutils literal"><span class="pre">UA-XXXXXXXX-Y</span></span> which you obtained from:</p>
|
||||
<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>
|
||||
</section>
|
||||
<section id="using-in-templates">
|
||||
<h3>Using in Templates</h3>
|
||||
<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>
|
||||
<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>
|
||||
<p>That’s it. All the <tt>HTML</tt> files that rendered from that template will
|
||||
just calling the <span class="docutils literal">generate_google_analytics</span> function inside its <span class="docutils literal"><body> </body></span> tags.</p>
|
||||
<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>
|
||||
<p>That’s it. All the <span class="docutils literal">HTML</span> files that rendered from that template will
|
||||
include Google-Analytics code automatically.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="advanced">
|
||||
</section>
|
||||
</section>
|
||||
<section id="advanced">
|
||||
<h2>Advanced</h2>
|
||||
<dl>
|
||||
<dt>You can use <tt>GOOGLE_ANALYTICS_PROPERTY</tt> property to include your</dt>
|
||||
<dd>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>
|
||||
<dl class="simple">
|
||||
<dt>You can use <span class="docutils literal">GOOGLE_ANALYTICS_PROPERTY</span> property to include your</dt>
|
||||
<dd><p>custom-built Google Analytics tracking code. In that case, your
|
||||
<span class="docutils literal"><span class="pre">./configs/google-analytics.ini</span></span> will look like this:</p>
|
||||
</dd>
|
||||
</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">
|
||||
</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>
|
||||
</pre>
|
||||
<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><s>'my custom code'</s></code></pre>
|
||||
<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
|
||||
documentation</cite>.</p>
|
||||
<hr class="docutils">
|
||||
<p><strong>Copyright</strong> (c) 2015, Khaled Monsoor</p>
|
||||
<p>All rights reserved.</p>
|
||||
<p>Licensed under <cite>BSD</cite> license.</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -140,40 +140,38 @@
|
|||
<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
|
||||
enabled with the <tt><span class="pre">-f</span> gulp</tt> flag it runs <tt>npm install</tt> and then the
|
||||
gulp <tt>default</tt> or <tt>watch</tt> tasks as they are defined into your own
|
||||
<tt>gulpfile.js</tt>.</p>
|
||||
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 <span class="docutils literal">default</span> or <span class="docutils literal">watch</span> tasks as they are defined into your own
|
||||
<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>
|
||||
<div class="section" id="lektor-build">
|
||||
<section id="lektor-build">
|
||||
<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>
|
||||
<pre>gulp.task('build', ['clean', 'copy', 'js', 'css', 'imagemin'], () => { });
|
||||
gulp.task('default', ['build'], () => { });
|
||||
</pre>
|
||||
<p>In the above example the <tt>default</tt> task points to a <tt>build</tt> task,
|
||||
<pre><code>gulp.task('build', ['clean', 'copy', 'js', 'css', 'imagemin'], () => { });
|
||||
gulp.task('default', ['build'], () => { });</code></pre>
|
||||
<p>In the above example the <span class="docutils literal">default</span> task points to a <span class="docutils literal">build</span> task,
|
||||
which is usually composed by several other gulp tasks, etc.</p>
|
||||
</div>
|
||||
<div class="section" id="lektor-server">
|
||||
</section>
|
||||
<section id="lektor-server">
|
||||
<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.
|
||||
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/css/**/*.css', ['css']);
|
||||
});
|
||||
</pre>
|
||||
});</code></pre>
|
||||
<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
|
||||
copied into the standard <tt>assets/static/</tt> lektor folder, or whatever
|
||||
is defined into your own <tt>gulpfile.js</tt>.</p>
|
||||
</div>
|
||||
<div class="section" id="credits">
|
||||
the <span class="docutils literal">lib/</span> folder then assets could be minified, concatenated and
|
||||
copied into the standard <span class="docutils literal">assets/static/</span> lektor folder, or whatever
|
||||
is defined into your own <span class="docutils literal">gulpfile.js</span>.</p>
|
||||
</section>
|
||||
<section id="credits">
|
||||
<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
|
||||
differences.</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -134,28 +134,25 @@
|
|||
<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,
|
||||
minifying them as part of the build process.</p>
|
||||
<div class="section" id="installing">
|
||||
<section id="installing">
|
||||
<h2>Installing</h2>
|
||||
<p>You can install the plugin with Lektor’s installer:</p>
|
||||
<pre>lektor plugins add lektor-htmlmin
|
||||
</pre>
|
||||
<pre>lektor plugins add lektor-htmlmin</pre>
|
||||
<p>Or by hand, adding the plugin to the packages section in your lektorproject file:</p>
|
||||
<pre>[packages]
|
||||
lektor-htmlmin = 1.0
|
||||
</pre>
|
||||
</div>
|
||||
<div class="section" id="usage">
|
||||
lektor-htmlmin = 1.0</pre>
|
||||
</section>
|
||||
<section id="usage">
|
||||
<h2>Usage</h2>
|
||||
<p>To enable minification, pass the <cite>htmlmin</cite> flag when starting the development
|
||||
server or when running a build:</p>
|
||||
<pre>lektor build -O my_build_folder -f htmlmin
|
||||
</pre>
|
||||
<pre>lektor build -O my_build_folder -f htmlmin</pre>
|
||||
<p>When the flag is present, htmlmin will overwrite all HTML files in the output
|
||||
directory with their minified counterparts.</p>
|
||||
<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
|
||||
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://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>
|
||||
<div class="section" id="install">
|
||||
<section id="install">
|
||||
<h2>Install</h2>
|
||||
<pre>python3 -m pip install lektor-make
|
||||
</pre>
|
||||
</div>
|
||||
<pre><code>python3 -m pip install lektor-make</code></pre>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -131,19 +131,13 @@
|
|||
<p>This plugin adds filter for Markdown body excerpt.</p>
|
||||
<p>## Enabling the Plugin</p>
|
||||
<p>To enable the plugin run this command:</p>
|
||||
<p><tt>`ini
|
||||
$ lektor plugins add <span class="pre">markdown-excerpt</span>
|
||||
`</tt></p>
|
||||
<p><span class="docutils literal">`ini $ lektor plugins add <span class="pre">markdown-excerpt</span> `</span></p>
|
||||
<p>## In Templates</p>
|
||||
<p>Plugin provides the <cite>|excerpt</cite> filter that can be used to render first
|
||||
paragraph of Markdown:</p>
|
||||
<p><tt>`jinja
|
||||
{{ post.body|excerpt }}
|
||||
`</tt></p>
|
||||
<p><span class="docutils literal">`jinja {{ post.body|excerpt }} `</span></p>
|
||||
<p>It takes one optional argument which is the separator for the excerpt:</p>
|
||||
<p><tt>`jinja
|
||||
{{ <span class="pre">post.body|excerpt:'\n\n##'</span> }}
|
||||
`</tt></p>
|
||||
<p><span class="docutils literal">`jinja {{ <span class="pre">post.body|excerpt:'\n\n##'</span> }} `</span></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>## Enabling the Plugin</p>
|
||||
<p>To enable the plugin add this to your project file:</p>
|
||||
<p><tt>`
|
||||
$ lektor plugins add <span class="pre">lektor-tawk</span>
|
||||
`</tt></p>
|
||||
<p><span class="docutils literal">` $ lektor plugins add <span class="pre">lektor-tawk</span> `</span></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><tt>`
|
||||
live_chat_code = your_live_chat_code
|
||||
`</tt></p>
|
||||
<p><span class="docutils literal">` live_chat_code = your_live_chat_code `</span></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><tt>`
|
||||
<span class="pre"><div>{{</span> render_tawk <span class="pre">}}</div></span>
|
||||
`</tt></p>
|
||||
<p><span class="docutils literal">` <span class="pre"><div>{{</span> render_tawk <span class="pre">}}</div></span> `</span></p>
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -132,23 +132,20 @@
|
|||
|
||||
<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>
|
||||
<div class="section" id="enabling-the-plugin">
|
||||
<section id="enabling-the-plugin">
|
||||
<h2>Enabling the Plugin</h2>
|
||||
<pre>lektor plugins add lektor-yandex-metrica
|
||||
</pre>
|
||||
</div>
|
||||
<div class="section" id="configuring-the-plugin">
|
||||
<pre><code>lektor plugins add lektor-yandex-metrica</code></pre>
|
||||
</section>
|
||||
<section id="configuring-the-plugin">
|
||||
<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>
|
||||
<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>
|
||||
</div>
|
||||
<div class="section" id="in-templates">
|
||||
<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>
|
||||
</section>
|
||||
<section id="in-templates">
|
||||
<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>
|
||||
<pre>{{ generate_yandex_metrica() }}
|
||||
</pre>
|
||||
</div>
|
||||
<pre><code>{{ generate_yandex_metrica() }}</code></pre>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue