README.md in middleman-search-gds-0.11.0a vs README.md in middleman-search-gds-0.11.1
- old
+ new
@@ -47,12 +47,22 @@
- `index` Whether to index this field, defaults to true
- `required` The resource will not be indexed if a field marked as required has an empty or null value
Note that a special field `id` is included automatically, with an autogenerated identifier to be used as the `ref` for the document.
-All fields values are retrieved from the resource `data` (i.e. its frontmatter), or from the `options` in the `resource.metadata` (i.e. any options specified in a `proxy` page), except for:
-- `url` which is the actual resource url
-- `content` the text extracted from the rendered resource, without including its layout
+Dynamic resources can be proxied as below:
+
+```ruby
+ProxyPages.resources.each do |resource|
+ proxy "/foo/#{resource.filename}.html", "templates/my_template.html", { title: resource.title }
+end
+```
+
+All fields values are retrieved from the resource `data` (i.e. its frontmatter), or from the `options` in the `resource.metadata` (i.e. any options specified in a `proxy` page - the third parameter in the example above). The exceptions are:
+
+- `url`, which is the actual resource url
+- `content`, which is by default the text extracted from the rendered resource (without its layout).
+ Indexing lots of content can cause performance issues, so you may want to override this field in the resource data (e.g. `content: ""`) if the page contents aren't relevant to the index.
You can then query the index from Javascript via the `lunrIndex` object (see [Index file](#index-file) for more info):
```javascript
var max_search_entries = 50;