Features Showcase

This page is a live demo of everything StaticWGen can render. Use it as a reference when writing your own content.


Syntax Highlighting

Powered by Prism.js with support for 200+ languages.

C#

public record WeatherForecast(
    DateOnly Date,
    int TemperatureC,
    string? Summary)
{
    public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
}

Python

from dataclasses import dataclass

@dataclass
class Point:
    x: float
    y: float

    def distance_to(self, other: "Point") -> float:
        return ((self.x - other.x) ** 2 + (self.y - other.y) ** 2) ** 0.5

TypeScript

interface User {
  id: string;
  name: string;
  email: string;
  roles: ReadonlyArray<"admin" | "editor" | "viewer">;
}

const greet = (user: User): string =>
  `Hello, ${user.name}! You have ${user.roles.length} role(s).`;

Bash

#!/bin/bash
for file in input/*.md; do
    echo "Processing: $file"
    name=$(basename "$file" .md)
    pandoc "$file" -o "output/${name}.html"
done
echo "Done! Generated $(ls output/*.html | wc -l) pages."

SQL

SELECT
    u.name,
    COUNT(o.id) AS order_count,
    SUM(o.total) AS total_spent
FROM users u
LEFT JOIN orders o ON o.user_id = u.id
WHERE u.created_at >= '2024-01-01'
GROUP BY u.name
HAVING COUNT(o.id) > 5
ORDER BY total_spent DESC
LIMIT 10;

Mermaid Diagrams

Flowchart

flowchart TD
    A[Start] --> B{Is it raining?}
    B -->|Yes| C[Take umbrella]
    B -->|No| D[Wear sunglasses]
    C --> E[Go outside]
    D --> E
    E --> F[Enjoy the day!]

Sequence Diagram

sequenceDiagram
    participant Browser
    participant CDN
    participant Server
    participant Database

    Browser->>CDN: GET /index.html
    CDN-->>Browser: 200 OK (cached)
    Browser->>Server: GET /api/data
    Server->>Database: SELECT * FROM items
    Database-->>Server: Results
    Server-->>Browser: 200 JSON

Pie Chart

pie title Languages Used in StaticWGen
    "C#" : 65
    "HTML" : 15
    "CSS" : 10
    "JavaScript" : 10

State Diagram

stateDiagram-v2
    [*] --> Draft
    Draft --> Published: Publish
    Draft --> Scheduled: Set publish date
    Scheduled --> Published: Date arrives
    Published --> Archived: Archive
    Archived --> Published: Restore

Mathematics

Powered by KaTeX/MathJax rendering from LaTeX syntax.

Inline Math

The quadratic formula is \(x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}\), which gives the roots of \(ax^2 + bx + c = 0\).

Euler's identity \(e^{i\pi} + 1 = 0\) connects five fundamental constants.

Display Math

The Gaussian integral:

\[ \int_{-\infty}^{\infty} e^{-x^2} \, dx = \sqrt{\pi} \]

Bayes' theorem:

\[ P(A|B) = \frac{P(B|A) \cdot P(A)}{P(B)} \]

A matrix:

\[ \mathbf{A} = \begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{pmatrix} \]

Emoji

StaticWGen supports GitHub-style emoji shortcodes:


Shortcodes

YouTube Embed

Alert Boxes

â„šī¸ Info
This is an informational message. Use it for tips and notes.
✅ Success
Operation completed successfully. Everything is working as expected.
âš ī¸ Warning
Warning: this action may have unintended side effects. Proceed carefully.
❌ Danger
Error: this action cannot be undone. Make sure you have a backup.

Tables

LanguageParadigmTypingYear
C#Multi-paradigmStatic, strong2000
PythonMulti-paradigmDynamic, strong1991
RustSystemsStatic, strong2010
GoProceduralStatic, strong2009
TypeScriptMulti-paradigmStatic, structural2012

Blockquotes

The best code is the code you don't have to write. — Unknown

Design is not just what it looks like and feels like. Design is how it works. — Steve Jobs


Task Lists


Footnotes

StaticWGen uses Markdig1 for Markdown parsing, which supports CommonMark2 and many extensions.


This page renders every feature. If it looks good here, it'll look good in your content too.


  1. Markdig is a fast, powerful, CommonMark compliant Markdown processor for .NET.

  2. CommonMark is a strongly defined, highly compatible specification of Markdown.