Skip to content

Commit 729871e

Browse files
authored
Merge branch 'master' into feature/help
2 parents 871e004 + 328b72c commit 729871e

55 files changed

Lines changed: 303 additions & 53 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

_help/src/Assets/favicon.ico

1.12 KB
Binary file not shown.

_help/src/Data/Authors.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
Founders:
22
- Name: Anton Boyko
3-
Title: Microsoft Azure MVP
3+
Title: Microsoft Azure MVP
4+
5+
Contributors:
6+
- Name: Helen Boyko
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<ul>
2+
{{# Data.__names }}
3+
<li>
4+
{{ . }}
5+
</li>
6+
{{/ Data.__names }}
7+
</ul>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<ul>
2+
{{# Data.__collection }}
3+
{{# __names }}
4+
<li>
5+
{{ . }}
6+
</li>
7+
{{/ __names }}
8+
{{/ Data.__collection }}
9+
</ul>

_help/src/Layout/default.hjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
<link href="/Assets/prism-1.10.0/prism.css" rel="stylesheet" type="text/css">
55

66
<title>{{ Page.Title }}</title>
7+
8+
<link rel="shortcut icon" type="image/x-icon" href="/Assets/favicon.ico">
79
</head>
810
<body>
911
{{> header.hjs }}

_help/src/Pages/folders-structure.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,17 @@ Inside `www` folder there will be all pre-rendered files of website project. Sol
3030

3131
Inside `config.yaml` file there will be all the configuration for current website project.
3232

33+
34+
### Ignored files
35+
36+
There is a list of files that will be ignored by engine to load and process. These files are:
37+
38+
- `README.md`
39+
- `.DS_Store`
40+
41+
These files will be ignored, if found, in any folders and subfolders.
42+
43+
3344
### Source files folder
3445

3546
Inside `src` folder there will be all the source files for website project. This folder structure should look like:
@@ -80,4 +91,4 @@ Inside `Layout` folder there will be all layout files. For now Solidify Engine c
8091

8192
Inside `Pages` folder there will be all pages files. Each page file is a markdown markup file with some mandatory metadata at the start of the file.
8293

83-
[more details...](folders-structure/pages.html)
94+
[more details...](folders-structure/pages.html)

_help/src/Pages/folders-structure/data/special-properties.md

Lines changed: 119 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,19 @@ title: Data 101
77

88
[back to data folder structure](/folders-structure/data.html)
99

10-
### `__collection` special property
10+
## Table of contents
11+
12+
- [`__collection` special property](#__collection)
13+
- [`__names` special property](#__names)
14+
15+
---
16+
### <a name="__collection"></a>`__collection` special property
1117

1218
There is a special property `__collection` of each child property of `Data` object. Using this property you can navigate through collection of child properties of current property.
1319

1420
##### Example (simple)
1521

16-
Let's assume that you have the following folders structure on you file system:
22+
Let's assume that you have the following folder structure on your file system:
1723

1824
```none
1925
Data
@@ -45,11 +51,11 @@ Finally, the html rendered by Solidify Engine will look like this:
4551
<ul>
4652
<li>
4753
<img src="poland.png"/>
48-
On 1st of February at Warsaw
54+
On 1st of February in Warsaw
4955
</li>
5056
<li>
5157
<img src="ukraine.png"/>
52-
On 1st of March at Kyiv
58+
On 1st of March in Kyiv
5359
</li>
5460
</ul>
5561
```
@@ -58,7 +64,7 @@ Finally, the html rendered by Solidify Engine will look like this:
5864

5965
You can also use nested `__collection` properties.
6066

61-
Let's assume that you have the following folders structure on you file system:
67+
Let's assume that you have the following folder structure on you file system:
6268

6369
```none
6470
Data
@@ -121,3 +127,111 @@ Finally, the html rendered by Solidify Engine will look like this:
121127
</li>
122128
</ul>
123129
```
130+
131+
---
132+
### <a name="__names"></a>`__names` special property
133+
134+
There is a special property `__names` of each child property of `Data` object. Using this property you can navigate through names of child properties of current property.
135+
136+
##### Example (simple)
137+
138+
Let's assume that you have the following folders structure on you file system:
139+
140+
```none
141+
Data
142+
Poland.json
143+
Ukraine.json
144+
```
145+
146+
And inside each `.json` file in this example you have the following structure:
147+
148+
```json
149+
{
150+
"details": {
151+
"flag": "flag.png",
152+
"date": "1st of February",
153+
"address": "Main street"
154+
}
155+
}
156+
```
157+
158+
And your template may look like this:
159+
160+
```handlebars
161+
{{ Data.FoldersStructure.Data.DataTemplate01Names }}
162+
```
163+
164+
Finally, the html rendered by Solidify Engine will look like this:
165+
166+
```html
167+
<ul>
168+
<li>
169+
Poland
170+
</li>
171+
<li>
172+
Ukraine
173+
</li>
174+
</ul>
175+
```
176+
177+
##### Example (nested)
178+
179+
You can also use `__names` together with nested `__collection` properties.
180+
181+
Let's assume that you have the following folder structure on you file system:
182+
183+
```none
184+
Data
185+
year1999
186+
Poland.json
187+
Ukraine.json
188+
year2001
189+
Bulgaria.json
190+
Romania.json
191+
year2020
192+
Denmark.json
193+
Spain.json
194+
```
195+
196+
And inside each `.json` file in this example you have the following structure:
197+
198+
```json
199+
{
200+
"details": {
201+
"flag": "flag.png",
202+
"date": "1st of February",
203+
"address": "Main street"
204+
}
205+
}
206+
```
207+
208+
And your template may look like this:
209+
210+
```handlebars
211+
{{ Data.FoldersStructure.Data.DataTemplate02Names }}
212+
```
213+
214+
Finally, the html rendered by Solidify Engine will look like this:
215+
216+
```html
217+
<ul>
218+
<li>
219+
Poland
220+
</li>
221+
<li>
222+
Ukraine
223+
</li>
224+
<li>
225+
Bulgaria
226+
</li>
227+
<li>
228+
Romania
229+
</li>
230+
<li>
231+
Denmark
232+
</li>
233+
<li>
234+
Spain
235+
</li>
236+
</ul>
237+
```

_help/src/Pages/home.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,20 @@ title: Solidify Project Help
99

1010
- [Create my first website](/quickstart/create-my-first-website.html)
1111

12-
1312
### Reference
1413

1514
- [Folders structure](/folders-structure.html)
1615

1716
### Founders
1817
{{# Data.Authors.Founders }}
1918

20-
* {{ Name }} ({{ Title }})
19+
* {{ Name }} {{# Title }} ({{ Title }}) {{/ Title }}
2120

2221
{{/ Data.Authors.Founders }}
22+
23+
### Contributors
24+
{{# Data.Authors.Contributors }}
25+
26+
* {{ Name }} {{# Title }} ({{ Title }}) {{/ Title }}
27+
28+
{{/ Data.Authors.Contributors }}
1.12 KB
Binary file not shown.

src/SolidifyProject.Engine.Infrastructure/Models/PageModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public sealed class PageModel : TextContentModel
1616
private static readonly string[] TITLE_ATTRIBUTE = {"Title"};
1717
private static readonly string[] URL_ATTRIBUTE = {"Url"};
1818
private static readonly string[] TEMPLATE_TYPE = {"TemplateType"};
19-
private static readonly string[] TEMPLATE_ID_ATTRIBUTE = {"TemplateId", "Template", "LayoutÏd", "Layout"};
19+
private static readonly string[] TEMPLATE_ID_ATTRIBUTE = {"TemplateId", "Template", "LayoutId", "Layout"};
2020

2121
private static readonly string[] CUSTOM_ATTRIBUTE_PREFIX_SEPARATOR = {"."};
2222
private static readonly string[] CUSTOM_ATTRIBUTE_PREFIX = {"Custom"};

0 commit comments

Comments
 (0)