Skip to content

getscissorhands/plugins

Repository files navigation

ScissorHands Plugins

Collection of the official plugins for ScissorHands.NET

List of Plugins

Name Description
Google Analytics Google Analytics plugin
Open Graph Open Graph plugin

Build Your Plugin

  1. Set environment variables for GitHub NuGet Package Registry.

    # zsh/bash
    source ./scripts/setup-gh-auth.sh --username "<GITHUB_USERNAME>" --token "<GITHUB_TOKEN>"
    # PowerShell
    . ./scripts/setup-gh-auth.ps1 -Username "<GITHUB_USERNAME>" -Token "<GITHUB_TOKEN>"

    NOTE: Make sure to sourcing the script instead of executing it.

  2. Create a class library.

    dotnet new classlib -n MyAwesomeScissorHandsPlugin
  3. Add a NuGet package.

    dotnet add package ScissorHands.Plugin --prerelease
  4. Create a plugin class inheriting the ContentPlugin class.

    public class MyAwesomeScissorHandsPlugin : ContentPlugin
    {
        public override string Name => "My Awesome ScissorHands Plugin";
    
        public override async Task<ContentDocument> PreMarkdownAsync(ContentDocument document, PluginManifest plugin, SiteManifest site, CancellationToken cancellationToken = default)
        {
            // ADD LOGIC HERE
        }
    
        public override async Task<ContentDocument> PostMarkdownAsync(ContentDocument document, PluginManifest plugin, SiteManifest site, CancellationToken cancellationToken = default)
        {
            // ADD LOGIC HERE
        }
    
        public override async Task<string> PostHtmlAsync(string html, ContentDocument document, PluginManifest plugin, SiteManifest site, CancellationToken cancellationToken = default)
        {
            // ADD LOGIC HERE
        }
    }

Issues?

If you find any issues, please report them.

About

Collection of the official plugins for ScissorHands.NET

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors