add simple admin service
Build and deploy / deploy (push) Successful in 16s

This commit is contained in:
2026-05-18 02:48:47 +03:00
parent 10a83d39a2
commit 3a3b2bcfc0
84 changed files with 2134 additions and 5 deletions
@@ -0,0 +1,15 @@
import { markdownToHtml } from '../../shared/lib/markdown.js';
export function createArticleDraft({ articles, assets }) {
return {
slug: `new-post-${Date.now()}`,
title: 'Новая статья',
date: new Date().toISOString(),
author: articles[0]?.author || 'DarkRiDDeR',
categories: articles[0]?.categories || ['Разное'],
cover: assets[0] || '/assets/illustrations/vibe-cover.svg',
excerpt: 'Короткий анонс статьи.',
contentHtml: markdownToHtml('Текст статьи.'),
readingMinutes: 1,
};
}