From 36a41cd22424f5cca95e11403e91114f01f67542 Mon Sep 17 00:00:00 2001 From: chrisfinazzo Date: Mon, 19 Oct 2015 12:06:46 -0400 Subject: [PATCH 1/3] Typos and line wrapping --- site/_docs/configuration.md | 4 ++-- site/_docs/contributing.md | 2 +- site/_docs/deployment-methods.md | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/site/_docs/configuration.md b/site/_docs/configuration.md index ffbef8a4..fb7cd2f3 100644 --- a/site/_docs/configuration.md +++ b/site/_docs/configuration.md @@ -653,8 +653,8 @@ class Jekyll::Converters::Markdown::MyCustomProcessor end {% endhighlight %} -Once you've created your class and have it properly setup either as a plugin in -the `_plugins` folder or as a gem, specify it in your `_config.yml`: +Once you've created your class and have it properly set up either as a plugin +in the `_plugins` folder or as a gem, specify it in your `_config.yml`: {% highlight yaml %} markdown: MyCustomProcessor diff --git a/site/_docs/contributing.md b/site/_docs/contributing.md index ae768e5b..4728e96e 100644 --- a/site/_docs/contributing.md +++ b/site/_docs/contributing.md @@ -43,7 +43,7 @@ Test Dependencies ----------------- To run the test suite and build the gem you'll need to install Jekyll's -dependencies. Simply run this command to get all setup: +dependencies. Simply run this command to get all set up: $ script/bootstrap diff --git a/site/_docs/deployment-methods.md b/site/_docs/deployment-methods.md index c1040b2b..1fb0c64c 100644 --- a/site/_docs/deployment-methods.md +++ b/site/_docs/deployment-methods.md @@ -112,7 +112,7 @@ That's why rrsync wrapper shall be installed. If it is not already installed by - Put it to the bin subdirectory of your home folder (```~/bin```) - Make it executable (```chmod +x```) -#### Step 2: Setup certificate-based ssh access (server side) +#### Step 2: Set up certificate-based ssh access (server side) [This process is described in a lot of places in the net](https://wiki.gentoo.org/wiki/SSH#Passwordless_Authentication). We will not cover it here. What is different from usual approach is to put the restriction to certificate-based authorization in ```~/.ssh/authorized_keys```). We will launch ```rrsync``` utility and supply it with the folder it shall have read-write access to: From 056abdf8997c4739336d14b813ebfd075f1c604e Mon Sep 17 00:00:00 2001 From: chrisfinazzo Date: Tue, 10 Nov 2015 22:17:20 -0500 Subject: [PATCH 2/3] Improve readability of rrsync instructions, update deploy scripts --- site/_docs/deployment-methods.md | 65 +++++++++++++++++++------------- 1 file changed, 39 insertions(+), 26 deletions(-) diff --git a/site/_docs/deployment-methods.md b/site/_docs/deployment-methods.md index 1fb0c64c..9bbc63fa 100644 --- a/site/_docs/deployment-methods.md +++ b/site/_docs/deployment-methods.md @@ -102,64 +102,77 @@ Once you’ve generated the `_site` directory, you can easily scp it using a `ta Once you’ve generated the `_site` directory, you can easily rsync it using a `tasks/deploy` shell script similar to [this deploy script here](https://github.com/vitalyrepin/vrepinblog/blob/master/transfer.sh). You’d obviously need to change the values to reflect your site’s details. +Certificate-based authorization is another way to simplify the publishing +process. It makes sense to restrict rsync access only to the directory which it is supposed to sync. This can be done using rrsync. + #### Step 1: Install rrsync to your home folder (server-side) -We will use certificate-based authorization to simplify the publishing process. It makes sense to restrict rsync access only to the directory which it is supposed to sync. +If it is not already installed by your host, you can do it yourself: -That's why rrsync wrapper shall be installed. If it is not already installed by your hoster you can do it yourself: +- [Download rrsync](http://ftp.samba.org/pub/unpacked/rsync/support/rrsync) +- Place it in the `bin` subdirectory of your home folder (`~/bin`) +- Make it executable (`chmod +x`) -- [download rrsync](http://ftp.samba.org/pub/unpacked/rsync/support/rrsync) -- Put it to the bin subdirectory of your home folder (```~/bin```) -- Make it executable (```chmod +x```) +#### Step 2: Set up certificate-based SSH access (server side) -#### Step 2: Set up certificate-based ssh access (server side) +This [process](https://wiki.gentoo.org/wiki/SSH#Passwordless_Authentication) is +described in several places online. What is different from the typical approach +is to put the restriction to certificate-based authorization in +```~/.ssh/authorized_keys```. Then, aunch `rrsync` and supply +it with the folder it shall have read-write access to: -[This process is described in a lot of places in the net](https://wiki.gentoo.org/wiki/SSH#Passwordless_Authentication). We will not cover it here. What is different from usual approach is to put the restriction to certificate-based authorization in ```~/.ssh/authorized_keys```). We will launch ```rrsync``` utility and supply it with the folder it shall have read-write access to: - -``` +{% highlight bash %} command="$HOME/bin/rrsync ",no-agent-forwarding,no-port-forwarding,no-pty,no-user-rc,no-X11-forwarding ssh-rsa -``` +{% endhighlight %} `````` is the path to your site. E.g., ```~/public_html/you.org/blog-html/```. -#### Step 3: Rsync! (client-side) +#### Step 3: Rsync (client-side) -Add the script ```deploy``` to the web site source folder: +Add the `deploy` script to the site source folder: {% highlight bash %} #!/bin/sh -rsync -avr --rsh='ssh -p2222' --delete-after --delete-excluded @: +rsync -crvz --rsh=ssh -p2222' --delete-after --delete-excluded @: {% endhighlight %} Command line parameters are: -- ```--rsh='ssh -p2222'``` It is needed if your hoster provides ssh access using ssh port different from default one (e.g., this is what hostgator is doing) -- `````` is the name of the local folder with generated web content. By default it is ```_site/``` for Jekyll -- `````` — ssh user name for your hosting account -- `````` — your hosting server +- ````--rsh=ssh -p2222```` — The port for SSH access. It is required if +your host uses a different port than the default (e.g, HostGator) +- `` — The name of the local output folder (defaults to `_site`) +- `` — The username for your hosting account +- `` — Your hosting server -Example command line is: +Using this setup, you might run the following command: {% highlight bash %} -rsync -avr --rsh='ssh -p2222' --delete-after --delete-excluded _site/ hostuser@vrepin.org: +rsync -crvz --rsh='ssh -p2222' --delete-after --delete-excluded _site/ hostuser@example.org: {% endhighlight %} -Don't forget column ':' after server name! +Don't forget the column `:` after server name! -#### Optional step 4: exclude transfer.sh from being copied to the output folder by Jekyll +#### Step 4 (Optional): Exclude the transfer script from being copied to the output folder. -This step is recommended if you use this how-to to deploy Jekyll-based web site. If you put ```deploy``` script to the root folder of your project, Jekyll copies it to the output folder. -This behavior can be changed in ```_config.yml```. Just add the following line there: +This step is recommended if you use these instructions to deploy your site. If +you put the `deploy` script in the root folder of your project, Jekyll will +copy it to the output folder. This behavior can be changed in `_config.yml`. + +Just add the following line: {% highlight yaml %} -# Do not copy these file to the output directory +# Do not copy these files to the output directory exclude: ["deploy"] {% endhighlight %} -#### We are done! +Alternatively, you can use an `rsync-exclude.txt` file to control which files will be transferred to your server. -Now it's possible to publish your web site by launching ```deploy``` script. If your ssh certificate is [passphrase-protected](https://martin.kleppmann.com/2013/05/24/improving-security-of-ssh-private-keys.html), you are asked to enter the password. +#### Done! + +Now it's possible to publish your website simply by running the `deploy` +script. If your SSH certificate is [passphrase-protected](https://martin.kleppmann.com/2013/05/24/improving-security-of-ssh-private-keys.html), you will be asked to enter it when the +script executes. ## Rack-Jekyll From 4a91bb669c1339a786aeb8cb88452009f31c43a7 Mon Sep 17 00:00:00 2001 From: chrisfinazzo Date: Wed, 11 Nov 2015 20:33:44 -0500 Subject: [PATCH 3/3] Fix a typo, use single backticks for inline code examples --- site/_docs/deployment-methods.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/site/_docs/deployment-methods.md b/site/_docs/deployment-methods.md index 9bbc63fa..51a3a5b2 100644 --- a/site/_docs/deployment-methods.md +++ b/site/_docs/deployment-methods.md @@ -118,14 +118,14 @@ If it is not already installed by your host, you can do it yourself: This [process](https://wiki.gentoo.org/wiki/SSH#Passwordless_Authentication) is described in several places online. What is different from the typical approach is to put the restriction to certificate-based authorization in -```~/.ssh/authorized_keys```. Then, aunch `rrsync` and supply +`~/.ssh/authorized_keys`. Then, launch `rrsync` and supply it with the folder it shall have read-write access to: {% highlight bash %} command="$HOME/bin/rrsync ",no-agent-forwarding,no-port-forwarding,no-pty,no-user-rc,no-X11-forwarding ssh-rsa {% endhighlight %} -`````` is the path to your site. E.g., ```~/public_html/you.org/blog-html/```. +`` is the path to your site. E.g., `~/public_html/you.org/blog-html/`. #### Step 3: Rsync (client-side) @@ -139,7 +139,7 @@ rsync -crvz --rsh=ssh -p2222' --delete-after --delete-excluded Command line parameters are: -- ````--rsh=ssh -p2222```` — The port for SSH access. It is required if +- `--rsh=ssh -p2222` — The port for SSH access. It is required if your host uses a different port than the default (e.g, HostGator) - `` — The name of the local output folder (defaults to `_site`) - `` — The username for your hosting account