feat: add script to generate default blog cover image
- Introduced a new script `make-blog-cover.mjs` to create a default cover image for blog posts. - The image is generated in PNG format with dimensions 1200x630, suitable for Open Graph. - Utilizes the site's branding colors and logo from `public/nobat724.svg`. - Includes custom font styling using the Vazirmatn font. - The generated image is saved to `public/assets/images/blog-default-cover.png`.
This commit is contained in:
@@ -2,12 +2,10 @@ import CustomLoading from "@/app/component/loading/Custom";
|
||||
import TextLoading from "@/app/component/loading/Text";
|
||||
import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
import { convertTimestampToJalali, imageUrl } from "@/helper";
|
||||
import { blogCover, convertTimestampToJalali } from "@/helper";
|
||||
|
||||
function Article({ data }) {
|
||||
const imageSrc = data.images?.[0]?.url
|
||||
? imageUrl(data.images[0].url, "/assets/images/cover-blog-1.png")
|
||||
: "/assets/images/cover-blog-1.png";
|
||||
const imageSrc = blogCover(data);
|
||||
const createdDate = data.created ? convertTimestampToJalali(data.created) : "";
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user