feat: ts index file
This commit is contained in:
parent
066fcce888
commit
48a34a28c7
|
|
@ -1,130 +0,0 @@
|
||||||
{
|
|
||||||
"posts": [
|
|
||||||
{
|
|
||||||
"slug": "midjourney-alternatives",
|
|
||||||
"title": "Best Midjourney Alternatives in 2026",
|
|
||||||
"description": "19 AI image generators compared: UI platforms, API services, open-source options, and aggregators. Find the right tool for your needs.",
|
|
||||||
"heroImage": "/blog/midjourney-alternatives-hero.png",
|
|
||||||
"category": "guides",
|
|
||||||
"date": "2026-01-18",
|
|
||||||
"author": {
|
|
||||||
"name": "Banatie Team",
|
|
||||||
"avatar": "/blog/authors/default.jpg"
|
|
||||||
},
|
|
||||||
"readTime": "25 min",
|
|
||||||
"relatedArticles": ["api-integration-tips", "placeholder-images-guide"],
|
|
||||||
"relatedDocs": [
|
|
||||||
{ "title": "API Reference", "href": "/docs/api/", "icon": "code" },
|
|
||||||
{ "title": "MCP Integration", "href": "/docs/guides/", "icon": "terminal" }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"slug": "placeholder-images-guide",
|
|
||||||
"title": "Getting Started with AI Placeholder Images",
|
|
||||||
"description": "Learn how to use Banatie to generate contextual placeholder images for your projects.",
|
|
||||||
"heroImage": "/blog/placeholder-guide-hero.jpg",
|
|
||||||
"category": "guides",
|
|
||||||
"date": "2025-01-15",
|
|
||||||
"author": {
|
|
||||||
"name": "Banatie Team",
|
|
||||||
"avatar": "/blog/authors/default.jpg"
|
|
||||||
},
|
|
||||||
"readTime": "5 min",
|
|
||||||
"relatedArticles": ["api-integration-tips", "prompt-engineering-basics"],
|
|
||||||
"relatedDocs": [
|
|
||||||
{ "title": "API Reference", "href": "/docs/api/", "icon": "code" },
|
|
||||||
{ "title": "Quick Start", "href": "/docs/guides/", "icon": "book" }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"slug": "api-integration-tips",
|
|
||||||
"title": "API Integration Tips for Developers",
|
|
||||||
"description": "Best practices for integrating Banatie API into your applications and workflows.",
|
|
||||||
"heroImage": "/blog/api-tips-hero.jpg",
|
|
||||||
"category": "tutorials",
|
|
||||||
"date": "2025-01-12",
|
|
||||||
"author": {
|
|
||||||
"name": "Banatie Team",
|
|
||||||
"avatar": "/blog/authors/default.jpg"
|
|
||||||
},
|
|
||||||
"readTime": "7 min",
|
|
||||||
"relatedArticles": ["placeholder-images-guide", "image-generation-best-practices"],
|
|
||||||
"relatedDocs": [
|
|
||||||
{ "title": "API Reference", "href": "/docs/api/", "icon": "code" },
|
|
||||||
{ "title": "Authentication", "href": "/docs/guides/", "icon": "book" }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"slug": "design-workflow-optimization",
|
|
||||||
"title": "Optimizing Your Design Workflow with AI Images",
|
|
||||||
"description": "How designers can speed up their prototyping process using AI-generated placeholders.",
|
|
||||||
"heroImage": "/blog/design-workflow-hero.jpg",
|
|
||||||
"category": "guides",
|
|
||||||
"date": "2025-01-10",
|
|
||||||
"author": {
|
|
||||||
"name": "Banatie Team",
|
|
||||||
"avatar": "/blog/authors/default.jpg"
|
|
||||||
},
|
|
||||||
"readTime": "6 min",
|
|
||||||
"relatedArticles": ["use-cases-ecommerce", "placeholder-images-guide"],
|
|
||||||
"relatedDocs": [
|
|
||||||
{ "title": "Getting Started", "href": "/docs/guides/", "icon": "book" },
|
|
||||||
{ "title": "Image Parameters", "href": "/docs/api/", "icon": "code" }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"slug": "prompt-engineering-basics",
|
|
||||||
"title": "Prompt Engineering for Better Image Results",
|
|
||||||
"description": "Master the art of writing prompts that generate exactly the images you need.",
|
|
||||||
"heroImage": "/blog/prompt-engineering-hero.jpg",
|
|
||||||
"category": "tutorials",
|
|
||||||
"date": "2025-01-08",
|
|
||||||
"author": {
|
|
||||||
"name": "Banatie Team",
|
|
||||||
"avatar": "/blog/authors/default.jpg"
|
|
||||||
},
|
|
||||||
"readTime": "8 min",
|
|
||||||
"relatedArticles": ["image-generation-best-practices", "placeholder-images-guide"],
|
|
||||||
"relatedDocs": [
|
|
||||||
{ "title": "Prompt Guide", "href": "/docs/guides/", "icon": "book" },
|
|
||||||
{ "title": "API Reference", "href": "/docs/api/", "icon": "code" }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"slug": "image-generation-best-practices",
|
|
||||||
"title": "Best Practices for AI Image Generation",
|
|
||||||
"description": "Learn the do's and don'ts of generating high-quality AI images for your projects.",
|
|
||||||
"heroImage": "/blog/best-practices-hero.jpg",
|
|
||||||
"category": "guides",
|
|
||||||
"date": "2025-01-05",
|
|
||||||
"author": {
|
|
||||||
"name": "Banatie Team",
|
|
||||||
"avatar": "/blog/authors/default.jpg"
|
|
||||||
},
|
|
||||||
"readTime": "6 min",
|
|
||||||
"relatedArticles": ["prompt-engineering-basics", "api-integration-tips"],
|
|
||||||
"relatedDocs": [
|
|
||||||
{ "title": "Image Quality", "href": "/docs/guides/", "icon": "book" },
|
|
||||||
{ "title": "Parameters", "href": "/docs/api/", "icon": "code" }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"slug": "use-cases-ecommerce",
|
|
||||||
"title": "AI Placeholders for E-commerce Projects",
|
|
||||||
"description": "How online stores can use AI-generated images for product mockups and prototypes.",
|
|
||||||
"heroImage": "/blog/ecommerce-hero.jpg",
|
|
||||||
"category": "use-cases",
|
|
||||||
"date": "2025-01-02",
|
|
||||||
"author": {
|
|
||||||
"name": "Banatie Team",
|
|
||||||
"avatar": "/blog/authors/default.jpg"
|
|
||||||
},
|
|
||||||
"readTime": "5 min",
|
|
||||||
"relatedArticles": ["design-workflow-optimization", "image-generation-best-practices"],
|
|
||||||
"relatedDocs": [
|
|
||||||
{ "title": "Quick Start", "href": "/docs/guides/", "icon": "book" },
|
|
||||||
{ "title": "Batch Generation", "href": "/docs/api/", "icon": "code" }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -0,0 +1,137 @@
|
||||||
|
import type { BlogPost } from './types';
|
||||||
|
|
||||||
|
export const blogPosts: BlogPost[] = [
|
||||||
|
{
|
||||||
|
slug: 'midjourney-alternatives',
|
||||||
|
title: 'Best Midjourney Alternatives in 2026',
|
||||||
|
description:
|
||||||
|
'19 AI image generators compared: UI platforms, API services, open-source options, and aggregators. Find the right tool for your needs.',
|
||||||
|
heroImage: '/blog/midjourney-alternatives-hero.png',
|
||||||
|
category: 'guides',
|
||||||
|
date: '2026-01-18',
|
||||||
|
author: {
|
||||||
|
name: 'Banatie Team',
|
||||||
|
avatar: '/blog/authors/default.jpg',
|
||||||
|
},
|
||||||
|
readTime: '25 min',
|
||||||
|
relatedArticles: ['api-integration-tips', 'placeholder-images-guide'],
|
||||||
|
relatedDocs: [
|
||||||
|
{ title: 'API Reference', href: '/docs/api/', icon: 'code' },
|
||||||
|
{ title: 'MCP Integration', href: '/docs/guides/', icon: 'terminal' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// slug: 'placeholder-images-guide',
|
||||||
|
// title: 'Getting Started with AI Placeholder Images',
|
||||||
|
// description:
|
||||||
|
// 'Learn how to use Banatie to generate contextual placeholder images for your projects.',
|
||||||
|
// heroImage: '/blog/placeholder-guide-hero.jpg',
|
||||||
|
// category: 'guides',
|
||||||
|
// date: '2025-01-15',
|
||||||
|
// author: {
|
||||||
|
// name: 'Banatie Team',
|
||||||
|
// avatar: '/blog/authors/default.jpg',
|
||||||
|
// },
|
||||||
|
// readTime: '5 min',
|
||||||
|
// relatedArticles: ['api-integration-tips', 'prompt-engineering-basics'],
|
||||||
|
// relatedDocs: [
|
||||||
|
// { title: 'API Reference', href: '/docs/api/', icon: 'code' },
|
||||||
|
// { title: 'Quick Start', href: '/docs/guides/', icon: 'book' },
|
||||||
|
// ],
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// slug: 'api-integration-tips',
|
||||||
|
// title: 'API Integration Tips for Developers',
|
||||||
|
// description:
|
||||||
|
// 'Best practices for integrating Banatie API into your applications and workflows.',
|
||||||
|
// heroImage: '/blog/api-tips-hero.jpg',
|
||||||
|
// category: 'tutorials',
|
||||||
|
// date: '2025-01-12',
|
||||||
|
// author: {
|
||||||
|
// name: 'Banatie Team',
|
||||||
|
// avatar: '/blog/authors/default.jpg',
|
||||||
|
// },
|
||||||
|
// readTime: '7 min',
|
||||||
|
// relatedArticles: ['placeholder-images-guide', 'image-generation-best-practices'],
|
||||||
|
// relatedDocs: [
|
||||||
|
// { title: 'API Reference', href: '/docs/api/', icon: 'code' },
|
||||||
|
// { title: 'Authentication', href: '/docs/guides/', icon: 'book' },
|
||||||
|
// ],
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// slug: 'design-workflow-optimization',
|
||||||
|
// title: 'Optimizing Your Design Workflow with AI Images',
|
||||||
|
// description:
|
||||||
|
// 'How designers can speed up their prototyping process using AI-generated placeholders.',
|
||||||
|
// heroImage: '/blog/design-workflow-hero.jpg',
|
||||||
|
// category: 'guides',
|
||||||
|
// date: '2025-01-10',
|
||||||
|
// author: {
|
||||||
|
// name: 'Banatie Team',
|
||||||
|
// avatar: '/blog/authors/default.jpg',
|
||||||
|
// },
|
||||||
|
// readTime: '6 min',
|
||||||
|
// relatedArticles: ['use-cases-ecommerce', 'placeholder-images-guide'],
|
||||||
|
// relatedDocs: [
|
||||||
|
// { title: 'Getting Started', href: '/docs/guides/', icon: 'book' },
|
||||||
|
// { title: 'Image Parameters', href: '/docs/api/', icon: 'code' },
|
||||||
|
// ],
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// slug: 'prompt-engineering-basics',
|
||||||
|
// title: 'Prompt Engineering for Better Image Results',
|
||||||
|
// description:
|
||||||
|
// 'Master the art of writing prompts that generate exactly the images you need.',
|
||||||
|
// heroImage: '/blog/prompt-engineering-hero.jpg',
|
||||||
|
// category: 'tutorials',
|
||||||
|
// date: '2025-01-08',
|
||||||
|
// author: {
|
||||||
|
// name: 'Banatie Team',
|
||||||
|
// avatar: '/blog/authors/default.jpg',
|
||||||
|
// },
|
||||||
|
// readTime: '8 min',
|
||||||
|
// relatedArticles: ['image-generation-best-practices', 'placeholder-images-guide'],
|
||||||
|
// relatedDocs: [
|
||||||
|
// { title: 'Prompt Guide', href: '/docs/guides/', icon: 'book' },
|
||||||
|
// { title: 'API Reference', href: '/docs/api/', icon: 'code' },
|
||||||
|
// ],
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// slug: 'image-generation-best-practices',
|
||||||
|
// title: 'Best Practices for AI Image Generation',
|
||||||
|
// description:
|
||||||
|
// "Learn the do's and don'ts of generating high-quality AI images for your projects.",
|
||||||
|
// heroImage: '/blog/best-practices-hero.jpg',
|
||||||
|
// category: 'guides',
|
||||||
|
// date: '2025-01-05',
|
||||||
|
// author: {
|
||||||
|
// name: 'Banatie Team',
|
||||||
|
// avatar: '/blog/authors/default.jpg',
|
||||||
|
// },
|
||||||
|
// readTime: '6 min',
|
||||||
|
// relatedArticles: ['prompt-engineering-basics', 'api-integration-tips'],
|
||||||
|
// relatedDocs: [
|
||||||
|
// { title: 'Image Quality', href: '/docs/guides/', icon: 'book' },
|
||||||
|
// { title: 'Parameters', href: '/docs/api/', icon: 'code' },
|
||||||
|
// ],
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// slug: 'use-cases-ecommerce',
|
||||||
|
// title: 'AI Placeholders for E-commerce Projects',
|
||||||
|
// description:
|
||||||
|
// 'How online stores can use AI-generated images for product mockups and prototypes.',
|
||||||
|
// heroImage: '/blog/ecommerce-hero.jpg',
|
||||||
|
// category: 'use-cases',
|
||||||
|
// date: '2025-01-02',
|
||||||
|
// author: {
|
||||||
|
// name: 'Banatie Team',
|
||||||
|
// avatar: '/blog/authors/default.jpg',
|
||||||
|
// },
|
||||||
|
// readTime: '5 min',
|
||||||
|
// relatedArticles: ['design-workflow-optimization', 'image-generation-best-practices'],
|
||||||
|
// relatedDocs: [
|
||||||
|
// { title: 'Quick Start', href: '/docs/guides/', icon: 'book' },
|
||||||
|
// { title: 'Batch Generation', href: '/docs/api/', icon: 'code' },
|
||||||
|
// ],
|
||||||
|
// },
|
||||||
|
];
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
import type { Metadata } from 'next';
|
import type { Metadata } from 'next';
|
||||||
import type { BlogPost } from './types';
|
import type { BlogPost } from './types';
|
||||||
import postsData from './blog-posts.json';
|
import { blogPosts } from './blog-posts';
|
||||||
|
|
||||||
export const getAllPosts = (): BlogPost[] => postsData.posts as BlogPost[];
|
export const getAllPosts = (): BlogPost[] => blogPosts;
|
||||||
|
|
||||||
export const getPostBySlug = (slug: string): BlogPost | undefined =>
|
export const getPostBySlug = (slug: string): BlogPost | undefined =>
|
||||||
(postsData.posts as BlogPost[]).find((p) => p.slug === slug);
|
blogPosts.find((p) => p.slug === slug);
|
||||||
|
|
||||||
export const getPostsBySlugs = (slugs: string[]): BlogPost[] =>
|
export const getPostsBySlugs = (slugs: string[]): BlogPost[] =>
|
||||||
slugs
|
slugs
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue