@@ -7,14 +7,17 @@ SiteGen is a .NET-based static site generator.
7
7
## Features
8
8
9
9
- Markdown support
10
- - Pygments syntax highlighting
10
+ - Syntax Highlighting
11
+ - Pygments
12
+ - Prism.js
13
+ - Monaco
11
14
- Mermaid diagrams
12
15
- Razor templates
13
16
- Rich site hierarchy model, for building navigation in your templates
14
17
- Table of Contents
15
18
- Extensible
16
19
17
- ## Usage
20
+ ## Get Started
18
21
19
22
In your ASP.NET website, reference ` SiteGen.Core ` .
20
23
@@ -51,7 +54,18 @@ app.UseSiteGen();
51
54
app .Run ();
52
55
```
53
56
54
- Add your ` .md ` files in a ` content ` folder, and your static assets in ` static ` .
57
+ Configure paths in ` appsettings.json ` :
58
+
59
+ ``` json
60
+ {
61
+ "ContentPaths" : [ " content" ],
62
+ "StaticPaths" : [ " static" , " wwwroot" ]
63
+ }
64
+ ```
65
+
66
+ Add your ` .md ` files into the ` content ` folder, and your static assets in ` static ` or ` wwwroot ` .
67
+
68
+ Add a ` Page.cshtml ` to 'Pages/Shared' (for Razor Pages) or 'Views/Home' or 'Views/Shared' (for MVC) folder.
55
69
56
70
If you generate client-side css and javascript, you can distribute your built artifacts to either the ` static ` or ` wwwroot ` folders.
57
71
@@ -69,6 +83,14 @@ dotnet tool install --local SiteGen.Cli
69
83
- Launch your website and bind to port :5000
70
84
- Run ` dotnet sitegen ` to crawl your site and publish the static resources to ` /public `
71
85
86
+ # How it works
87
+
88
+ SiteGen registers itself as a default fallback route. This allows your website to implement its own routes which will take precedence.
89
+
90
+ By default, SiteGen will generate a site map from the markdown files it finds in the configured content directories.
91
+
92
+ The SiteGen fallback route it for its in-built HomeController and Page action. This is why you must implement a default Page.cshtml view.
93
+
72
94
# Services
73
95
74
96
# Interactive, hosted browser scraping with Playwright
0 commit comments