Skip to content

terryjbutler/gatsby-remark-dotnet-fiddle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gatsby-remark-dotnet-fiddle

Getting Started

Install the plugin:

npm i gatsby-remark-dotnet-fiddle

or

yarn add gatsby-remark-dotnet-fiddle

Example gatsby-config.js

Add gatsby-remark-dotnet-fiddle as a child plugin under the gatsby-transformer-remark plugin:

{
  resolve: `gatsby-transformer-remark`,
  options: {
    plugins: [
      {
        resolve: "gatsby-remark-dotnet-fiddle",
        options: {
          height: 600
        }        
      }
    ]
  }
}

Example Usage

In a markdown file, simply copy the URL to any .NET Fiddle and paste it on its own line as follows:

---
title: "An example .NET Fiddle"
date: "2021-08-05"
categories: 
  - "Uncategorized"
---

An example .NET Fiddle:

https://dotnetfiddle.net/CsCons 

An iframe containing the .NET Fiddle will appear. 🥂

Credits

I also use this wonderful plugin @weknow/gatsby-remark-codepen on my personal blog for showing Codepen snippets which served as the inspiration and basis for this plugin.

About

Embed a .NET Fiddle into a Gatsby markdown post

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published