StatiCSharp.Theme.Foundation
0.2.0
Bug! The font used in the theme is loaded over the Google Fonts API. Make this clear to your website visitors (data privacy). The new version, 0.2.1, provides the font directly from your host, just like it was meant to be in this version.
See the version list below for details.
dotnet add package StatiCSharp.Theme.Foundation --version 0.2.0
NuGet\Install-Package StatiCSharp.Theme.Foundation -Version 0.2.0
<PackageReference Include="StatiCSharp.Theme.Foundation" Version="0.2.0" />
paket add StatiCSharp.Theme.Foundation --version 0.2.0
#r "nuget: StatiCSharp.Theme.Foundation, 0.2.0"
// Install StatiCSharp.Theme.Foundation as a Cake Addin #addin nuget:?package=StatiCSharp.Theme.Foundation&version=0.2.0 // Install StatiCSharp.Theme.Foundation as a Cake Tool #tool nuget:?package=StatiCSharp.Theme.Foundation&version=0.2.0
Foundation
A theme for StatiC#, a static webside 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="0.2.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 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 and/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 | 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 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. |
-
net6.0
- StatiCSharp (>= 0.2.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 completely compatible with StatiC# 0.2.
A social icon for Twitter was added.