Statiq.Alerts
0.1.0
dotnet add package Statiq.Alerts --version 0.1.0
NuGet\Install-Package Statiq.Alerts -Version 0.1.0
<PackageReference Include="Statiq.Alerts" Version="0.1.0" />
paket add Statiq.Alerts --version 0.1.0
#r "nuget: Statiq.Alerts, 0.1.0"
// Install Statiq.Alerts as a Cake Addin #addin nuget:?package=Statiq.Alerts&version=0.1.0 // Install Statiq.Alerts as a Cake Tool #tool nuget:?package=Statiq.Alerts&version=0.1.0
Statiq.Alerts
Extension for Statiq site generator to add alerts.
Table of Contents
Install
- Add the
Statiq.Alerts
NuGet package to the Statiq project - Call
.AddAlertShortCodes()
on the bootstrapper
Requirements
The extension requires that Bootstrap and FontAwesome are loaded by the Statiq theme.
Usage
See Using Shortcodes for detailed instructions how to use shortcodes in Statiq.
Tip
<?# Tip ?>
This is a tip
<?#/ Tip ?>
Shows a tip alert:
Info
<?# Info ?>
This is an info message
<?#/ Info ?>
Shows an info message:
Note
<?# Note ?>
This is a note
<?#/ Note ?>
Shows a note:
Warning
<?# Warning ?>
This is a warning
<?#/ Warning ?>
Shows a warning:
Important
<?# Important ?>
This is an important message
<?#/ Important ?>
Shows an important message:
API
Custom Shortcuts
Additional custom shortcuts can be implemented by inheriting from the AlertShortcode
class and
define the DefaultAlertClass
, DefaultAlertIcon
and DefaultAlertTitle
properties.
See Parameters for documentation about possible values.
Parameters
The following parameters are available on all shortcuts and allow to override the default styling.
Class
The Class
parameter allows to override the CSS class of the alert div
element:
<?# Note Class="alert-secondary"?>
This is a note rendered in the secondary color
<?#/ Note ?>
The alert
class will always be set.
Icon
Changing the icon
The Icon
parameters allows to override the icon of the alert:
<?# Note Title="fa-check"?>
This is a note with a different icon
<?#/ Note ?>
Any Fontawesome icon can be used.
The fa-solid
class will always be set.
Removing the icon
To remove the icon the Icon
parameter can be set to an empty string:
<?# Note Iocn=""?>
This is a note without an icon
<?#/ Note ?>
Title
Changing the title
The Title
parameters allows to override the title of the alert:
<?# Note Title="Custom Title"?>
This is a note with a custom title
<?#/ Note ?>
Removing the title
To remove the title the Title
parameter can be set to an empty string:
<?# Note Title=""?>
This is a note without a title
<?#/ Note ?>
Contributing
We accept Pull Requests
License
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. 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 is compatible. 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 is compatible. 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. |
-
net6.0
- Statiq.Web (>= 1.0.0-beta.60)
-
net7.0
- Statiq.Web (>= 1.0.0-beta.60)
-
net8.0
- Statiq.Web (>= 1.0.0-beta.60)
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 |
---|---|---|
0.1.0 | 3,237 | 3/14/2024 |