This repository has been archived by the owner on May 18, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbusiness-export.ndjson
99 lines (87 loc) · 3.9 KB
/
business-export.ndjson
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
---
layout: null
sitemap: false
---
{% for business in site.directory %}{% if business.live_directory == false %}{% assign zip = business.Zip | jsonify | downcase %}
{% if business.Logo_image_path != "/assets/images/directory/directory-default.png" %}
{% assign logo = business.Logo_image_path %}
{% else %}
{% assign logo = null %}
{% endif %}
{"_type": "business","title": {{ business.Business | jsonify }},"location": { "_type": "location", "city": {{ business.City | jsonify }}, "state": {{ business.State | jsonify }}, "streetAddress": {{ business.Street | jsonify }}, "zipcode": {{ zip }}}, "slug": { "_type": "slug", "current": {{ business.url | jsonify | remove: "/business-directory/" | remove: "/" }}}, {% if business.content %} "body": [ { "_type": "block", "children": [ { "_type": "span", "marks": [], "text": {{ business.content | jsonify | strip_html }} } ], "markDefs": [], "style": "normal" } ], {% endif %} "businessContact": { "_type": "businessContact", "contactEmail": {{ business.Contact_Email | jsonify }}, "contactName": {{ business.Contact_Name | jsonify }}, "contactPhone": {{ business.Phone | jsonify }} }, {% if logo %} "logoImage": {"_sanityAsset": {{ logo | prepend: "image@file:///Users/brentrobbins/VS/greeleydowntown.com/_backups/current" | jsonify }},"_type": "mainImage","alt": {{ business.Business | jsonify }}},{% endif %}{% if business.Website %} "links": [ { "_type": "link", "link": {{ business.Website | jsonify }}, "linkType": "business" }], {% endif %}
"seoSettings": {
"_type": "seo",
"description": {{ business.content | jsonify | strip_html }},
"title": {{ business.Business | jsonify }}
},
"businessCategories": {
"_type": "businessCategories",
{% if business.dining_categories != null %}
"diningCategories": [
{% for item in business.dining_categories %}
{
"_ref": {{ item | slugify | jsonify }},
"_type": "reference"
}
{% if first_item %}{% assign first_item = false %}{% else %},{% endif %}
{% endfor %}
],
{% endif %}
{% if business.entertainment_and_recreation_categories != null %}
"entertainmentAndRecreationCategories": [
{% for item in business.entertainment_and_recreation_categories %}
{
"_ref": {{ item | slugify | jsonify }},
"_type": "reference"
}
{% if first_item %}{% assign first_item = false %}{% else %},{% endif %}
{% endfor %}
],
{% endif %}
{% if business.lodging_and_event_centers_categories != null %}
"lodging_and_event_centers_categories": [
{% for item in business.lodging_and_event_centers_categories %}
{
"_ref": {{ item | slugify | jsonify }},
"_type": "reference"
}
{% if first_item %}{% assign first_item = false %}{% else %},{% endif %}
{% endfor %}
],
{% endif %}
{% if business.nightlife_categories != null %}
"nightlifeCategories": [
{% for item in business.nightlife_categories %}
{
"_ref": {{ item | slugify | jsonify }},
"_type": "reference"
}
{% if first_item %}{% assign first_item = false %}{% else %},{% endif %}
{% endfor %}
],
{% endif %}
{% if business.retail_categories != null %}
"retailCategories": [
{% for item in business.retail_categories %}
{
"_ref": {{ item | slugify | jsonify }},
"_type": "reference"
}
{% if first_item %}{% assign first_item = false %}{% else %},{% endif %}
{% endfor %}
],
{% endif %}
{% if business.service_categories != null %}
"serviceCategories": [
{% for item in business.service_categories %}
{
"_ref": {{ item | slugify | jsonify }},
"_type": "reference"
}
{% if first_item %}{% assign first_item = false %}{% else %},{% endif %}
{% endfor %}
]
{% endif %}
}
}
{% endif %}{% endfor %}