octopress 3.0.7 → 3.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a1ecf013c475993247a4e21ebf6a200049643836
4
- data.tar.gz: 6c3bfa0c82d3e731c0f47d7773b0cea0b882bdc7
3
+ metadata.gz: 863a0a4ca9a73f9fd15fafbc507522a47b98f702
4
+ data.tar.gz: 50fd4475631a81a88de3c3955fb045e1918daa9a
5
5
  SHA512:
6
- metadata.gz: 99d7ccb18b1b4c258c06f5347d4b6184664457e478719e533a6c1cff579d38400fc13aecb5ff15183672ae3ccc18f630823c9f996ddb5633e7866f75a25b0888
7
- data.tar.gz: 13f9b04aa05cd35200bbf414edc53e638e91442482db37519c3ada28cb088959bf64662ee5b1b4a1d8c779c6fd0b27d4cb8877b2ff82a7518b1dacb81f0e15b6
6
+ metadata.gz: 6513217c9a43eaccd6affd8d2d866f71551cdc35a05e9cf68dd469a3fe7739c88a433f9c5d3c499533aff065500674c8bbd599e35573471f46c94e800da6582b
7
+ data.tar.gz: 233589e28d6eb546f156bb42d2bd3b0c0e3725279863929a3e3bdc62ebf16088ae97ce022f25feab9e9b4c1ddec636cead8c0aa0173130eac34862b0d848adf0
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ### 3.0.8 (2015-06-18)
4
+ - Added documentation for Octopress's deploy project.
5
+
3
6
  ### 3.0.7 (2015-06-01)
4
7
  - Fixed a bug where pages templates would only show dates if the `new page` command included a `--date` option. Now if a template has a date, the new page will have a date.
5
8
 
data/README.md CHANGED
@@ -19,7 +19,30 @@ Or install it yourself as:
19
19
 
20
20
  $ gem install octopress
21
21
 
22
- ## Octopress Commands
22
+ ## Configuration
23
+
24
+ Octopress reads its configurations from `_config.yml`. Here's what the configuration looks like by default.
25
+
26
+ ```yaml
27
+ # Default extension for new posts and pages
28
+ post_ext: markdown
29
+ page_ext: html
30
+
31
+ # Default templates for posts and pages
32
+ # Found in _templates/
33
+ post_layout: post
34
+ page_layout: page
35
+
36
+ # Format titles with titlecase?
37
+ titlecase: true
38
+
39
+ # Change default template file (in _templates/)
40
+ post_template: post
41
+ page_template: page
42
+ draft_template: draft
43
+ ```
44
+
45
+ ## Octopress CLI Commands
23
46
 
24
47
  Here are the subcommands for Octopress.
25
48
 
@@ -33,7 +56,7 @@ publish <POST> # Publish a draft from _drafts to _posts
33
56
  unpublish <POST> # Search for a post and convert it into a draft
34
57
  isolate [POST] # Stash all posts but the one you're working on for a faster build
35
58
  integrate # Restores all posts, doing the opposite of the isolate command
36
- deploy # deploy your site via S3, Cloudfront, Rsync, or to GitHub pages.
59
+ deploy # deploy your site via S3, Rsync, or to GitHub pages.
37
60
  ```
38
61
 
39
62
  Run `octopress --help` to list sub commands and `octopress <subcommand> --help` to learn more about any subcommand and see its options.
@@ -208,7 +231,7 @@ In the second example, I'm passing the full template file path. This way I can u
208
231
 
209
232
  When creating templates, file name extensions are unnecessary since the files are just plain text anyway.
210
233
 
211
- ## Isolate
234
+ ### Isolate
212
235
 
213
236
  The `isolate` command will allow you to stash posts in `_posts/_exile` where they will be ignored by Jekyll during the build process.
214
237
  Run `octopress integrate` to restore all exiled posts. This can be helpful if you have a very large site and you want to quickly preview a build
@@ -222,48 +245,177 @@ $ octopress isolate kittens # Move post matching search
222
245
 
223
246
  In the third example, if multiple posts match the search a prompt will ask you to select a post from a menu.
224
247
 
225
- ## Configuration
248
+ ### Deploy
226
249
 
227
- Octopress reads its configurations from `_config.yml`. Here's what the configuration looks like by default.
250
+ The Octopress gem comes with [octopress-deploy](https://github.com/octopress/deploy) which allows you to easily deploy your site with Rsync, on S3 or Cloudfront, to GitHub pages, or other Git based deployment hosting platforms.
228
251
 
229
- ```yaml
230
- # Default extension for new posts and pages
231
- post_ext: markdown
232
- page_ext: html
252
+ | Commands | Description |
253
+ |:-------------------------------------------|:-------------------------------------------------------------------|
254
+ | `octopress deploy` | Deploy your site (based on the `_deploy.yml` configuration) |
255
+ | `octopress deploy init <METHOD> [options]` | Generate a config file for the deployment method. (git, s3, rsync) |
256
+ | `octopress deploy pull [DIR]` | Pull down your site into a local directory. |
257
+ | `octopress deploy add-bucket <NAME>` | (S3 only) Add a bucket using your configured S3 credentials. |
233
258
 
234
- # Default templates for posts and pages
235
- # Found in _templates/
236
- post_layout: post
237
- page_layout: page
259
+ #### Deploy configuration
238
260
 
239
- # Format titles with titlecase?
240
- titlecase: true
261
+ First set up a configuration file for your deployment method. For Git based deployment, pass the repository url. For S3 and Rsync, no arguments are necessary.
241
262
 
242
- # Change default template file (in _templates/)
243
- post_template: post
244
- page_template: page
245
- draft_template: draft
263
+ ```
264
+ $ octopress deploy init git git@github.com:user/project
265
+ $ octopress deploy init s3
266
+ $ octopress deploy init rsync
246
267
  ```
247
268
 
248
- ## Deployment
269
+ This will generate a `_deploy.yml` file in your current
270
+ directory which you can edit to add any necessary configuration.
271
+ **Remember to add your configuration to `.gitignore` to be sure
272
+ you never commit sensitive information to your repository.**
249
273
 
250
- The Octopress gem comes with [octopress-deploy](https://github.com/octopress/deploy) which allows you to easily deploy your site with Rsync, on S3 or Cloudfront, to GitHub pages, or other Git based deployment hosting platforms.
274
+ If you like, you can pass configurations as command line options. To see specific options for any method, add the `--help` flag.
275
+ For example to see the options for configuring S3:
276
+
277
+ ```
278
+ $ octopress deploy init s3 --help
279
+ ```
280
+
281
+ #### Deploy your site
251
282
 
252
- ### Basic usage
283
+ Change the deployment configuration however you like, then build and deploy your site.
253
284
 
254
285
  ```
255
- octopress deploy init METHOD [options] # git, s3, or rsync - Create a _deploy.yml configuration
256
- octopress deploy # Deploys _site based on deployment configuration
257
- octopress pull DIR # Download your deployed site to the specified DIR
286
+ $ jekyll build # if you haven't yet
287
+ $ octopress deploy
258
288
  ```
259
289
 
260
- You can find more detailed documentation by running:
290
+ This will read your `_deploy.yml` configuration and deploy your
291
+ site. If you like, you can specify a configuration file.
261
292
 
262
293
  ```
263
- $ octopress deploy --help
294
+ $ octopress deploy --config _staging.yml
264
295
  ```
265
296
 
266
- Or by visiting the [Octopress deploy project page](https://github.com/octopress/deploy).
297
+ #### Pull down your site
298
+
299
+ With the `pull` command, you can pull your site down into a local directory.
300
+
301
+ ```
302
+ $ octopress deploy pull [DIR]
303
+ ```
304
+
305
+ Mainly you'd do this if you're troubleshooting deployment and you want to see if it's working how you expected.
306
+
307
+ ##### Git Deployment Configuration
308
+
309
+ Only `git_url` is required. Other options will default as shown below.
310
+
311
+ | Config | Description | Default
312
+ |:--------------|:-------------------------------------------------|:---------------|
313
+ | `method` | Deployment method, in this case use 'git' | |
314
+ | `site_dir` | Path to static site files | _site |
315
+ | `git_url` | Url for remote git repository | |
316
+ | `git_branch` | Deployment branch for git repository | master |
317
+ | `deploy_dir` | Directory where deployment files are staged | .deploy |
318
+ | `remote` | Name of git remote | deploy |
319
+
320
+ ##### Rsync Deployment Configuration
321
+
322
+ | Config | Description | Default
323
+ |:---------------|:--------------------------------------------------|:---------------|
324
+ | `method` | Deployment method, in this case use 'rsync' | |
325
+ | `site_dir` | Path to static site files | _site |
326
+ | `user` | ssh user, e.g user@host.com | |
327
+ | `port` | ssh port | 22 |
328
+ | `remote_path` | Remote destination's document root | |
329
+ | `exclude_from` | Path to a file containing rsync exclusions | |
330
+ | `exclude` | Inline list of rsync exclusions | |
331
+ | `include_from` | Path to a file containing rsync inclusions | |
332
+ | `include` | Inline list of inclusions to override exclusions | |
333
+ | `delete` | Delete files in destination not found in source | false |
334
+
335
+ You can rsync to a local directory by configuring `remote_path` and leaving off `user` and `port`.
336
+
337
+ #### Amazon S3 Deployment Configuration
338
+
339
+ To deploy with Amazon S3 you will need to install the [aws-sdk-v1 gem](https://rubygems.org/gems/aws-sdk-v1).
340
+
341
+ Important: when using S3, you must add your `_deploy.yml` to your .gitignore to prevent accidentally sharing
342
+ account access information.
343
+
344
+ | Config | Description | Default
345
+ |:--------------------|:------------------------------------------------------|:-------------|
346
+ | `method` | Deployment method, in this case use 's3' | |
347
+ | `site_dir` | Path to static site files | _site |
348
+ | `bucket_name` | S3 bucket name | |
349
+ | `access_key_id` | AWS access key | |
350
+ | `secret_access_key` | AWS secret key | |
351
+ | `distribution_id` | [optional] AWS CloudFront distribution id | |
352
+ | `remote_path` | Directory files should be synced to. | / |
353
+ | `verbose` | [optional] Display all file actions during deploy. | false |
354
+ | `incremental` | [optional] Incremental deploy (only updated files) | false |
355
+ | `region` | [optional] Region for your AWS bucket | us-east-1 |
356
+ | `delete` | Delete files in `remote_path` not found in `site_dir` | false |
357
+ | `headers` | Set headers for matched files | [] |
358
+
359
+ If you choose a bucket which doesn't yet exist, Octopress Deploy will offer to create it for you, and offer to configure it as a static website.
360
+
361
+ If you configure Octopress to delete files, all files found in the `remote_path` on S3 bucket will be removed unless they match local site files.
362
+ If `remote_path` is a subdirectory, only files in that subdirectory will be evaluated for deletion.
363
+
364
+ ##### S3 Headers
365
+
366
+ You can create an array of header congifs to set expiration, content and cache settings for any paths matching the `filename`.
367
+
368
+ | Header Config | Description | Default
369
+ |:--------------------|:------------------------------------------------------|:-------------|
370
+ | `filename` | A regex or a substring of the file to match | |
371
+ | `site_dir` | An http date or a number of years or days from now | |
372
+ | `content_type` | A string which is passed through to the headers | |
373
+ | `content_encoding` | A string which is passed through to the headers | |
374
+ | `cache_control` | A string which is passed through to the headers | |
375
+
376
+ Here is how you might set expriation and cache controls for CSS and Javascript files.
377
+
378
+ ```yaml
379
+ headers:
380
+ - filename: '^assets.*\.js$'
381
+ expires: '+3 years'
382
+ cache_control: 'max-age=94608000'
383
+ content_type: 'application/javascript'
384
+ - filename: '^assets.*\.css$'
385
+ expires: '+3 years'
386
+ cache_control: 'max-age=94608000'
387
+ content_type: 'text/css'
388
+ ```
389
+
390
+ ##### AWS config via ENV
391
+
392
+ If you prefer, you can store AWS access credentials in environment variables instead of a configuration file.
393
+
394
+ | Config | ENV var |
395
+ |:--------------------|:-------------------------------|
396
+ | `access_key_id` | AWS_ACCESS_KEY_ID |
397
+ | `secret_access_key` | AWS_SECRET_ACCESS_KEY |
398
+
399
+ Note: configurations in `_deploy.yml` will override environment variables so be sure to remove those if you decide to use environment variables.
400
+
401
+ #### Add a new bucket
402
+
403
+ If your AWS credentials are properly configured, you can add a new bucket with this command.
404
+
405
+ ```
406
+ $ octopress deploy add-bucket <NAME>
407
+ ```
408
+
409
+ This will connect to AWS, create a new S3 bucket, and configure it for static website hosting. This command can use the settings in your deployment configuration or you can pass options to override those settings.
410
+
411
+ | Option | Description | Default
412
+ |:--------------|:-------------------------------------------------|:---------------|
413
+ | `--region` | Override the `region` configuration | |
414
+ | `--index` | Specify an index page for your site | index.html |
415
+ | `--error` | Specify an error page for your site | error.html |
416
+ | `--config` | Use a custom configuration file | _deploy.yml |
417
+
418
+ You'll only need to pass options if you want to override settings in your deploy config file.
267
419
 
268
420
  ## Contributing
269
421
 
@@ -1,3 +1,3 @@
1
1
  module Octopress
2
- VERSION = "3.0.7"
2
+ VERSION = "3.0.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octopress
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.7
4
+ version: 3.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Mathis
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-06-02 00:00:00.000000000 Z
12
+ date: 2015-06-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mercenary
@@ -263,7 +263,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
263
263
  version: '0'
264
264
  requirements: []
265
265
  rubyforge_project:
266
- rubygems_version: 2.4.6
266
+ rubygems_version: 2.4.7
267
267
  signing_key:
268
268
  specification_version: 4
269
269
  summary: Octopress is an obsessively designed framework for Jekyll blogging. It’s