andrewbranch / gatsby-remark-vscode

Gatsby plugin to provide VS Code’s syntax highlighting to Markdown code fences
MIT License
296 stars 27 forks source link

How to use the GitHub VSCode theme #171

Closed ghoshnirmalya closed 2 years ago

ghoshnirmalya commented 2 years ago

I would like to use the GitHub Dark Default theme. However, if I use it like the following:

{
  theme: "GitHub Dark Default",
  extensions: ["github-vscode-theme"],
},

I get the following error:

..

errno: -2,
syscall: 'open',
path: '/Users/username/project_name/node_modules/github-vscode-theme/themes/light-default.json',

..

If I use the following:

{
  theme: "GitHub Dark Default",
  extensions: [
    "./node_modules/github-vscode-theme/themes/dark-default.json",
  ],
}

I get the following error:

Error: Invalid option 'extensions': Extension paths must be absolute. Received './node_modules/github-vscode-theme/themes/dark-default.json'.

Is there a way in which I can use the GitHub default dark theme?

andrewbranch commented 2 years ago

It looks like that repo generates their theme files with a build step, so installing it straight from GitHub won’t work. You’d have to build yourself a local copy, or ask them to publish a built version as a package somewhere. Sorry, some theme repos just aren’t easy to work with 😕

ghoshnirmalya commented 2 years ago

No problem. Thank you for your reply.