/goplay

:hamster: Embed Go Playground on your Website

Primary LanguageTypeScriptMIT LicenseMIT

goplay

Embeded Go Playground on your Websites

npm install @ggicci/goplay

Read goplay: Embed Go Playground on your Website to learn how it works.

Use Cases

Work with Hugo | demo

When working with Hugo, we can use @ggicci/goplay to render a Go code block as a readonly but runnable Go Playground widget. A hugo shortcode called goplay has already been invented.

Read hugo-shortcode-goplay for details to know how to use it. It should be very easy and handy.

Work with Docusaurus | demo

When working with Docusaurus, we can create a custom component to use @ggicci/goplay to wrap its native CodeBlock component with Go Playground support. Here's an example: GoPlay.tsx.

Work with Ghost | demo | gist

Customizations

Use @ggicci/goplay's API directly. Read use @ggicci/goplay for details and sample code.

Resources