mirror of
https://github.com/SamyRai/tercul-backend.git
synced 2025-12-27 00:31:35 +00:00
This commit introduces a new blog feature by implementing a JSON schema for blog posts and providing five example content files. Key changes: - Created a new directory structure for schemas and content (`schemas/`, `content/blog/`). - Implemented a JSON schema for blog posts, split into `blog.json` and `_defs.json` for reusability. - Added five example blog post files with full, realistic content. - Included a Python script (`validate.py`) to validate the example content against the schema.
44 lines
1.8 KiB
JSON
44 lines
1.8 KiB
JSON
{
|
|
"contentTypeSlug": "blog",
|
|
"title": "A Guide to Sustainable Living",
|
|
"slug": "guide-to-sustainable-living",
|
|
"status": "published",
|
|
"content": {
|
|
"excerpt": "Discover practical tips and simple changes you can make to live a more sustainable and eco-friendly lifestyle.",
|
|
"content": "<p>Living sustainably doesn't have to be complicated. It's about making conscious choices that reduce your environmental impact. In this guide, we'll cover everything from reducing your plastic consumption to creating a more energy-efficient home.</p><p>We'll also explore the benefits of a plant-based diet and how you can support local, sustainable businesses in your community.</p>",
|
|
"publishDate": "2024-09-18",
|
|
"author": "Liam Carter",
|
|
"tags": ["Sustainability", "Eco-Friendly", "Lifestyle"],
|
|
"meta_title": "Your Ultimate Guide to Sustainable Living",
|
|
"meta_description": "Learn how to live a more sustainable lifestyle with our comprehensive guide."
|
|
},
|
|
"languageCode": "en-US",
|
|
"isDefault": true,
|
|
"id": "post-2",
|
|
"translation_group_id": "tg-sustainable-living",
|
|
"lifecycle": {
|
|
"state": "published",
|
|
"published_at": "2024-09-18T10:00:00Z",
|
|
"timezone": "UTC"
|
|
},
|
|
"seo": {
|
|
"canonical": "https://example.com/blog/guide-to-sustainable-living",
|
|
"og_title": "A Guide to Sustainable Living",
|
|
"og_description": "Discover practical tips for a more sustainable lifestyle.",
|
|
"twitter_card": "summary"
|
|
},
|
|
"taxonomy": {
|
|
"categories": ["Lifestyle", "Environment"],
|
|
"featured": false
|
|
},
|
|
"relations": {
|
|
"related_posts": ["post-1", "post-3"]
|
|
},
|
|
"assets": {
|
|
"hero_image": {
|
|
"url": "https://example.com/images/sustainable-living.jpg",
|
|
"alt": "A person holding a reusable water bottle in a lush green environment."
|
|
}
|
|
}
|
|
}
|