mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-08-03 02:17:59 +08:00
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
This commit is contained in:
9
docs/input/blog/posts/2021-07-11-hello-world.md
Normal file
9
docs/input/blog/posts/2021-07-11-hello-world.md
Normal file
@ -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!
|
19
docs/input/blog/posts/BLOG_TEMPLATE.md
Normal file
19
docs/input/blog/posts/BLOG_TEMPLATE.md
Normal file
@ -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.
|
3
docs/input/blog/posts/_ViewStart.cshtml
Normal file
3
docs/input/blog/posts/_ViewStart.cshtml
Normal file
@ -0,0 +1,3 @@
|
||||
@{
|
||||
Layout = @$"_layout.cshtml";
|
||||
}
|
34
docs/input/blog/posts/_layout.cshtml
Normal file
34
docs/input/blog/posts/_layout.cshtml
Normal file
@ -0,0 +1,34 @@
|
||||
@{
|
||||
Layout = @"../../_layout.cshtml";
|
||||
}
|
||||
@inherits StatiqRazorPage<IDocument>
|
||||
|
||||
@{
|
||||
var author = Model.GetString("Author");
|
||||
var published = Model.GetDateTime("Published");
|
||||
var category = Model.GetString("Category");
|
||||
}
|
||||
|
||||
@section subheading{
|
||||
<div class="mt-2 font-light text-xs md:text-sm">
|
||||
<span>Posted </span>
|
||||
@if (published != default(DateTime)) {
|
||||
<span>@published.ToLongDateString() </span>
|
||||
}
|
||||
@if (author != null) {
|
||||
<span>by @author </span>
|
||||
}
|
||||
@if (category != null) {
|
||||
<span>
|
||||
to <a class="text-blue-800 underline" href="@Context.GetLink($"blog/{NormalizedPath.OptimizeFileName(@category)}/index.html")">
|
||||
@category
|
||||
</a>
|
||||
</span>
|
||||
}
|
||||
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
|
||||
@RenderBody()
|
Reference in New Issue
Block a user