File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ @page " /llms-full.txt"
2
+ @inject MarkdownPages Markdown
3
+ @inject AppConfig Config
4
+ @attribute [RenderStatic]
5
+ @{
6
+ Layout = " " ;
7
+ Response .ContentType = " text/plain" ;
8
+ }
9
+ @foreach ( var entry in Markdown .Sidebars .OrderBy (x => x .Key ))
10
+ {
11
+ @foreach ( var sidebar in entry .Value )
12
+ {
13
+ foreach (var item in sidebar .Children .Safe ().Where (x => x .Text != null && x .Link != null ))
14
+ {
15
+ var page = Markdown ! .GetBySlug (item .Link );
16
+ if (page ? .Content == null ) continue ;
17
+ var content = page .Content .Trim ();
18
+ if (content .StartsWith (" ---" ))
19
+ {
20
+ content = content .Substring (3 ).RightPart (" ---" ).Trim ();
21
+ }
22
+
23
+ <text ># @( page .Title )
24
+ Source : @Config.PublicBaseUrl.CombineWith(item.Link)
25
+
26
+ @( Html .Raw (content ))
27
+
28
+
29
+ </text >
30
+ }
31
+ }
32
+ }
You can’t perform that action at this time.
0 commit comments