gridsome-plugin-remark-shiki icon indicating copy to clipboard operation
gridsome-plugin-remark-shiki copied to clipboard

Custom theme option doesn't load

Open djmtype opened this issue 2 years ago • 0 comments

When I try to load a custom theme as demonstrated by the readme, my theme does not get applied.

Instead, I get this message returned to the console: Shiki theme [object Object] could not get loaded.

I also tried adding shiki separately from npm. No luck.

My config looks like this:

const shiki = require("shiki");
const monokaiPro = shiki.loadTheme("./static/monokai-pro.json");

module.exports = {
transformers: {
		remark: {
			externalLinksTarget: "_blank",
			externalLinksRel: ["nofollow", "noopener", "noreferrer"],
			anchorClassName: "icon icon-link",
			plugins: [
				"@silvenon/remark-smartypants",

				"@noxify/gridsome-remark-table-align",
				[
					"@noxify/gridsome-remark-classes",
					{
						table: "table",
						"tableCell[align=center]": "txt-center",
						"tableCell[align=right]": "txt-right",
					},
				],
				[
					"gridsome-plugin-remark-shiki",
					{ theme: monokaiPro, skipInline: true },
				],
			],
			config: {
				footnotes: true,
			},
		},
	},
}

djmtype avatar Oct 18 '21 22:10 djmtype