Skip to content
This repository has been archived by the owner on Sep 24, 2023. It is now read-only.

Custom theme option doesn't load #25

Open
djmtype opened this issue Oct 18, 2021 · 0 comments
Open

Custom theme option doesn't load #25

djmtype opened this issue Oct 18, 2021 · 0 comments

Comments

@djmtype
Copy link

djmtype commented Oct 18, 2021

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,
			},
		},
	},
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant