feat: add thumbhashes to images closes #6
This commit is contained in:
@@ -4,6 +4,7 @@ import { createCrud } from "@lib/crud.ts";
|
||||
import { stringify } from "$std/yaml/stringify.ts";
|
||||
import { extractHashTags, formatDate } from "@lib/string.ts";
|
||||
import { fixRenderedMarkdown } from "@lib/helpers.ts";
|
||||
import { getThumbhash } from "@lib/cache/image.ts";
|
||||
|
||||
export type Article = {
|
||||
id: string;
|
||||
@@ -15,6 +16,7 @@ export type Article = {
|
||||
status: "finished" | "not-finished";
|
||||
date: Date;
|
||||
link: string;
|
||||
thumbnail?: string;
|
||||
image?: string;
|
||||
author?: string;
|
||||
rating?: number;
|
||||
@@ -24,6 +26,7 @@ export type Article = {
|
||||
const crud = createCrud<Article>({
|
||||
prefix: "Media/articles/",
|
||||
parse: parseArticle,
|
||||
hasThumbnails: true,
|
||||
});
|
||||
|
||||
function renderArticle(article: Article) {
|
||||
|
||||
Reference in New Issue
Block a user