mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-27 14:54:05 -06:00
Applied Prettier
This commit is contained in:
parent
aa51e3833e
commit
4d2dc5e4ac
@ -58,6 +58,7 @@ This part of the configuration concerns anything that can affect the whole site.
|
||||
- `highlight`: internal link background, highlighted text, [[syntax highlighting|highlighted lines of code]]
|
||||
- `textHighlight`: markdown highlighted text background
|
||||
- `optimizeImages`: whether to optimize images for web serving when building Quartz. If this is set to `true`:
|
||||
|
||||
- JPEG and PNG images will be stripped all metadata and converted to WebP format, and associated image links in [[wikilinks]] will be updated with the new file extension.
|
||||
- A resized preview image will replace every local image that have custom dimensions defined either in their [wikilink](https://help.obsidian.md/syntax#External+images) or <img> tag. The original image (optimized or not) will still be assessable as a link on the preview image.
|
||||
|
||||
|
||||
@ -6,11 +6,9 @@ import { imageExtsToOptimize, previewImageMap, targetOptimizedImageExt } from ".
|
||||
import { FullSlug, getFileExtension, isAbsoluteURL, RelativeURL } from "../../util/path"
|
||||
import { parseSelector } from "hast-util-parse-selector"
|
||||
|
||||
export interface Options {
|
||||
}
|
||||
export interface Options {}
|
||||
|
||||
const defaultOptions: Options = {
|
||||
}
|
||||
const defaultOptions: Options = {}
|
||||
|
||||
/**
|
||||
* File extensions of all supported image format. Files with an extension
|
||||
@ -36,6 +34,7 @@ export const supportedImageExts: ReadonlySet<string> = new Set([
|
||||
* Add this plugin after all Markdown parser plugins in quartz.config.
|
||||
*/
|
||||
export const Images: QuartzTransformerPlugin<Partial<Options>> = (userOpts) => {
|
||||
//@ts-ignore
|
||||
const opts = { ...defaultOptions, ...userOpts }
|
||||
|
||||
return {
|
||||
|
||||
@ -228,7 +228,7 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin<Partial<Options>>
|
||||
// embed cases
|
||||
if (value.startsWith("!")) {
|
||||
const ext: string = path.extname(fp).toLowerCase()
|
||||
let url = slugifyFilePath(fp as FilePath)
|
||||
const url = slugifyFilePath(fp as FilePath)
|
||||
|
||||
// Handle images
|
||||
if (supportedImageExts.has(ext)) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user