Updated installation docs

This commit is contained in:
Armin Ronacher 2015-12-21 13:22:49 +01:00
parent cf1e4f5e2e
commit 736f53e4cb
6 changed files with 29 additions and 19 deletions

View File

@ -1,4 +1,4 @@
!function(t){function e(i){if(n[i])return n[i].exports;var o=n[i]={exports:{},id:i,loaded:!1};return t[i].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){(function(t){"use strict";function e(t){if(document.body.createTextRange){var e=document.body.createTextRange();e.moveToElementText(t),e.select()}else if(window.getSelection){var n=window.getSelection(),e=document.createRange();e.selectNodeContents(t),n.removeAllRanges(),n.addRange(e)}}function i(){var e=t(".download-btn");e.length<=0||(e.hide(),t.ajax({method:"GET",url:"https://api.github.com/repos/lektor/lektor/releases",crossDomain:!0}).then(function(t){r(e.toArray(),t)},function(){e.show()}))}function o(t){var e=null,n=null;if(navigator.platform.match(/^mac/i)&&(e=/\.dmg$/,n="For OSX 10.9 and later."),null!=e)for(var i=0;i<t.length;i++)if(t[i].name.match(e))return{url:t[i].browser_download_url,note:n};return null}function r(e,n){var i=n[0].tag_name,r="/downloads/",s=o(n[0].assets);e.forEach(function(e){var n=t('<div class="note"></div>').appendTo(e),o=t("a",e);s?(o.attr("href",s.url),n.append(t("<span></span>").text(s.note+" ")),n.append(t("<a>Other platforms</a>").attr("href",r))):o.attr("href",r),o.append(t('<span class="version"></span>').text(i)),t(e).fadeIn("slow")})}function s(){var n=t(".install-row pre");n.length>0&&n.on("dblclick",function(){e(this)})}function a(){var e=t(".google-custom-search");if(0!=e.length){var n="012722186170730423054:utwznhnrrmi",i=document.createElement("script");i.type="text/javascript",i.async=!0,i.src=("https:"==document.location.protocol?"https:":"http:")+"//cse.google.com/cse.js?cx="+n;var o=document.getElementsByTagName("script")[0];o.parentNode.insertBefore(i,o),t('\n <gcse:searchresults-only linktarget="_parent"></gcse:searchresults-only>\n ').appendTo(e),t('\n <div style="display: none">\n <div id="base_webResult">\n <div class="gs-webResult gs-result"\n data-vars="{\n longUrl: function() {\n var i = unescapedUrl.indexOf(visibleUrl);\n return i < 1 ? visibleUrl : unescapedUrl.substring(i);\n },\n processSearchTitle: function(title) {\n return title.split(\' | \').slice(0, -2).join(\' | \') || \'Documentation\';\n }\n }">\n <div class="gs-title">\n <a class="gs-title" data-attr="{href:unescapedUrl, target:target}"\n data-body="html(processSearchTitle(title))"></a>\n </div>\n <div class="gs-visibleUrl gs-visibleUrl-long" data-body="longUrl()"></div>\n <div class="gs-snippet" data-body="html(content)"></div>\n </div>\n </div>\n </div>\n ').appendTo(e);var r=l.parse(location.search);r.q&&t('input[name="q"]',e).val(r.q)}}n(2);var l=n(15);t(function(){i(),s(),a()})}).call(e,n(1))},function(t,e,n){var i,o;/*!
!function(t){function e(i){if(n[i])return n[i].exports;var o=n[i]={exports:{},id:i,loaded:!1};return t[i].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){(function(t){"use strict";function e(t){if(document.body.createTextRange){var e=document.body.createTextRange();e.moveToElementText(t),e.select()}else if(window.getSelection){var n=window.getSelection(),e=document.createRange();e.selectNodeContents(t),n.removeAllRanges(),n.addRange(e)}}function i(){var e=t(".download-btn");e.length<=0||(e.hide(),t.ajax({method:"GET",url:"https://api.github.com/repos/lektor/lektor/releases",crossDomain:!0}).then(function(t){r(e.toArray(),t)},function(){e.show()}))}function o(t){var e=null,n=null;if(navigator.platform.match(/^mac/i)&&(e=/\.dmg$/,n="For OSX 10.9 and later."),null!=e)for(var i=0;i<t.length;i++)if(t[i].name.match(e))return{url:t[i].browser_download_url,note:n};return null}function r(e,n){var i=n[0].tag_name,r="/downloads/",s=o(n[0].assets);e.forEach(function(e){var n=t('<div class="note"></div>').appendTo(e),o=t("a",e);s?(o.attr("href",s.url),n.append(t("<span></span>").text(s.note+" ")),n.append(t("<a>Other platforms</a>").attr("href",r))):o.attr("href",r),o.append(t('<span class="version"></span>').text(i)),t(e).fadeIn("slow")})}function s(){var n=t(".install-row pre");n.length>0&&n.on("dblclick",function(){e(this)})}function a(){var e=t(".google-custom-search");if(0!=e.length){var n="012722186170730423054:utwznhnrrmi",i=document.createElement("script");i.type="text/javascript",i.async=!0,i.src=("https:"==document.location.protocol?"https:":"http:")+"//cse.google.com/cse.js?cx="+n;var o=document.getElementsByTagName("script")[0];o.parentNode.insertBefore(i,o),t('\n <gcse:searchresults-only linktarget="_parent"></gcse:searchresults-only>\n ').appendTo(e),t('\n <div style="display: none">\n <div id="base_webResult">\n <div class="gs-webResult gs-result"\n data-vars="{\n longUrl: function() {\n var i = unescapedUrl.indexOf(visibleUrl);\n return i < 1 ? visibleUrl : unescapedUrl.substring(i);\n },\n processSearchTitle: function(title) {\n return title.split(\' | \').slice(0, -2).join(\' | \') || \'Documentation\';\n }\n }">\n <div class="gs-title">\n <a class="gs-title" data-attr="{href:unescapedUrl, target:target}"\n data-body="html(processSearchTitle(title))"></a>\n </div>\n <div class="gs-visibleUrl gs-visibleUrl-long" data-body="longUrl()"></div>\n <div class="gs-snippet" data-body="html(content)"></div>\n </div>\n </div>\n </div>\n ').appendTo(e);var r=c.parse(location.search);r.q&&t('input[name="q"]',e).val(r.q)}}function l(){navigator.appVersion.indexOf("Win")>=0&&t(".hide-for-windows").hide()}n(2);var c=n(15);t(function(){i(),s(),a(),l()})}).call(e,n(1))},function(t,e,n){var i,o;/*!
* jQuery JavaScript Library v2.1.4
* http://jquery.com/
*

View File

@ -1 +1 @@
{"version":3,"file":"app.js","sources":["webpack:///app.js","webpack:///"],"mappings":"AAAA;;;;;;;;;;;;;ACwLA;;;;;;;;;;AAqiBA;AAqpHA;AAkgIA;AAg3EA","sourceRoot":""}
{"version":3,"file":"app.js","sources":["webpack:///app.js","webpack:///"],"mappings":"AAAA;;;;;;;;;;;;;AC+LA;;;;;;;;;;AAqiBA;AAqpHA;AAkgIA;AAg3EA","sourceRoot":""}

View File

@ -40,7 +40,7 @@ contents:
</ul>
</div>
</div>
<div class="install-row">
<div class="install-row hide-for-windows">
<pre>curl -sf https://www.getlektor.com/install.sh | sh</pre>
</div>
</div>

View File

@ -32,15 +32,19 @@ You need to make sure you have the following software installed on your computer
* Python 2.7 (**not** Python 3.x)
* ImageMagick (`brew install imagemagick` or `apt-get install imagemagick`
can get you this on OS X and Ubuntu respectively, on Windows do `choco install imagemagick`, which requires [chocolatey :ext](https://chocolatey.org/), or download from [here :ext](http://www.imagemagick.org))
can get you this on OS X and Ubuntu respectively, on Windows do `choco
install imagemagick`, which requires [chocolatey :ext](https://chocolatey.org/),
or [download from here :ext](http://www.imagemagick.org)).
Once you have that installed and made sure that they are on your `PATH` you can get Lektor installed with our
installation script:
Once you have that installed and made sure that they are on your `PATH` you can
get Lektor installed with our installation script:
```
$ curl -sf https://www.getlektor.com/install.sh | sh
```
For Windows you can use the `command prompt`:
```
C:\> @powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://getlektor.com/install.ps1'))" && SET PATH=%PATH%;%LocalAppData%\lektor-cli
```

View File

@ -22,32 +22,31 @@ are equally well supported.
## Command Line Interface
If you are on Linux or Mac you can install the command line version of
Lektor by copy/pasting a command into your terminal:
Lektor by copy/pasting a command into your terminal.
### Mac/Linux
This will install Lektor for you but you might have to run it with `sudo` if
your current user does not have rights to write into `/usr/local`.
```
curl -sf https://www.getlektor.com/install.sh | sh
```
### Windows
If you are on Windows copy/paste this command into the `command prompt`:
```
@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://getlektor.com/install.ps1'))" && SET PATH=%PATH%;%LocalAppData%\lektor-cli
```
alternatively use this command in your `Powershell`:
```
iex ((new-object net.webclient).DownloadString('https://getlektor.com/install.ps1'))
```
The command line application is written in Python and the current releases
can be found on PyPI: [pypi/Lektor](http://pypi.python.org/pypi/Lektor).
If you know Python, you can also pip install it:
```
pip install Lektor
```
This will install Lektor for you. You might have to run it with `sudo` if
your current user does not have rights to write into `/usr/local`.
## Desktop Application
If you are on OS X you are in luck because you can use an installable

View File

@ -136,8 +136,15 @@ function initGoogleSearch() {
}
}
function hideThingsForWindows() {
if (navigator.appVersion.indexOf('Win') >= 0) {
$('.hide-for-windows').hide();
}
}
$(function() {
initDownloadButton();
initInstallRow();
initGoogleSearch();
hideThingsForWindows();
});