Toolbelt.Blazor.HeadElement.Services 0.0.1-preview2.0.2

This is a prerelease version of Toolbelt.Blazor.HeadElement.Services.
There is a newer version of this package available.
See the version list below for details.
dotnet add package Toolbelt.Blazor.HeadElement.Services --version 0.0.1-preview2.0.2
NuGet\Install-Package Toolbelt.Blazor.HeadElement.Services -Version 0.0.1-preview2.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="Toolbelt.Blazor.HeadElement.Services" Version="0.0.1-preview2.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Toolbelt.Blazor.HeadElement.Services --version 0.0.1-preview2.0.2
#r "nuget: Toolbelt.Blazor.HeadElement.Services, 0.0.1-preview2.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.
// Install Toolbelt.Blazor.HeadElement.Services as a Cake Addin
#addin nuget:?package=Toolbelt.Blazor.HeadElement.Services&version=0.0.1-preview2.0.2&prerelease

// Install Toolbelt.Blazor.HeadElement.Services as a Cake Tool
#tool nuget:?package=Toolbelt.Blazor.HeadElement.Services&version=0.0.1-preview2.0.2&prerelease

Blazor Head Element Helper NuGet Package

Summary

This component and services allows you to change the title of document, "meta" elements such as OGP, on your Blazor app.

This package supports both seiver-side Blazor and client-side Blazor WebAssembly app.

And also supports server-side pre-rendering on your server-side Blazor app.

NOTICE! - This is "Preview" Release

This package is "preview" release at this time.

Some implementations of this packages depends on internals of ASP.NET Core Components.

Especially, server-side pre-rendering is very slow and stressfull, because it captures all requests and buffering all responses on memory.
19 Sep, 2019 - Fixed this issue at v.0.0.1-preview2.

How to use

Installation

  1. Add package to your project like this.
dotnet add package Toolbelt.Blazor.HeadElement --version 0.0.2-preview2.0.2
  1. Register "Head Element Helper" service at your Blazor app's Startup.
using Toolbelt.Blazor.Extensions.DependencyInjection; // <- Add this, and...

public class Startup
{
  public void ConfigureServices(IServiceCollection services)
  {
    services.AddHeadElementHelper(); // <- Add this.
    ...
  1. Open Toolbelt.Blazor.HeadElement namespace in _Imports.razor file.
@* This is "_Imports.razor" *@
...
@using Toolbelt.Blazor.HeadElement

A. Change the title of document

  1. Markup <Title> component in your .razor file.
@* This is "Pages/Counter.razor" *@
@page "/counter"

<Title>Counter(@currentCount) - Server Side App</Title>

The title of document will be changed.

fig1

B. Change "meta" elements

You can also add or override "meta" elements at runtime dynamically using <Meta> component like this.

@* This is "Pages/Counter.razor" *@
@page "/counter"

<Meta Property="ogp:title" Content="Counter" />

C. Server-side pre-rendering support

If you want to get srever-side pre-rendering support, do this.

  1. Add Toolbelt.Blazor.HeadElement.ServerPrerendering package to your project like this.
dotnet add package Toolbelt.Blazor.HeadElement.ServerPrerendering --version 0.0.1-preview2.0.2
  1. Register "Head Element Server Prerendering" middleware at your server-side Blazor app's Startup, before appUseStaticFiles().
using Toolbelt.Blazor.Extensions.DependencyInjection; // <- Add this, and...

public class Startup
{
  public void Configure(IApplicationBuilder app)
  {
    app.UseHeadElementServerPrerendering(); // <- Add this.
    ...
    app.UseStaticFiles()
    ...

fig2

License

Mozilla Public License Version 2.0

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Toolbelt.Blazor.HeadElement.Services:

Package Downloads
Toolbelt.Blazor.HeadElement

Head element support (change the document title, "meta" elements such as OGP, and "link" elements such as canonical url, favicon) for Blazor apps.

Toolbelt.Blazor.HeadElement.ServerPrerendering

Head element support (change the document title, "meta" elements such as OGP, and "link" elements such as canonical url, favicon) for Blazor apps.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
7.3.1 19,665 12/16/2022
7.3.0 3,922 10/29/2022
7.3.0-preview.1 96 10/27/2022
7.1.1 3,714 9/18/2022
7.1.1-preview.1 117 9/8/2022
7.1.0 11,828 3/28/2022
7.0.0 4,751 1/23/2022
6.0.2 6,413 12/15/2021
6.0.1 2,416 11/30/2021
6.0.0 21,786 9/4/2021
6.0.0-preview.4 245 8/17/2021
6.0.0-preview.3 180 8/12/2021
6.0.0-preview.2 282 8/7/2021
6.0.0-preview.1 261 7/31/2021
1.5.3 4,523 7/30/2021
1.5.3-preview.1 313 7/10/2021
1.5.1 27,020 1/30/2021
1.5.0 3,075 1/10/2021
1.4.0 779 1/10/2021
1.3.0 1,082 1/9/2021
1.2.0 32,042 6/4/2020
1.2.0-beta 413 5/29/2020
1.1.0.1 4,742 1/18/2020
1.0.0 1,037 11/1/2019
0.0.1-preview2.0.2 276 9/19/2019
0.0.1-preview1.0.1 267 9/12/2019