mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-30 16:24:06 -06:00
chore: improve comments + types
This commit is contained in:
parent
881eb67988
commit
2a14a898f5
@ -35,7 +35,7 @@ export interface GlobalConfiguration {
|
|||||||
*/
|
*/
|
||||||
baseUrl?: string
|
baseUrl?: string
|
||||||
/**
|
/**
|
||||||
* Wether to generate and use social images (Open Graph and Twitter standard) for link previews
|
* Wether to generate social images (Open Graph and Twitter standard) for link previews
|
||||||
*/
|
*/
|
||||||
generateSocialImages: boolean | Partial<SocialImageOptions>
|
generateSocialImages: boolean | Partial<SocialImageOptions>
|
||||||
theme: Theme
|
theme: Theme
|
||||||
|
|||||||
@ -10,7 +10,7 @@ import { JSXInternal } from "preact/src/jsx"
|
|||||||
import { unescapeHTML } from "../util/escape"
|
import { unescapeHTML } from "../util/escape"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generates social image (OG/twitter standard) and saves it as `.web` inside the public folder
|
* Generates social image (OG/twitter standard) and saves it as `.webp` inside the public folder
|
||||||
* @param opts options for generating image
|
* @param opts options for generating image
|
||||||
*/
|
*/
|
||||||
async function generateSocialImage(opts: ImageOptions, userOpts: SocialImageOptions) {
|
async function generateSocialImage(opts: ImageOptions, userOpts: SocialImageOptions) {
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import { SatoriOptions } from "satori/wasm"
|
|||||||
import { GlobalConfiguration } from "../cfg"
|
import { GlobalConfiguration } from "../cfg"
|
||||||
import { SocialImageOptions } from "./imageHelper"
|
import { SocialImageOptions } from "./imageHelper"
|
||||||
|
|
||||||
export const defaultImage = (
|
export const defaultImage: SocialImageOptions["imageStructure"] = (
|
||||||
cfg: GlobalConfiguration,
|
cfg: GlobalConfiguration,
|
||||||
userOpts: SocialImageOptions,
|
userOpts: SocialImageOptions,
|
||||||
title: string,
|
title: string,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user