Lantern.Umbraco 1.0.2

dotnet add package Lantern.Umbraco --version 1.0.2
                    
NuGet\Install-Package Lantern.Umbraco -Version 1.0.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Lantern.Umbraco" Version="1.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Lantern.Umbraco" Version="1.0.2" />
                    
Directory.Packages.props
<PackageReference Include="Lantern.Umbraco" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Lantern.Umbraco --version 1.0.2
                    
#r "nuget: Lantern.Umbraco, 1.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Lantern.Umbraco@1.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Lantern.Umbraco&version=1.0.2
                    
Install as a Cake Addin
#tool nuget:?package=Lantern.Umbraco&version=1.0.2
                    
Install as a Cake Tool

Lantern for Umbraco

NuGet Umbraco Marketplace License: MIT

Inject the Lantern bug-tracking widget into every frontend page of your Umbraco site — no template changes required. Configure your embed key right from the Umbraco backoffice.


Features

  • 🔑 Backoffice settings — paste your Lantern embed key in the Settings → Lantern dashboard
  • Automatic injection — the <script> tag is inserted before </body> on all public HTML pages via ASP.NET Core middleware
  • 🛡️ Backoffice excluded/umbraco routes are always skipped
  • 📋 Config fallback — set Lantern:EmbedKey in appsettings.json as a static fallback (database value takes precedence)
  • 🎛️ Path exclusions — optionally exclude specific path prefixes from injection
  • 🏷️ Header badge — a subtle status indicator in the backoffice toolbar

Requirements

Requirement Version
Umbraco CMS 17.x
.NET 10.0

Installation

NuGet Package Manager

dotnet add package Lantern.Umbraco

Package Manager Console

Install-Package Lantern.Umbraco

No additional Program.cs or Startup.cs changes are needed — the composer handles everything automatically.


Configuration

  1. Log into the Umbraco backoffice
  2. Navigate to Settings → Lantern
  3. Paste your embed key from lanternhq.appSettings → Widget
  4. Click Save embed key

Done — the widget is live on your site immediately.

Option 2: appsettings.json

Add the following to your appsettings.json (or environment-specific variant):

{
  "Lantern": {
    "EmbedKey": "your-embed-key-here"
  }
}

The backoffice-stored value always takes precedence over this configuration value.

Full configuration options

{
  "Lantern": {
    "EmbedKey": "your-embed-key-here",
    "Enabled": true,
    "ExcludedPaths": [
      "/health",
      "/robots.txt",
      "/sitemap.xml",
      "/api"
    ]
  }
}
Property Type Default Description
EmbedKey string null Your Lantern embed key (backoffice value takes precedence)
Enabled bool true Set to false to disable injection site-wide
ExcludedPaths string[] [] Path prefixes to exclude from injection

How it works

The package registers an ASP.NET Core middleware (LanternWidgetMiddleware) that:

  1. Buffers HTML responses (responses with Content-Type: text/html)
  2. Finds the last </body> tag in the response
  3. Injects <script src="https://lanternhq.app/api/widget/script" data-key="..." defer></script> immediately before it
  4. Streams the modified response back to the client

Non-HTML responses (JSON, images, CSS, etc.), backoffice routes (/umbraco), and any configured ExcludedPaths are always passed through unmodified.


Management API

The package exposes a management API used by the backoffice dashboard. You can call it directly if needed:

Get settings

GET /umbraco/management/api/v1/lantern/settings
Authorization: Umbraco backoffice session

Response:

{
  "embedKey": "ltrn_live_abc123",
  "enabled": true,
  "isStoredInDatabase": true,
  "scriptTagPreview": "<script src=\"https://lanternhq.app/api/widget/script\" data-key=\"ltrn_live_abc123\" defer></script>"
}

Save settings

POST /umbraco/management/api/v1/lantern/settings
Content-Type: application/json
Authorization: Umbraco backoffice session

{
  "embedKey": "ltrn_live_abc123"
}

Building from source

git clone https://github.com/lanternhqapp/lantern-umbraco.git
cd lantern-umbraco
dotnet build

Create the NuGet package

dotnet pack src/Lantern.Umbraco/Lantern.Umbraco.csproj \
  --configuration Release \
  --output ./artifacts

Publish to NuGet.org

dotnet nuget push ./artifacts/Lantern.Umbraco.1.0.0.nupkg \
  --api-key YOUR_NUGET_API_KEY \
  --source https://api.nuget.org/v3/index.json

Our Umbraco submission

When submitting to the Our Umbraco package repository:

  1. Build the NuGet package (see above)
  2. Navigate to our.umbraco.com/member/profile/packages
  3. Fill in:
    • Package name: Lantern
    • NuGet package ID: Lantern.Umbraco
    • Compatible Umbraco versions: 17+
    • Category: Website Utilities
    • Tags: bug-tracking, widget, monitoring, feedback

License

MIT — see LICENSE for details.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.2 96 5/27/2026