mirror of
https://github.com/jackyzha0/quartz.git
synced 2026-03-24 15:05:42 -05:00
feat: add frontmatter alias for obsidian publish
This commit is contained in:
parent
fe282292ce
commit
0289fd67f8
@ -72,8 +72,11 @@ export default (() => {
|
||||
if (fdDescription) {
|
||||
description = unescapeHTML(fdDescription)
|
||||
}
|
||||
|
||||
if (fileData.frontmatter?.socialDescription) {
|
||||
description = fileData.frontmatter.socialDescription
|
||||
} else if (fileData.frontmatter?.description) {
|
||||
description = fileData.frontmatter?.description
|
||||
}
|
||||
|
||||
if (cfg.generateSocialImages) {
|
||||
|
||||
@ -74,13 +74,15 @@ export type SocialImageOptions = {
|
||||
*/
|
||||
imageStructure: (
|
||||
cfg: GlobalConfiguration,
|
||||
userOpts: SocialImageOptions,
|
||||
userOpts: UserOpts,
|
||||
title: string,
|
||||
description: string,
|
||||
fonts: SatoriOptions["fonts"],
|
||||
) => JSXInternal.Element
|
||||
}
|
||||
|
||||
export type UserOpts = Omit<SocialImageOptions, "imageStructure">
|
||||
|
||||
export type ImageOptions = {
|
||||
/**
|
||||
* what title to use as header in image
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
import { SatoriOptions } from "satori/wasm"
|
||||
import { GlobalConfiguration } from "../cfg"
|
||||
import { SocialImageOptions } from "./imageHelper"
|
||||
import { SocialImageOptions, UserOpts } from "./imageHelper"
|
||||
|
||||
export const defaultImage: SocialImageOptions["imageStructure"] = (
|
||||
cfg: GlobalConfiguration,
|
||||
userOpts: SocialImageOptions,
|
||||
userOpts: UserOpts,
|
||||
title: string,
|
||||
description: string,
|
||||
fonts: SatoriOptions["fonts"],
|
||||
|
||||
Loading…
Reference in New Issue
Block a user