-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathdeveloper_page.njk
More file actions
47 lines (36 loc) · 1.62 KB
/
Copy pathdeveloper_page.njk
File metadata and controls
47 lines (36 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
---
business: api
---
{% extends "./base.njk" %}
{# Ideally set through eleventyComputed in front-matter but not working. Bug? #}
{% set title = developer.title %}
{% set description = developer.description or developer.summary %}
{% set keywords = developer.keywords %}
{% set image = developer.social_image or developer.image %}
{% if developer.redirect %}
{% set canonical = developer.redirect %}
{% endif %}
{% block main %}
{% set product = developer|mergeObjectFilter({learn_more_link: developer.documentation_link, learn_more_label: "View Documentation"}) %}
{% include "section_product_page_hero.njk" %}
{% if developer.redirect %}
{% set moved_url = developer.redirect %}
{% include "section_page_moved_banner.njk" %}
{% endif %}
{% for i in range(0, product.layout | length) %}
{% set item = product.layout[i] %}
{# The section mid_summary uses the main developer description as it's main-text #}
{% if item.section === "mid_summary" %}
{% set item = product.layout[i]|mergeObjectFilter({main_text: product.description}) %}
{% endif %}
{# The section documentation_link_banner uses title & link from the main section #}
{% if item.section === "documentation_link_banner" %}
{% set item = product.layout[i]|mergeObjectFilter({title: 'View '+ (product.title_short or product.title) + ' Documentation', link: product.documentation_link}) %}
{% endif %}
{% set component = "section_" + item.section + ".njk" %}
{% include component %}
{% endfor %}
{# Signup Form Section #}
{% set form = { type: "api", referrername: "eps_" + product.name | slug } %}
{% include "section_signup_form.njk" %}
{% endblock %}