feat: zeropost-web — публичный AI-блог на zeropost.ru
- Next.js 16, Tailwind с @tailwindcss/typography - Главная: hero, featured-статья, сетка карточек, облако тегов - /blog/[slug]: статья со SSG + revalidate 60s, prose typography - /tag/[name]: фильтр по тегам - /about: про проект - /api/cron/generate: endpoint для авто-генерации (защищён x-cron-token) - SEO: dynamic metadata, OG, sitemap-ready - Лента грузится с zeropost-engine /api/articles
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { marked } from 'marked';
|
||||
|
||||
marked.setOptions({
|
||||
gfm: true,
|
||||
breaks: false,
|
||||
});
|
||||
|
||||
export function renderMarkdown(md) {
|
||||
return marked.parse(md || '');
|
||||
}
|
||||
|
||||
export function formatDate(iso) {
|
||||
if (!iso) return '';
|
||||
const d = new Date(iso);
|
||||
return d.toLocaleDateString('ru-RU', { day: 'numeric', month: 'long', year: 'numeric' });
|
||||
}
|
||||
Reference in New Issue
Block a user