Skip to content

Commit a21940e

Browse files
committed
Added easier docs to the readme
1 parent b453238 commit a21940e

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,32 @@
22

33
Retrieves a weighted array of similar content based on a configurable set of taxonomies and fields. Also has the ability to combine with a manual related content selection field.
44

5+
---
6+
7+
# Quick Start Guide
8+
9+
Customise the config to suit your contenttypes and taxonomies:
10+
11+
```yml
12+
limit : 10
13+
contenttypes: [ spotlights, news, research, resources, events ]
14+
taxonomies: [ tags, categories ]
15+
```
16+
17+
Loop through the related content in your .twig file:
18+
19+
```twig
20+
{% for item in relatedcontent(record) %}
21+
<p><a href="{{ item.link }}">{{ item.title|e }}</a></p>
22+
{% endfor %}
23+
```
24+
25+
You should be good to go!
26+
27+
---
28+
29+
# In Depth Guide
30+
531
## Usage
632

733
Default usage:

0 commit comments

Comments
 (0)