Skip to content

Commit bff7b12

Browse files
author
Aitor Brazaola
committed
Updated First use and Installing and configuring docs.
1 parent 33ebc5e commit bff7b12

File tree

2 files changed

+39
-2
lines changed

2 files changed

+39
-2
lines changed

docs/first_use_installing_and_configuring.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ renderer:
3838
options:
3939
sections: []
4040
```
41-
Create a folder in your project's root named `templates` with the different subfolders of templates you want to have.
4241

4342
Install assets
4443
```bash

docs/first_use_your_first_page.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,41 @@
11
# Your first page
22

3-
For this example we are showing
3+
For rendering components in the Pattern Library first you should create a YAML in your `PatternLibrary` folder for the
4+
desired item to render. It is recommended to have separated folders inside PatternLibrary folder for separating
5+
different kind of components.
6+
7+
For example:
8+
```yaml
9+
status: 2
10+
description: '<p>This is the button atom description.</p>'
11+
renderer:
12+
type: twig
13+
options:
14+
template: 'atoms/button.html.twig'
15+
preview_parameters:
16+
primary:
17+
content: Hola
18+
link:
19+
content: Hola 2
20+
modifier: orange
21+
href: test
22+
tag: a
23+
```
24+
25+
Then, reference it in `index.yml` on the desired section with the corresponding slug based on directory structure:
26+
```yaml
27+
status: 0
28+
description: '<p>This is the icon card component description.</p>'
29+
renderer:
30+
type: homepage
31+
options:
32+
sections:
33+
-
34+
title: 'Atoms'
35+
description: 'These are the atoms'
36+
items:
37+
-
38+
slug: 'architecture/atoms/button'
39+
```
40+
41+
The component to render must exists in the current views folder of your application.

0 commit comments

Comments
 (0)