middleman-alias 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2ecd02c745ef27ba02d7fcdfc20362fcc0ba2f5d
4
- data.tar.gz: c703d3d75754481b339f8aeb47048d596eff3529
3
+ metadata.gz: 976b044b36b93a17d309632702866564f337eb3b
4
+ data.tar.gz: 7949793d4d39d83f1730499d99128935e7d605bd
5
5
  SHA512:
6
- metadata.gz: 24d174defd0c85ef813cf3d77008b1be2412cf4aab79142e6536fead7694f53ee4bf9f15649a49b4287176ea4cc1e56a7b0f20f9b859e3bc7d04247f8135f669
7
- data.tar.gz: 5d7c9cc77e980586246cd5aac02811ba1b7734441b72c89895f9ce9bf285f230d34bd1d58ba0073b6efb02452b0757e3256749259439c1380372c85ef8865403
6
+ metadata.gz: 67d07bfdf091e0b6419e212b89560b5d823fad2ff50873f2397ecac270f62bd9e19bc5130131684a70e78bdf794cd1f26655a8cb28d45c3725847a54f16e9c70
7
+ data.tar.gz: 7eb6ffe0fac252d1e6ec76dd14081f121e31a2e8bab3bedaa4a453a9cdb99c5f248ff7608e2cbb3fc506843dfa12479488a0ee5a698e75889c52ce4cbcc54202
data/README.md CHANGED
@@ -18,7 +18,10 @@ Or install it yourself as:
18
18
 
19
19
  ## Usage
20
20
 
21
- First you need to activate the module in your `config.rb`.
21
+ First you need to activate the module in your `config.rb`. *Make sure
22
+ that it is the LAST thing activated.* It's important that other modules
23
+ have the opportunity to do their own URL manipulations before the
24
+ alias redirect pages are generated.
22
25
 
23
26
  ```
24
27
  activate :alias
@@ -9,13 +9,13 @@ module Middleman
9
9
  def manipulate_resource_list(resources)
10
10
  resources.each do |resource|
11
11
  if resource.data["alias"]
12
- redirect = Sitemap::Resource.new(@app.sitemap, resource.data["alias"]).tap do |p|
12
+ Sitemap::Resource.new(@app.sitemap, resource.data["alias"]).tap do |p|
13
13
  p.proxy_to("alias.html")
14
14
  p.add_metadata locals: {
15
- destination: resource.destination_path
15
+ destination: resource.url
16
16
  }
17
+ resources.push p
17
18
  end
18
- resources.push redirect
19
19
  end
20
20
  end
21
21
  resources
@@ -1,3 +1,3 @@
1
1
  module MiddlemanAlias
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-alias
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Green