-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
42552fc
commit 234534e
Showing
29 changed files
with
755 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"version": 1, | ||
"isRoot": true, | ||
"tools": { | ||
"cake.tool": { | ||
"version": "1.3.0", | ||
"commands": [ | ||
"dotnet-cake" | ||
] | ||
} | ||
} | ||
} |
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# These owners will be the default owners for everything in the repo and | ||
# will be requested for review when someone opens a pull request. | ||
* @swissgrc/development |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
"extends": [ | ||
"github>cake-contrib/renovate-presets:cake-recipe" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- develop | ||
- "feature/**" | ||
- "release/**" | ||
- "hotfix/**" | ||
tags: | ||
- "*" | ||
paths-ignore: | ||
- "README.md" | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ windows-2022, ubuntu-22.04, macos-12 ] | ||
|
||
env: | ||
GITHUB_PAT: ${{ secrets.GH_TOKEN }} | ||
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} | ||
NUGET_SOURCE: "https://api.nuget.org/v3/index.json" | ||
|
||
steps: | ||
- name: Checkout the repository | ||
uses: actions/[email protected] | ||
- name: Fetch all tags and branches | ||
run: git fetch --prune --unshallow | ||
- uses: actions/[email protected] | ||
with: | ||
# codecov needs 2.1, unittests needs 3.1, gitversion needs 5.0 | ||
dotnet-version: | | ||
2.1 | ||
5.0 | ||
6.0 | ||
7.0 | ||
8.0 | ||
- name: Cache Tools | ||
uses: actions/[email protected] | ||
with: | ||
path: tools | ||
key: ${{ runner.os }}-tools-${{ hashFiles('recipe.cake') }} | ||
- name: Build project | ||
uses: cake-build/[email protected] | ||
with: | ||
script-path: recipe.cake | ||
target: CI | ||
cake-version: 1.3.0 | ||
- name: Upload Issues | ||
uses: actions/[email protected] | ||
with: | ||
if-no-files-found: warn | ||
name: ${{ matrix.os }} Issues | ||
path: | | ||
BuildArtifacts/report.html | ||
BuildArtifacts/**/coverlet/*.xml | ||
- name: Upload Packages | ||
uses: actions/[email protected] | ||
if: runner.os == 'Windows' | ||
with: | ||
if-no-files-found: warn | ||
name: package | ||
path: BuildArtifacts/Packages/**/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"dotnet.defaultSolution": "src\\Statiq.Alerts.sln" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,61 @@ | ||
# Statiq.Alerts | ||
📙 Extension for Statiq site generator to add annotations | ||
|
||
<!-- markdownlint-disable MD013 --> | ||
[![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/swissgrc/Statiq.Alerts/blob/main/LICENSE) [![Build](https://img.shields.io/github/actions/workflow/status/swissgrc/Statiq.Alerts/build.yml?branch=develop&style=flat-square)](https://github.com/swissgrc/Statiq.Alerts/actions/workflows/build.yml) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=swissgrc_Statiq.Alerts&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=swissgrc_Statiq.Alerts) [![Downloads](https://img.shields.io/nuget/dt/Statiq.Alerts?style=flat-square)](https://www.nuget.org/packages/Statiq.Alerts) | ||
<!-- markdownlint-restore --> | ||
|
||
Extension for [Statiq site generator] to add alerts. | ||
|
||
## Requirements | ||
|
||
The extensions require that [Bootstrap] and [FontAwesome] are loaded. | ||
|
||
## Using | ||
|
||
1. Add the `Statiq.Alerts` NuGet package to the Statiq project | ||
2. Call `.AddAlertShortCodes()` on the bootstrapper | ||
|
||
## Available Shortcodes | ||
|
||
### Tip | ||
|
||
### Info | ||
|
||
### Note | ||
|
||
### Warning | ||
|
||
### Important | ||
|
||
## Custom Shortcuts | ||
|
||
Additional custom shortcuts can be implemented by inheriting from the `AlertShortcode` class and | ||
define the `DefaultAlertClass`, `DefaultAlertIcon` and `DefaultAlertTitle` properties. | ||
See [Parameters](#Parameters) for documentation about possible values. | ||
|
||
## Parameters | ||
|
||
The following parameters are available on all shortcuts and allow to override the default styling. | ||
|
||
### Class | ||
|
||
Allows to override the CSS class of the alert `div` element. | ||
The `alert` class will always be set. | ||
|
||
### Icon | ||
|
||
Allows to override the icon of the alert. | ||
Any [Fontawesome] icon can be used. | ||
The `fa-solid` class will always be set. | ||
|
||
Can be an empty string to hide the icon. | ||
|
||
### Title | ||
|
||
Allow to override the title of the alert. | ||
|
||
Can be an empty string to not show any title. | ||
|
||
[Statiq site generator]: https://www.statiq.dev/ | ||
[Bootstrap]: https://getbootstrap.com/ | ||
[FontAwesome]: https://fontawesome.com/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
$SCRIPT_NAME = "recipe.cake" | ||
|
||
Write-Host "Restoring .NET Core tools" | ||
dotnet tool restore | ||
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } | ||
|
||
Write-Host "Bootstrapping Cake" | ||
dotnet cake $SCRIPT_NAME --bootstrap | ||
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } | ||
|
||
Write-Host "Running Build" | ||
dotnet cake $SCRIPT_NAME @args | ||
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
SCRIPT_NAME="recipe.cake" | ||
|
||
echo "Restoring .NET Core tools" | ||
dotnet tool restore | ||
|
||
echo "Bootstrapping Cake" | ||
dotnet cake $SCRIPT_NAME --bootstrap | ||
|
||
echo "Running Build" | ||
dotnet cake $SCRIPT_NAME "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"sdk": { | ||
"allowPrerelease": true, | ||
"version": "8.0.100", | ||
"rollForward": "latestFeature" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#load nuget:?package=Cake.Recipe&version=3.1.1 | ||
|
||
Environment.SetVariableNames(); | ||
|
||
BuildParameters.SetParameters( | ||
context: Context, | ||
buildSystem: BuildSystem, | ||
sourceDirectoryPath: "./src", | ||
title: "Statiq.Alerts", | ||
masterBranchName: "main", | ||
repositoryOwner: "swissgrc", | ||
repositoryName: "Statiq.Alerts", | ||
shouldRunDotNetCorePack: true, | ||
shouldUseDeterministicBuilds: true, | ||
preferredBuildProviderType: BuildProviderType.GitHubActions, | ||
preferredBuildAgentOperatingSystem: PlatformFamily.Linux); | ||
|
||
BuildParameters.PrintParameters(Context); | ||
|
||
ToolSettings.SetToolSettings(context: Context); | ||
|
||
Build.RunDotNetCore(); |
Oops, something went wrong.