This is a Jekyll plugin that allows you to embed CodeSandbox projects in your Jekyll posts. It takes a CodeSandbox project URL and generates an iframe with the project embedded.
Add this line to your Jekyll site's Gemfile
:
group :jekyll_plugins do
gem 'jekyll-codesandbox'
end
And then execute:
$ bundle
Or install it yourself as:
$ gem install jekyll-codesandbox
and add the following to your site's _config.yml
:
plugins:
- jekyll-codesandbox
To embed a CodeSandbox project in your Jekyll post, use the following Liquid tag:
{% codesandbox https://codesandbox.io/p/sandbox/id %}
This will generate an iframe with the project embedded.
<iframe src="https://codesandbox.io/p/sandbox/id?fontsize=14&hidenavigation=1&theme=dark"></iframe>