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
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="StatiCSharp.Theme.Foundation" Version="1.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add StatiCSharp.Theme.Foundation --version 1.1.0
#r "nuget: StatiCSharp.Theme.Foundation, 1.1.0"
#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 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
1.1.0 2,841 12/3/2023
1.0.0 680 1/16/2023
0.3.0 743 12/24/2022
0.2.1 782 10/15/2022
0.2.0 814 10/9/2022
0.1.0 816 8/14/2022

Foundation is now compatible with StatiC# 0.5. and .NET 8.