StatiCSharp.Theme.Foundation
1.1.0
dotnet add package StatiCSharp.Theme.Foundation --version 1.1.0
NuGet\Install-Package StatiCSharp.Theme.Foundation -Version 1.1.0
<PackageReference Include="StatiCSharp.Theme.Foundation" Version="1.1.0" />
paket add StatiCSharp.Theme.Foundation --version 1.1.0
#r "nuget: StatiCSharp.Theme.Foundation, 1.1.0"
// Install StatiCSharp.Theme.Foundation as a Cake Addin #addin nuget:?package=StatiCSharp.Theme.Foundation&version=1.1.0 // Install StatiCSharp.Theme.Foundation as a Cake Tool #tool nuget:?package=StatiCSharp.Theme.Foundation&version=1.1.0
Foundation
A theme for StatiC#, a static website generator written in C#.
Supports light and dark mode.
Installation
Add Foundation to your StatiC# project as a package reference in the .csproj file:
<ItemGroup>
<PackageReference Include="StatiCSharp.Theme.Foundation" Version="1.1.0" />
</ItemGroup>
Build your project to restore packages.
You can then import Foundation at the top of your Program.cs
and inject the theme to StatiC#'s website generating process by initializing a new FoundationHtmlFactory:
using StatiCSharp;
using StatiCSharp.Theme.Foundation;
var myAwesomeWebsite = new Website(
url: "https://yourdomain.com",
name: "My Awesome Website",
description: @"Description of your website",
language: "en-US",
sections: "posts, about"
);
var theme = new FoundationHtmlFactory(website: myAwesomeWebsite);
// Set up social icon here if needed.
var manager = new WebsiteManager(
website: myAwesomeWebsite,
htmlFactory: theme, // Here Foundation is injected to the generating process.
source: @"/path/to/your/project"
);
await manager.Make();
To set the portrait image on the index page, provide a me.jpg
image in the root of your Resources
directory.
Advanced settings
You can configure Foundation after initializing FoundationHtmlFactory to show social icons on the top right corner of your website. Set the property to the target page of your social networks.
theme.Email = "mailto:mail@yourdomain.com";
theme.Facebook = "https://facebook.com/yourName";
Foundation currently supports social icons for E-Mail, LinkedIn, GitHub, Facebook, Twitter, Instagram, YouTube and Teams.
To set legal notice or privacy links in the footer use:
theme.LegalNotice = "/your/logalNoticePage";
theme.Privacy = "/your/privacyPage";
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | 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. |
-
net8.0
- StatiCSharp (>= 0.5.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Foundation is now compatible with StatiC# 0.5. and .NET 8.