Skip to content

Commit 11822a3

Browse files
API
1 parent d93e060 commit 11822a3

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

_data/primary-navigation.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,8 @@
1919
- title: Dimensions
2020
link: /saf_dimensions/
2121

22+
- title: API
23+
link: /api/safs.json
24+
2225
- title: Contact
2326
link: /contact

api/safs.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
---
3+
4+
{%- assign pages = site.safs | where_exp: "p", "p.layout != nil" -%}
5+
6+
[
7+
{%- for p in pages %}
8+
{
9+
"title": {{ p.title | markdownify | strip_newlines | jsonify }},
10+
"url": {{ p.url | relative_url | strip_newlines | jsonify }},
11+
"description": {{ p.description | markdownify|strip_newlines | jsonify }},
12+
"dimension": {{ p.dimension | markdownify| strip_newlines | jsonify }},
13+
"requirement": {{ p.requirement | markdownify | strip_newlines | jsonify }},
14+
"content": {{ p.content | markdownify | strip_html | strip_newlines |jsonify }}
15+
}
16+
{%- unless forloop.last %},{% endunless -%}
17+
{% endfor %}
18+
]

0 commit comments

Comments
 (0)