From 223642b797751e0bb7733d72f93beb5fd8e0ee29 Mon Sep 17 00:00:00 2001 From: Phil Scott Date: Thu, 15 Jul 2021 13:53:01 -0400 Subject: [PATCH] Add blog to docs (#484) * Adding social card infrastructure * Upgrades doc project to .NET 6 * Adds Playwright * Changes the console to a web project for Playwright * Adds social card template * Added blog content * Parallelized social image processing * Updating CI to use .NET 6 for docs build --- .github/workflows/ci.yaml | 3 +- .github/workflows/docs.yaml | 3 +- .github/workflows/publish.yaml | 3 +- docs/.gitignore | 1 + docs/Docs.csproj | 9 +- docs/Program.cs | 2 +- docs/global.json | 6 + docs/input/_layout.cshtml | 21 +- docs/input/_posts.cshtml | 42 ---- docs/input/appendix/borders.md | 6 + docs/input/appendix/colors.md | 4 + docs/input/appendix/emojis.md | 4 + docs/input/appendix/spinners.md | 4 + docs/input/appendix/styles.md | 5 + docs/input/blog/_category.yaml | 15 ++ docs/input/blog/_directory.yaml | 2 + docs/input/blog/_index.yaml | 10 + docs/input/blog/_nextprevious.cshtml | 27 ++ docs/input/blog/_posts.cshtml | 33 +++ docs/input/blog/category.cshtml | 14 ++ docs/input/blog/index.cshtml | 3 + .../blog/posts/2021-07-11-hello-world.md | 9 + docs/input/blog/posts/BLOG_TEMPLATE.md | 19 ++ docs/input/blog/posts/_ViewStart.cshtml | 3 + docs/input/blog/posts/_layout.cshtml | 34 +++ docs/input/cli/commandApp.md | 1 + docs/input/cli/commands.md | 1 + docs/input/cli/composing.md | 2 + docs/input/cli/getting-started.md | 1 + docs/input/cli/index.cshtml | 3 +- docs/input/cli/introduction.md | 3 + docs/input/cli/migration.md | 1 + docs/input/cli/settings.md | 1 + docs/input/exceptions.md | 6 +- docs/input/index.md | 1 + docs/input/live/index.cshtml | 3 +- docs/input/live/live-display.md | 4 + docs/input/live/progress.md | 5 + docs/input/live/status.md | 4 + docs/input/markup.md | 7 +- docs/input/prompts/index.cshtml | 3 +- docs/input/prompts/multiselection.md | 5 + docs/input/prompts/selection.md | 1 + docs/input/prompts/text.md | 6 + docs/input/quick-start.md | 3 +- docs/input/sponsors.md | 3 +- docs/input/widgets/barchart.md | 5 + docs/input/widgets/calendar.md | 5 + docs/input/widgets/canvas-image.md | 1 + docs/input/widgets/canvas.md | 1 + docs/input/widgets/figlet.md | 1 + docs/input/widgets/index.cshtml | 3 +- docs/input/widgets/rule.md | 5 + docs/input/widgets/table.md | 1 + docs/input/widgets/tree.md | 4 + docs/package-lock.json | 238 ++++++++++++++++++ docs/package.json | 1 + docs/src/Pipelines/SocialCardPipeline.cs | 113 +++++++++ docs/src/SocialCards/CascadiaCodePL.woff2 | Bin 0 -> 130568 bytes docs/src/SocialCards/index.cshtml | 120 +++++++++ docs/src/SocialCards/index.cshtml.cs | 31 +++ docs/src/SocialCards/styles.css | 148 +++++++++++ 62 files changed, 962 insertions(+), 61 deletions(-) create mode 100644 docs/global.json delete mode 100644 docs/input/_posts.cshtml create mode 100644 docs/input/blog/_category.yaml create mode 100644 docs/input/blog/_directory.yaml create mode 100644 docs/input/blog/_index.yaml create mode 100644 docs/input/blog/_nextprevious.cshtml create mode 100644 docs/input/blog/_posts.cshtml create mode 100644 docs/input/blog/category.cshtml create mode 100644 docs/input/blog/index.cshtml create mode 100644 docs/input/blog/posts/2021-07-11-hello-world.md create mode 100644 docs/input/blog/posts/BLOG_TEMPLATE.md create mode 100644 docs/input/blog/posts/_ViewStart.cshtml create mode 100644 docs/input/blog/posts/_layout.cshtml create mode 100644 docs/src/Pipelines/SocialCardPipeline.cs create mode 100644 docs/src/SocialCards/CascadiaCodePL.woff2 create mode 100644 docs/src/SocialCards/index.cshtml create mode 100644 docs/src/SocialCards/index.cshtml.cs create mode 100644 docs/src/SocialCards/styles.css diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f6eeecea..69b9b0c1 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -21,7 +21,8 @@ jobs: - name: Setup dotnet uses: actions/setup-dotnet@v1 with: - dotnet-version: 5.0.301 + dotnet-version: 6.0.x + include-prerelease: true - name: Setup Node.js uses: actions/setup-node@v2 diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 6cadf1e4..3fd6568d 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -24,7 +24,8 @@ jobs: - name: Setup dotnet uses: actions/setup-dotnet@v1 with: - dotnet-version: 5.0.301 + dotnet-version: 6.0.x + include-prerelease: true - name: Setup Node.js uses: actions/setup-node@v2 diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 5bdc37a2..2569948e 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -29,7 +29,8 @@ jobs: - name: Setup dotnet uses: actions/setup-dotnet@v1 with: - dotnet-version: 5.0.301 + dotnet-version: 6.0.x + include-prerelease: true - name: Build shell: bash diff --git a/docs/.gitignore b/docs/.gitignore index 56a2f3a5..35ae38b7 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -7,6 +7,7 @@ [Tt]ools/ ![Tt]ools/packages.config [Oo]utput/ +[Cc]ache/ ![Ii]nput/ nuget.exe *.com diff --git a/docs/Docs.csproj b/docs/Docs.csproj index 84b8fc8a..283d4ca7 100644 --- a/docs/Docs.csproj +++ b/docs/Docs.csproj @@ -1,10 +1,11 @@ - + Exe - net5.0 + net6.0 $(MSBuildProjectDirectory) $(DefaultItemExcludes);output\**;.gitignore + MVC1000 true @@ -31,7 +32,9 @@ - + + + diff --git a/docs/Program.cs b/docs/Program.cs index b1a87c88..a61856c2 100644 --- a/docs/Program.cs +++ b/docs/Program.cs @@ -22,7 +22,7 @@ namespace Docs .AddShortcode("Alert", typeof(AlertShortcode)) .AddShortcode("AsciiCast", typeof(AsciiCastShortcode)) .AddPipelines() - .AddProcess(ProcessTiming.Initialization, _ => new ProcessLauncher("npm", "install") + .AddProcess(ProcessTiming.Initialization, _ => new ProcessLauncher("npm", "install", "--audit", "false", "--fund", "false") { LogErrors = false }) diff --git a/docs/global.json b/docs/global.json new file mode 100644 index 00000000..7281fbff --- /dev/null +++ b/docs/global.json @@ -0,0 +1,6 @@ +{ + "sdk": { + "version": "2.2.200", + "rollForward": "latestMajor" + } +} \ No newline at end of file diff --git a/docs/input/_layout.cshtml b/docs/input/_layout.cshtml index 78fd1f86..b8327497 100644 --- a/docs/input/_layout.cshtml +++ b/docs/input/_layout.cshtml @@ -14,11 +14,21 @@ @{ - string title = @Document.ContainsKey(Keys.Title) ? $"Spectre.Console - {Document.GetString(Keys.Title)}" : "Spectre.Console"; - string description = @Document.ContainsKey(Constants.Description) ? Document.GetString(Constants.Description) : "Spectre.Console is a .NET Standard 2.0 library that makes it easier to create beautiful console applications"; + string title = Document.ContainsKey(Keys.Title) ? $"Spectre.Console - {Document.GetString(Keys.Title)}" : "Spectre.Console"; + string description = Document.ContainsKey(Constants.Description) ? Document.GetString(Constants.Description) : "Spectre.Console is a .NET Standard 2.0 library that makes it easier to create beautiful console applications"; + var card = Outputs.FirstOrDefault(i => i.GetString("DocId") == Model.Id.ToString()); + var urlBase = $"https://{Document.GetString(Keys.Host)}/"; } @title + + @if(card != null){ + + + + + } +
@@ -66,7 +76,7 @@ } - @foreach (IDocument document in OutputPages.GetChildrenOf(root).OnlyVisible()) + @foreach (IDocument document in OutputPages.GetChildrenOf(root).OrderBy(i => i.GetInt("Order")).OnlyVisible()) { if(string.IsNullOrWhiteSpace(document.GetTitle())) { @@ -100,7 +110,10 @@ }
-

@(Document.GetString(Keys.Title) ?? Document.GetTitle())

+
+

@(Document.GetString(Keys.Title) ?? Document.GetTitle())

+ @RenderSection("subheading", required: false) +
@RenderBody()
diff --git a/docs/input/_posts.cshtml b/docs/input/_posts.cshtml deleted file mode 100644 index 735ddd24..00000000 --- a/docs/input/_posts.cshtml +++ /dev/null @@ -1,42 +0,0 @@ -
- @foreach (IDocument post in Document.GetChildren()) - { - IDocument topicDocument = Outputs[nameof(Archives)][$"blog/topics/{post.GetString("topic")}/index.html"]; - string excerpt = post.GetString(Statiq.Html.HtmlKeys.Excerpt); -
-
-
@post.GetString("Title")
-
- @post.GetDateTime("Published").ToLongDateString() in - @topicDocument.GetTitle() -
- @if (!string.IsNullOrEmpty(excerpt)) - { - @Html.Raw(excerpt) -

Read more...

- } -
-
- } - @{ - IDocument older = Document.GetDocument(Keys.Next); - IDocument newer = Document.GetDocument(Keys.Previous); - } - @if (older != null || newer != null) - { -
-
- @if (older != null) - { - Older - } -
-
- @if (newer != null) - { - Newer - } -
-
- } -
\ No newline at end of file diff --git a/docs/input/appendix/borders.md b/docs/input/appendix/borders.md index 36b6b02a..0a83f135 100644 --- a/docs/input/appendix/borders.md +++ b/docs/input/appendix/borders.md @@ -1,5 +1,11 @@ Title: Borders Order: 2 +Description: "*Spectre.Console* makes it easy to create tables and panels with a variety of different styles of borders." +Highlights: + - Rounded + - Square + - Heavy + - And more... --- There is different built-in borders you can use for tables and panels. diff --git a/docs/input/appendix/colors.md b/docs/input/appendix/colors.md index 572bd80e..d8b81d24 100644 --- a/docs/input/appendix/colors.md +++ b/docs/input/appendix/colors.md @@ -1,5 +1,9 @@ Title: Colors Order: 0 +Description: "*Spectre.Console* allows easy rendering of the standard ANSI colors of your terminal, and also supports rendering up to 24-bit colors depending on the capabilities of your terminal." +Highlights: + - Predefined common colors + - Easy syntax for inline styling --- The following is a list of the standard 8-bit colors supported in terminals. diff --git a/docs/input/appendix/emojis.md b/docs/input/appendix/emojis.md index b70ea38e..fb770cfb 100644 --- a/docs/input/appendix/emojis.md +++ b/docs/input/appendix/emojis.md @@ -1,5 +1,9 @@ Title: Emojis Order: 3 +Description: "For terminals that support Emojis, *Spectre.Console* supports a simple syntax for rendering emojis." +Highlights: + - ":rocket: becomes ๐Ÿš€" + - ":waning_gibbous_moon: becomes ๐ŸŒ–" --- Please note that what emojis that can be used is completely up to diff --git a/docs/input/appendix/spinners.md b/docs/input/appendix/spinners.md index df50cd60..fb786e9f 100644 --- a/docs/input/appendix/spinners.md +++ b/docs/input/appendix/spinners.md @@ -1,5 +1,9 @@ Title: Spinners Order: 4 +Description: "*Spectre.Console* supports over 80 different types of spinners, and allows new ones to be defined. They are used automatically with the controls" +Highlights: + - Status display + - Progress display --- For all available spinners, see https://jsfiddle.net/sindresorhus/2eLtsbey/embedded/result/ diff --git a/docs/input/appendix/styles.md b/docs/input/appendix/styles.md index 913d2e57..c437eb71 100644 --- a/docs/input/appendix/styles.md +++ b/docs/input/appendix/styles.md @@ -1,5 +1,10 @@ Title: Styles Order: 1 +Description: "*Spectre.Console* makes it easy to write text with different styles beyond colors. Depending on your terminal, it can make it easy to use styles such as" +Highlights: + - Bold, Italic, Underline, strikethrough + - Dim, Invert + - Conceal, slowblink, rapidblink --- Note that what styles that can be used is defined by the system or your terminal software, and may not appear as they should. diff --git a/docs/input/blog/_category.yaml b/docs/input/blog/_category.yaml new file mode 100644 index 00000000..c3b0f844 --- /dev/null +++ b/docs/input/blog/_category.yaml @@ -0,0 +1,15 @@ +ArchiveSources: => $"blog/posts/**/*" +ArchiveKey: Category +ArchiveKeyComparer: => StringComparer.OrdinalIgnoreCase.ToConvertingEqualityComparer() +ArchiveDestination: > + => GetInt("Index") <= 1 ? $"blog/{NormalizedPath.OptimizeFileName(GetString("GroupKey"))}/index.html" : $"blog/{NormalizedPath.OptimizeFileName(GetString("GroupKey"))}/{GetInt("Index")}.html" +ArchivePageSize: => 5 +ArchiveOrderKey: published +ArchiveOrderDescending: true +Title: Categories +ArchiveTitle: => GetString("GroupKey") +# we only show if we have a group key which means we are a category and not the index and also +# if we are the first page +Hidden: > + => doc.GetString("GroupKey") != null && doc.GetInt("Index") <= 1 ? false : true +Order: 250 \ No newline at end of file diff --git a/docs/input/blog/_directory.yaml b/docs/input/blog/_directory.yaml new file mode 100644 index 00000000..a95e4b7a --- /dev/null +++ b/docs/input/blog/_directory.yaml @@ -0,0 +1,2 @@ +Hidden: true +Order: 1000 \ No newline at end of file diff --git a/docs/input/blog/_index.yaml b/docs/input/blog/_index.yaml new file mode 100644 index 00000000..14e305ba --- /dev/null +++ b/docs/input/blog/_index.yaml @@ -0,0 +1,10 @@ +Title: Recent Blog Posts +ArchiveSources: => $"blog/posts/**/*" +ArchiveDestination: > + => GetInt("Index") <= 1 ? $"blog/index.html" : $"blog/{GetInt("Index")}.html" +ArchivePageSize: => 5 +ArchiveOrderKey: Published +ArchiveOrderDescending: true +Hidden: > + => doc.GetInt("Index") == 1 ? false : true +Order: 25 diff --git a/docs/input/blog/_nextprevious.cshtml b/docs/input/blog/_nextprevious.cshtml new file mode 100644 index 00000000..8d3c159c --- /dev/null +++ b/docs/input/blog/_nextprevious.cshtml @@ -0,0 +1,27 @@ + +@inherits StatiqRazorPage +@model IDocument + +@{ + var older = Model.GetDocument(Keys.Next); + var newer = Model.GetDocument(Keys.Previous); +} + + +@if (older != null || newer != null) +{ +
+
+ @if (older != null) + { + Older + } +
+
+ @if (newer != null) + { + Newer + } +
+
+} \ No newline at end of file diff --git a/docs/input/blog/_posts.cshtml b/docs/input/blog/_posts.cshtml new file mode 100644 index 00000000..1456eba1 --- /dev/null +++ b/docs/input/blog/_posts.cshtml @@ -0,0 +1,33 @@ +@inherits StatiqRazorPage> +@foreach (var post in Model) +{ +
+

@post.GetString("Title")

+ @{ + var author = post.GetString("Author"); + var published = post.GetDateTime("Published"); + var category = post.GetString("Category"); + } +
+ Posted + @if (published != default(DateTime)) { + @published.ToLongDateString() + } + @if (author != null) { + by @author + } + @if (category != null) { + var categoryUrl = @Context.GetLink($"blog/{NormalizedPath.OptimizeFileName(category)}/index.html"); + + to + @category + + + } + +
+
+ @Html.Raw(@post.GetString("Excerpt")) +
+
+} \ No newline at end of file diff --git a/docs/input/blog/category.cshtml b/docs/input/blog/category.cshtml new file mode 100644 index 00000000..b55d853a --- /dev/null +++ b/docs/input/blog/category.cshtml @@ -0,0 +1,14 @@ +@inherits StatiqRazorPage +@if (Document.ContainsKey(Keys.GroupKey)) +{ + @Html.Partial("_posts.cshtml", Document.GetChildren()) + @Html.Partial("_nextprevious.cshtml", Document) +} +else +{ + @foreach (var tag in Document.GetChildren().OrderByDescending(x => x.GetChildren().Count())) + { + var postCount = tag.GetChildren().Count().ToString(); + @tag.GetTitle() (@postCount) + } +} \ No newline at end of file diff --git a/docs/input/blog/index.cshtml b/docs/input/blog/index.cshtml new file mode 100644 index 00000000..ee5f2fb4 --- /dev/null +++ b/docs/input/blog/index.cshtml @@ -0,0 +1,3 @@ +@inherits StatiqRazorPage +@Html.Partial("_posts.cshtml", Document.GetChildren()) +@Html.Partial("_nextprevious.cshtml", Document) diff --git a/docs/input/blog/posts/2021-07-11-hello-world.md b/docs/input/blog/posts/2021-07-11-hello-world.md new file mode 100644 index 00000000..1d272b3b --- /dev/null +++ b/docs/input/blog/posts/2021-07-11-hello-world.md @@ -0,0 +1,9 @@ +Title: Hello, World +Description: To help track new releases, updates and planning for Spectre.Console, we've added a new blog to the documentation. +Published: 20210711 +Category: News +--- + +To help track new releases, updates and planning for Spectre.Console, we've added a new blog to the documentation. + +Stay tuned for upcoming information related to the 0.41 release! \ No newline at end of file diff --git a/docs/input/blog/posts/BLOG_TEMPLATE.md b/docs/input/blog/posts/BLOG_TEMPLATE.md new file mode 100644 index 00000000..22fa788c --- /dev/null +++ b/docs/input/blog/posts/BLOG_TEMPLATE.md @@ -0,0 +1,19 @@ +Title: Short title, less than 50 characters +Description: Longer description, with optional *bold* and **italic** characters. Shouldn't be TOO long but can span multiple lines. +Published: 20210710 +Category: Release Notes | News | or whatever +Excluded: true +--- + +Intro paragraph, maybe even just the description. No need for a title that's included automatically. + +## Use second level headers + +Main title will be set with h1 + +## Tasks + +1. Set title and description +2. Set proper publish date +3. Set proper category +4. Remove excluded attribute. \ No newline at end of file diff --git a/docs/input/blog/posts/_ViewStart.cshtml b/docs/input/blog/posts/_ViewStart.cshtml new file mode 100644 index 00000000..451a0547 --- /dev/null +++ b/docs/input/blog/posts/_ViewStart.cshtml @@ -0,0 +1,3 @@ +@{ + Layout = @$"_layout.cshtml"; +} \ No newline at end of file diff --git a/docs/input/blog/posts/_layout.cshtml b/docs/input/blog/posts/_layout.cshtml new file mode 100644 index 00000000..4d23659d --- /dev/null +++ b/docs/input/blog/posts/_layout.cshtml @@ -0,0 +1,34 @@ +@{ + Layout = @"../../_layout.cshtml"; +} +@inherits StatiqRazorPage + +@{ + var author = Model.GetString("Author"); + var published = Model.GetDateTime("Published"); + var category = Model.GetString("Category"); +} + +@section subheading{ +
+ Posted + @if (published != default(DateTime)) { + @published.ToLongDateString() + } + @if (author != null) { + by @author + } + @if (category != null) { + + to + @category + + + } + +
+} + + + +@RenderBody() diff --git a/docs/input/cli/commandApp.md b/docs/input/cli/commandApp.md index 4c2e09d5..bf0919ff 100644 --- a/docs/input/cli/commandApp.md +++ b/docs/input/cli/commandApp.md @@ -1,5 +1,6 @@ Title: CommandApp Order: 2 +Description: "**CommandApp** is the entry point for a *Spectre.Console.Cli* command line application. It is used to configure the settings and commands used for execution of the application." --- `CommandApp` is the entry point for a `Spectre.Console.Cli` command line application. It is used to configure the settings and commands used for execution of the application. Most `Spectre.Console.Cli` applications will need to specify a custom configuration using the `Configure` method. diff --git a/docs/input/cli/commands.md b/docs/input/cli/commands.md index aa56a184..6abcc460 100644 --- a/docs/input/cli/commands.md +++ b/docs/input/cli/commands.md @@ -1,5 +1,6 @@ Title: Creating Commands Order: 6 +Description: "How to create commands for *Spectre.Console.Cli*" --- Commands in `Spectre.Console.Cli` are defined by creating a class that inherits from either `Spectre.Console.Cli.Command` or `Spectre.Console.Cli.AsyncCommand`. `Command` must implement an `Execute` method that returns an int where as `AsyncCommand` must implement `ExecuteAsync` returning `Task`. diff --git a/docs/input/cli/composing.md b/docs/input/cli/composing.md index 3e3a294d..7c548acd 100644 --- a/docs/input/cli/composing.md +++ b/docs/input/cli/composing.md @@ -1,6 +1,8 @@ Title: Composing Commands RedirectFrom: introduction Order: 8 +Description: "The underlying philosophy behind *Spectre.Console.Cli* is to rely on the .NET type system to +declare the commands, but tie everything together via composition." --- The underlying philosophy behind `Spectre.Console.Cli` is to rely on the .NET type system to diff --git a/docs/input/cli/getting-started.md b/docs/input/cli/getting-started.md index 68db8eb2..1f41be90 100644 --- a/docs/input/cli/getting-started.md +++ b/docs/input/cli/getting-started.md @@ -1,5 +1,6 @@ Title: Getting Started Order: 1 +Description: "How to get started using *Spectre.Console.Cli* to write a modern console application that follows industry conventions for command line parsing." --- `Spectre.Console.Cli` is a modern library for parsing command line arguments. While it's extremely diff --git a/docs/input/cli/index.cshtml b/docs/input/cli/index.cshtml index a35cdb63..51774595 100644 --- a/docs/input/cli/index.cshtml +++ b/docs/input/cli/index.cshtml @@ -1,5 +1,6 @@ Title: Spectre.Console.Cli -Order: 10 +Order: 80 +Description: "The command line interface for the *Spectre.Console* project." ---

Spectre.Console.Cli is a modern library for parsing command line arguments. While it's extremely opinionated in what it does, it tries to follow established industry conventions, and draws its inspiration from applications you use everyday.

diff --git a/docs/input/cli/introduction.md b/docs/input/cli/introduction.md index dd01aa3f..f081069a 100644 --- a/docs/input/cli/introduction.md +++ b/docs/input/cli/introduction.md @@ -1,5 +1,8 @@ Title: Introduction Order: 1 +Description: "*Spectre.Console.Cli* is a modern library for parsing command line arguments. While it's extremely +opinionated in what it does, it tries to follow established industry conventions, and draws +its inspiration from applications you use everyday." --- `Spectre.Console.Cli` is a modern library for parsing command line arguments. While it's extremely diff --git a/docs/input/cli/migration.md b/docs/input/cli/migration.md index e7a1e8c9..e7a07ff6 100644 --- a/docs/input/cli/migration.md +++ b/docs/input/cli/migration.md @@ -1,5 +1,6 @@ Title: Migrate from Spectre.Cli Order: 10 +Description: "Migrating from *Specte.Cli* to *Spectre.Console.Cli*" --- The functionality in `Spectre.Cli` has been moved into the `Spectre.Console` diff --git a/docs/input/cli/settings.md b/docs/input/cli/settings.md index aeb89d77..afb2514e 100644 --- a/docs/input/cli/settings.md +++ b/docs/input/cli/settings.md @@ -1,5 +1,6 @@ Title: Specifying Settings Order: 5 +Description: "How to define command line argument settings for your *Spectre.Console.Cli* Commands" --- Settings for `Spectre.Console.Cli` commands are defined via classes that inherit from `CommandSettings`. Attributes are used to indicate how the parser interprets the command line arguments and create a runtime instance of the settings to be used. diff --git a/docs/input/exceptions.md b/docs/input/exceptions.md index ce7cd048..5939e432 100644 --- a/docs/input/exceptions.md +++ b/docs/input/exceptions.md @@ -1,5 +1,9 @@ Title: Exceptions -Order: 3 +Order: 40 +Description: "Exceptions aren't always readable when viewed in the terminal. You can make exception a bit more readable by using the **WriteException** method." +Highlights: + - Color coded output. + - Shorten long identifiers and paths. --- Exceptions aren't always readable when viewed in the terminal. diff --git a/docs/input/index.md b/docs/input/index.md index 415c78fc..ee3d8af4 100644 --- a/docs/input/index.md +++ b/docs/input/index.md @@ -1,4 +1,5 @@ Title: Welcome +Description: Spectre.Console is a .NET Standard 2.0 library that makes it easier to create beautiful console applications. Order: 0 --- diff --git a/docs/input/live/index.cshtml b/docs/input/live/index.cshtml index ad7a0d72..906e949c 100644 --- a/docs/input/live/index.cshtml +++ b/docs/input/live/index.cshtml @@ -1,5 +1,6 @@ Title: Live -Order: 4 +Order: 50 +Description: Live displays continue to redraw their contents until an action is complete. --- Live displays continue to redraw their contents until an action is complete. diff --git a/docs/input/live/live-display.md b/docs/input/live/live-display.md index a3ba1494..53c4e990 100644 --- a/docs/input/live/live-display.md +++ b/docs/input/live/live-display.md @@ -1,5 +1,9 @@ Title: Live Display Order: 0 +Description: "*Spectre.Console* can update arbitrary widgets in-place." +Highlights: + - Update tables or graphs with new updates. + - Create a custom progress bar that extends the existing control. --- Spectre.Console can update arbitrary widgets in-place. diff --git a/docs/input/live/progress.md b/docs/input/live/progress.md index ed6a3355..0f27850f 100644 --- a/docs/input/live/progress.md +++ b/docs/input/live/progress.md @@ -1,6 +1,11 @@ Title: Progress Order: 5 RedirectFrom: progress +Description: "*Spectre.Console* can display information about long running tasks in the console using progress bars." +Highlights: + - Custom styling of progress bars. + - Multiple predefined columns such as Throughput, Estimated Time Remaining, and more. + - Fallback for non-interactive consoles such as CI runners. --- Spectre.Console can display information about long running tasks in the console. diff --git a/docs/input/live/status.md b/docs/input/live/status.md index fe2a9029..218c0796 100644 --- a/docs/input/live/status.md +++ b/docs/input/live/status.md @@ -1,6 +1,10 @@ Title: Status Order: 10 RedirectFrom: status +Description: "*Spectre.Console* can display information about long running tasks in the console with the Status control." +Highlights: + - Custom spinner control for running tasks. + - Fallback for non-interactive consoles such as CI runners. --- Spectre.Console can display information about long running tasks in the console. diff --git a/docs/input/markup.md b/docs/input/markup.md index ad01db35..53989ab5 100644 --- a/docs/input/markup.md +++ b/docs/input/markup.md @@ -1,5 +1,10 @@ Title: Markup -Order: 2 +Order: 30 +Description: The Markup class allows you to output rich text to the console. +Highlights: + - Easily add *color*. + - Add hyperlinks to for supported terminals. + - Emoji ๐Ÿš€ parsing. --- The `Markup` class allows you to output rich text to the console. diff --git a/docs/input/prompts/index.cshtml b/docs/input/prompts/index.cshtml index 3d4c7818..d4756e18 100644 --- a/docs/input/prompts/index.cshtml +++ b/docs/input/prompts/index.cshtml @@ -1,5 +1,6 @@ Title: Prompts -Order: 5 +Order: 60 +Description: "*Spectre.Console* has multiple controls to assist in user input." ---