mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-31 00:34:05 -06:00
Default to inline: false
This commit is contained in:
parent
35d619b272
commit
8a71036c50
@ -88,7 +88,6 @@ export const Latex: QuartzTransformerPlugin<Options> = (opts?: Options) => {
|
|||||||
{
|
{
|
||||||
// base css
|
// base css
|
||||||
content: "https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.9/katex.min.css",
|
content: "https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.9/katex.min.css",
|
||||||
inline: false,
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
js: [
|
js: [
|
||||||
|
|||||||
@ -34,7 +34,6 @@ export const Latex: QuartzTransformerPlugin<Partial<Options>> = (opts) => {
|
|||||||
{
|
{
|
||||||
// base css
|
// base css
|
||||||
content: "https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.9/katex.min.css",
|
content: "https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.9/katex.min.css",
|
||||||
inline: false,
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
js: [
|
js: [
|
||||||
|
|||||||
@ -18,7 +18,7 @@ export type JSResource = {
|
|||||||
|
|
||||||
export type CSSResource = {
|
export type CSSResource = {
|
||||||
content: string
|
content: string
|
||||||
inline: boolean
|
inline?: boolean
|
||||||
spaPreserve?: boolean
|
spaPreserve?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -44,7 +44,7 @@ export function JSResourceToScriptElement(resource: JSResource, preserve?: boole
|
|||||||
|
|
||||||
export function CSSResourceToStyleElement(resource: CSSResource, preserve?: boolean): JSX.Element {
|
export function CSSResourceToStyleElement(resource: CSSResource, preserve?: boolean): JSX.Element {
|
||||||
const spaPreserve = preserve ?? resource.spaPreserve
|
const spaPreserve = preserve ?? resource.spaPreserve
|
||||||
if (resource.inline) {
|
if (resource.inline ?? false) {
|
||||||
return <style>{resource.content}</style>
|
return <style>{resource.content}</style>
|
||||||
} else {
|
} else {
|
||||||
return (
|
return (
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user