An open API service indexing awesome lists of open source software.

https://github.com/getscissorhands/plugins

Collection of the official plugins for ScissorHands.NET
https://github.com/getscissorhands/plugins

blazor dotnet plugins static-site-generator

Last synced: 6 months ago
JSON representation

Collection of the official plugins for ScissorHands.NET

Awesome Lists containing this project

README

          

# ScissorHands Plugins

Collection of the official plugins for ScissorHands.NET

## List of Plugins

| Name | Description |
|-------------------------------------------------------------------------|-------------------------|
| [Google Analytics](./src/ScissorHands.Plugin.GoogleAnalytics/README.md) | Google Analytics plugin |
| [Open Graph](./src/ScissorHands.Plugin.OpenGraph/README.md) | Open Graph plugin |

## Build Your Plugin

1. Set environment variables for GitHub NuGet Package Registry.

```bash
# zsh/bash
source ./scripts/setup-gh-auth.sh --username "" --token ""
```

```powershell
# PowerShell
. ./scripts/setup-gh-auth.ps1 -Username "" -Token ""
```

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

1. Create a class library.

```bash
dotnet new classlib -n MyAwesomeScissorHandsPlugin
```

1. Add a NuGet package.

```bash
dotnet add package ScissorHands.Plugin --prerelease
```

1. Create a plugin class inheriting the `ContentPlugin` class.

```csharp
public class MyAwesomeScissorHandsPlugin : ContentPlugin
{
public override string Name => "My Awesome ScissorHands Plugin";

public override async Task PreMarkdownAsync(ContentDocument document, PluginManifest plugin, SiteManifest site, CancellationToken cancellationToken = default)
{
// ADD LOGIC HERE
}

public override async Task PostMarkdownAsync(ContentDocument document, PluginManifest plugin, SiteManifest site, CancellationToken cancellationToken = default)
{
// ADD LOGIC HERE
}

public override async Task PostHtmlAsync(string html, ContentDocument document, PluginManifest plugin, SiteManifest site, CancellationToken cancellationToken = default)
{
// ADD LOGIC HERE
}
}
```

## Issues?

If you find any issues, please [report them](../../issues).