mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-06-19 05:18:16 +08:00
Docs redesign (#728)
* Adding a dark mode * Adding reference for types to summary pages * Adding API Reference * Adding modifiers to methods/fields/etc * Minimizing files input * Caching a lot of the output pages * Cache only for each execution * Adding API references to existing docs
This commit is contained in:
19
docs/input/api/Kind/_Assembly.cshtml
Normal file
19
docs/input/api/Kind/_Assembly.cshtml
Normal file
@ -0,0 +1,19 @@
|
||||
@using Statiq.CodeAnalysis
|
||||
@using Docs.Pipelines
|
||||
@using Docs.Extensions
|
||||
@foreach (IGrouping<string, IDocument> typeGroup
|
||||
in Outputs.FromPipeline(nameof(Api))
|
||||
.Where(x => x.GetBool(CodeAnalysisKeys.IsResult)
|
||||
&& x.GetString(CodeAnalysisKeys.Kind) == "NamedType"
|
||||
&& Document.IdEquals(x.GetDocument(CodeAnalysisKeys.ContainingAssembly)))
|
||||
.GroupBy(x => x.GetString(CodeAnalysisKeys.SpecificKind))
|
||||
.OrderBy(x => x.Key))
|
||||
{
|
||||
<h2>@typeGroup.Key</h2>
|
||||
@foreach (var type in typeGroup)
|
||||
{
|
||||
<ul>
|
||||
<li>@Context.GetTypeLink(type)</li>
|
||||
</ul>
|
||||
}
|
||||
}
|
4
docs/input/api/Kind/_Event.cshtml
Normal file
4
docs/input/api/Kind/_Event.cshtml
Normal file
@ -0,0 +1,4 @@
|
||||
@await Html.PartialAsync("../Sections/_Syntax.cshtml")
|
||||
@await Html.PartialAsync("../Sections/_Examples.cshtml")
|
||||
@await Html.PartialAsync("../Sections/_Remarks.cshtml")
|
||||
@await Html.PartialAsync("../Sections/_SeeAlso.cshtml")
|
9
docs/input/api/Kind/_Field.cshtml
Normal file
9
docs/input/api/Kind/_Field.cshtml
Normal file
@ -0,0 +1,9 @@
|
||||
@await Html.PartialAsync("../Sections/_Summary.cshtml")
|
||||
@await Html.PartialAsync("../Sections/_Syntax.cshtml")
|
||||
@await Html.PartialAsync("../Sections/_SymbolInfo.cshtml")
|
||||
@await Html.PartialAsync("../Sections/_Examples.cshtml")
|
||||
@await Html.PartialAsync("../Sections/_Remarks.cshtml")
|
||||
@await Html.PartialAsync("../Sections/_Attributes.cshtml")
|
||||
@await Html.PartialAsync("../Sections/_Parameters.cshtml")
|
||||
@await Html.PartialAsync("../Sections/_Value.cshtml")
|
||||
@await Html.PartialAsync("../Sections/_SeeAlso.cshtml")
|
10
docs/input/api/Kind/_Method.cshtml
Normal file
10
docs/input/api/Kind/_Method.cshtml
Normal file
@ -0,0 +1,10 @@
|
||||
@await Html.PartialAsync("../Sections/_Summary.cshtml")
|
||||
@await Html.PartialAsync("../Sections/_Syntax.cshtml")
|
||||
@await Html.PartialAsync("../Sections/_SymbolInfo.cshtml")
|
||||
@await Html.PartialAsync("../Sections/_Examples.cshtml")
|
||||
@await Html.PartialAsync("../Sections/_Remarks.cshtml")
|
||||
@await Html.PartialAsync("../Sections/_Attributes.cshtml")
|
||||
@await Html.PartialAsync("../Sections/_TypeParameters.cshtml")
|
||||
@await Html.PartialAsync("../Sections/_Parameters.cshtml")
|
||||
@await Html.PartialAsync("../Sections/_ReturnValue.cshtml")
|
||||
@await Html.PartialAsync("../Sections/_SeeAlso.cshtml")
|
15
docs/input/api/Kind/_NamedType.cshtml
Normal file
15
docs/input/api/Kind/_NamedType.cshtml
Normal file
@ -0,0 +1,15 @@
|
||||
@await Html.PartialAsync("../Sections/_Summary.cshtml")
|
||||
@await Html.PartialAsync("../Sections/_Syntax.cshtml")
|
||||
@await Html.PartialAsync("../Sections/_SymbolInfo.cshtml")
|
||||
@await Html.PartialAsync("../Sections/_Examples.cshtml")
|
||||
@await Html.PartialAsync("../Sections/_Remarks.cshtml")
|
||||
@await Html.PartialAsync("../Sections/_Attributes.cshtml")
|
||||
@await Html.PartialAsync("../Sections/_TypeParameters.cshtml")
|
||||
@await Html.PartialAsync("../Sections/_Constructors.cshtml")
|
||||
@await Html.PartialAsync("../Sections/_Events.cshtml")
|
||||
@await Html.PartialAsync("../Sections/_Fields.cshtml")
|
||||
@await Html.PartialAsync("../Sections/_Properties.cshtml")
|
||||
@await Html.PartialAsync("../Sections/_Methods.cshtml")
|
||||
@await Html.PartialAsync("../Sections/_ExtensionMethods.cshtml")
|
||||
@await Html.PartialAsync("../Sections/_Operators.cshtml")
|
||||
@await Html.PartialAsync("../Sections/_SeeAlso.cshtml")
|
25
docs/input/api/Kind/_Namespace.cshtml
Normal file
25
docs/input/api/Kind/_Namespace.cshtml
Normal file
@ -0,0 +1,25 @@
|
||||
@using Statiq.CodeAnalysis
|
||||
@using Docs.Extensions
|
||||
@await Html.PartialAsync("../Sections/_Summary.cshtml")
|
||||
@{
|
||||
foreach (IGrouping<string, IDocument> typeGroup
|
||||
in Document.GetDocuments(CodeAnalysisKeys.MemberTypes)
|
||||
.Where(x => x.GetBool(CodeAnalysisKeys.IsResult) && x.GetString(CodeAnalysisKeys.Kind) == "NamedType")
|
||||
.GroupBy(x => x.GetString(CodeAnalysisKeys.SpecificKind)))
|
||||
{
|
||||
<h3>@typeGroup.Key</h3>
|
||||
<div class="doc-summary short-term">
|
||||
<div>
|
||||
<dl>
|
||||
@foreach (var type in typeGroup.OrderBy(x => x.GetString(CodeAnalysisKeys.DisplayName)).ToList())
|
||||
{
|
||||
<div>
|
||||
<dt>@Context.GetTypeLink(type)</dt>
|
||||
<dd>@Html.Raw(type.GetString(CodeAnalysisKeys.Summary))</dd>
|
||||
</div>
|
||||
}
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
9
docs/input/api/Kind/_Property.cshtml
Normal file
9
docs/input/api/Kind/_Property.cshtml
Normal file
@ -0,0 +1,9 @@
|
||||
@await Html.PartialAsync("../Sections/_Summary.cshtml")
|
||||
@await Html.PartialAsync("../Sections/_Syntax.cshtml")
|
||||
@await Html.PartialAsync("../Sections/_SymbolInfo.cshtml")
|
||||
@await Html.PartialAsync("../Sections/_Examples.cshtml")
|
||||
@await Html.PartialAsync("../Sections/_Remarks.cshtml")
|
||||
@await Html.PartialAsync("../Sections/_Attributes.cshtml")
|
||||
@await Html.PartialAsync("../Sections/_Parameters.cshtml")
|
||||
@await Html.PartialAsync("../Sections/_Value.cshtml")
|
||||
@await Html.PartialAsync("../Sections/_SeeAlso.cshtml")
|
Reference in New Issue
Block a user