Skip to content

Commit

Permalink
fix(starterkit-twig-demo): pages not rendering pattern-specific data …
Browse files Browse the repository at this point in the history
…from json (#1490)

Closes: #1486
  • Loading branch information
hadl authored Feb 26, 2023
1 parent fd5db84 commit 1c878df
Show file tree
Hide file tree
Showing 13 changed files with 282 additions and 281 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
"organisms": "source/_patterns/organisms/",
"templates": "source/_patterns/templates/",
"pages": "source/_patterns/pages/",
"macros": "source/_macros/"
"macros": "source/_patterns/macros/"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/starterkit-twig-demo/dist/_data/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"first_name": "Author",
"last_name": "Name"
},
"hero": true,
"hero": {},
"emergency" : false,
"touts" : [
{ },
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
hidden: true
---
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<h2 class="section-title">Latest Posts</h2>
<ul class="post-list">
{% for post in latest_posts %}
<li>{% include "@molecules/blocks/media-block.twig" %}</li>
<li>{% include "@molecules/blocks/media-block.twig" with post %}</li>
{% endfor %}
</ul>
<a href="#" class="text-btn">View more posts</a>
Expand Down
60 changes: 30 additions & 30 deletions packages/starterkit-twig-demo/dist/_patterns/pages/article.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
{
"title" : "Top 10 Trails You Have To Hike Before You Die",
"bodyClass": "article",
"author" : {
"first-name" : "Julianne",
"last-name" : "McCormick"
},
"img": {
"landscape_4x3": {
"src": "../../images/sample/landscape-16x9-mountains.jpg",
"alt": "Mountains",
"width": "1151",
"height": "638"
},
"landscape_16x9": {
"src": "../../images/sample/landscape-16x9-mountains.jpg",
"alt": "Mountains",
"width": "1151",
"height": "638"
}
},
"inset_blocks" : [
{
"headline" : "This is the headline for the inset block"
}
],
"latest_block" : [
{
"headline" : "This is the headline for the latest block"
}
]
"title": "Top 10 Trails You Have To Hike Before You Die",
"bodyClass": "article",
"author": {
"first_name": "Julianne",
"last_name": "McCormick"
},
"img": {
"landscape_4x3": {
"src": "../../images/sample/landscape-16x9-mountains.jpg",
"alt": "Mountains",
"width": "1151",
"height": "638"
},
"landscape_16x9": {
"src": "../../images/sample/landscape-16x9-mountains.jpg",
"alt": "Mountains",
"width": "1151",
"height": "638"
}
},
"inset_blocks": [
{
"headline": "This is the headline for the inset block"
}
],
"latest_block": [
{
"headline": "This is the headline for the latest block"
}
]
}
170 changes: 85 additions & 85 deletions packages/starterkit-twig-demo/dist/_patterns/pages/blog.json
Original file line number Diff line number Diff line change
@@ -1,86 +1,86 @@
{
"title" : "Blog",
"bodyClass": "blog",
"latest-posts" : [
{
"img": {
"square": {
"src": "../../images/sample/thumb-square-river.jpg",
"alt": "Post Thumbnail"
}
},
"headline" : {
"short" : "Navigate the Allegheny River"
},
"excerpt" : {
"medium" : "The Allegheny River is a principal tributary of the Ohio River; it is located in the Eastern United States. The Allegheny River joins with the Monongahela River to form the Ohio River at the Point of Point State Park in Downtown Pittsburgh, Pennsylvania."
}
},
{
"img": {
"square": {
"src": "../../images/sample/thumb-square-ivy.jpg",
"alt": "Ivy"
}
},
"headline" : {
"short" : "How to detect and avoid poison ivy"
},
"excerpt" : {
"medium" : "Toxicodendron radicans, commonly known as poison ivy is a poisonous North American plant that is well known for its production of urushiol"
}
},
{
"img": {
"square": {
"src": "../../images/sample/thumb-square-yosemite.jpg",
"alt": "Yosemite"
}
},
"headline" : {
"short" : "Top 10 hiking mountains"
},
"excerpt" : {
"medium" : "Yosemite National Park is a United States National Park spanning eastern portions of Tuolumne, Mariposa and Madera counties in the central eastern portion of the U.S. state of California."
}
},
{
"img": {
"square": {
"src": "../../images/sample/thumb-square-fire.jpg",
"alt": "Fire"
}
},
"headline" : {
"short" : "How to build a campfire"
},
"excerpt" : {
"medium" : "A campfire is a fire lit at a campsite, to serve the following functions: light, warmth, a beacon, an insect and/or apex predator deterrent, to cook, and for a psychological sense of security. "
}
},
{
"img": {
"square": {
"src": "../../images/sample/thumb-square-gear.jpg",
"alt": "Camping Gear"
}
},
"headline" : {
"short" : "Pick the right camping gear"
},
"excerpt" : {
"medium" : "The equipment used in camping varies with the particular type of camping. For instance, in survival camping the equipment consists of small items which have the purpose of helping the camper in providing food, heat and safety."
}
}
],
"inset_blocks" : [
{
"headline" : "This is the headline for the inset block"
}
],
"latest_block" : [
{
"headline" : "This is the headline for the latest block"
}
]
}
"title": "Blog",
"bodyClass": "blog",
"latest_posts": [
{
"img": {
"square": {
"src": "../../images/sample/thumb-square-river.jpg",
"alt": "Post Thumbnail"
}
},
"headline": {
"short": "Navigate the Allegheny River"
},
"excerpt": {
"medium": "The Allegheny River is a principal tributary of the Ohio River; it is located in the Eastern United States. The Allegheny River joins with the Monongahela River to form the Ohio River at the Point of Point State Park in Downtown Pittsburgh, Pennsylvania."
}
},
{
"img": {
"square": {
"src": "../../images/sample/thumb-square-ivy.jpg",
"alt": "Ivy"
}
},
"headline": {
"short": "How to detect and avoid poison ivy"
},
"excerpt": {
"medium": "Toxicodendron radicans, commonly known as poison ivy is a poisonous North American plant that is well known for its production of urushiol"
}
},
{
"img": {
"square": {
"src": "../../images/sample/thumb-square-yosemite.jpg",
"alt": "Yosemite"
}
},
"headline": {
"short": "Top 10 hiking mountains"
},
"excerpt": {
"medium": "Yosemite National Park is a United States National Park spanning eastern portions of Tuolumne, Mariposa and Madera counties in the central eastern portion of the U.S. state of California."
}
},
{
"img": {
"square": {
"src": "../../images/sample/thumb-square-fire.jpg",
"alt": "Fire"
}
},
"headline": {
"short": "How to build a campfire"
},
"excerpt": {
"medium": "A campfire is a fire lit at a campsite, to serve the following functions: light, warmth, a beacon, an insect and/or apex predator deterrent, to cook, and for a psychological sense of security. "
}
},
{
"img": {
"square": {
"src": "../../images/sample/thumb-square-gear.jpg",
"alt": "Camping Gear"
}
},
"headline": {
"short": "Pick the right camping gear"
},
"excerpt": {
"medium": "The equipment used in camping varies with the particular type of camping. For instance, in survival camping the equipment consists of small items which have the purpose of helping the camper in providing food, heat and safety."
}
}
],
"inset_blocks": [
{
"headline": "This is the headline for the inset block"
}
],
"latest_block": [
{
"headline": "This is the headline for the latest block"
}
]
}
Loading

0 comments on commit 1c878df

Please sign in to comment.