vowel 0.6.2 → 0.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -18
- package/bin.js +41 -4
- package/config.js +28 -9
- package/package.json +5 -1
- package/plugins/deploy-cloudflare/index.js +78 -0
- package/plugins/fonts/index.js +2 -2
- package/plugins/html/image.js +78 -0
- package/plugins/html/index.js +788 -0
- package/plugins/images/index.js +5 -5
- package/plugins/markdown/index.js +141 -1063
- package/plugins/markdown/metadata.js +147 -0
- package/plugins/markdown/robots.js +18 -0
- package/plugins/styles/index.js +6 -14
- package/plugins/urls/index.js +91 -0
- package/plugins/vectors/index.js +1 -1
- package/plugins/xml/index.js +25 -14
- package/stylesheets/DefaultStyles.css +505 -385
- package/stylesheets/SyntaxHighlightingStyles.css +237 -0
- package/stylesheets/TypographyStyles.css +7 -64
- package/stylesheets/brand-colors.css +119 -0
- package/utils.js +2 -2
package/plugins/images/index.js
CHANGED
|
@@ -8,12 +8,12 @@ import {createImagePath, imageSizes, imageExts } from "./../../utils.js"
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
/** @type {Votive.ProcessorWrite} */
|
|
11
|
-
async function writeImage(
|
|
12
|
-
const { uuid, sourcePath } =
|
|
11
|
+
async function writeImage(target, settings, api, config) {
|
|
12
|
+
const { uuid, sourcePath } = target.abstract
|
|
13
13
|
|
|
14
14
|
const defaultFormat = path.extname(sourcePath)
|
|
15
15
|
|
|
16
|
-
const image = sharp(
|
|
16
|
+
const image = sharp(target.path)
|
|
17
17
|
|
|
18
18
|
const images = imageSizes.flatMap(size => {
|
|
19
19
|
[...imageExts, defaultFormat].map(ext => {
|
|
@@ -21,7 +21,7 @@ async function writeImage(destination, database, config) {
|
|
|
21
21
|
targetFilePath: sourcePath,
|
|
22
22
|
size,
|
|
23
23
|
ext,
|
|
24
|
-
targetDirectory: config.
|
|
24
|
+
targetDirectory: config.targetFolder,
|
|
25
25
|
uuid
|
|
26
26
|
})
|
|
27
27
|
|
|
@@ -31,7 +31,7 @@ async function writeImage(destination, database, config) {
|
|
|
31
31
|
|
|
32
32
|
await Promise.all(images)
|
|
33
33
|
|
|
34
|
-
const buffer = await fs.readFile(
|
|
34
|
+
const buffer = await fs.readFile(target.path)
|
|
35
35
|
|
|
36
36
|
return {
|
|
37
37
|
data: buffer,
|