Skip to content
This repository was archived by the owner on Dec 10, 2019. It is now read-only.

Commit 4dee74d

Browse files
committed
documentation for pattern links
1 parent 15eae93 commit 4dee74d

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,22 @@ Pattern states should be lowercase and use hyphens where spaces are present.
7373
}
7474
```
7575

76+
##### Pattern Linking
77+
You can build patterns that link to one another to help simulate using a real website. This is especially useful when working with the Pages and Templates pattern types. The basic format is:
78+
79+
`{{ link.pattern-name }}`
80+
81+
For example, if you wanted to add a link to the `home page` template from your `blog` template you could write the following:
82+
83+
`<a href="{{ link.templates-homepage }}">Home</a>`
84+
85+
This would compile to:
86+
87+
`<a href="/patterns/templates-homepage/templates-homepage.html">Home</a>`
88+
89+
As you can see, it's a much easier way of linking patterns to one another.
90+
91+
7692
##### Pattern Export
7793
`config.json` also has two properties that work together to export completed patterns for use in a production environment. Provide an array of keys and an output directory. Pattern Lab doesn't ship with any pattern export keys, but the default directory is `"./pattern_exports/"` created inside the install directory.
7894

0 commit comments

Comments
 (0)