Skip to content

Commit

Permalink
Optimizing build
Browse files Browse the repository at this point in the history
* Upgrades Statiq.Web to which contains analyzer perf improvements
* Dropping script front matter when not needed from blog archives
* Trimming down the number of files tailwind examines when building the css file to only a subset of the docs.
* Updates Playwright to latest version
* Updates tailwind and asciienma to latest
* Removes npm packages that are no longer required
  • Loading branch information
phil-scott-78 authored and patriksvensson committed Feb 22, 2022
1 parent 8ae3d25 commit 899dd20
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 1,505 deletions.
10 changes: 5 additions & 5 deletions docs/Docs.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Playwright" Version="1.13.0-next-1" />
<PackageReference Include="Microsoft.Playwright" Version="1.19.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Statiq.CodeAnalysis" Version="1.0.0-beta.56" />
<PackageReference Include="Statiq.Common" Version="1.0.0-beta.56" />
<PackageReference Include="Statiq.Web" Version="1.0.0-beta.42" />
<PackageReference Include="Statiq.CodeAnalysis" Version="1.0.0-beta.58" />
<PackageReference Include="Statiq.Common" Version="1.0.0-beta.58" />
<PackageReference Include="Statiq.Web" Version="1.0.0-beta.44" />
<PackageReference Include="MinVer" PrivateAssets="All" Version="2.3.1" />
<PackageReference Include="Statiq.Web.Netlify" Version="1.0.0-beta.42" />
<PackageReference Include="Statiq.Web.Netlify" Version="1.0.0-beta.44" />
</ItemGroup>

<ItemGroup>
Expand Down
20 changes: 10 additions & 10 deletions docs/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"microsoft.playwright.cli": {
"version": "1.2.0",
"commands": [
"playwright"
]
}
"version": 1,
"isRoot": true,
"tools": {
"microsoft.playwright.cli": {
"version": "1.2.2",
"commands": [
"playwright"
]
}
}
}
}
4 changes: 2 additions & 2 deletions docs/input/blog/_category.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
ArchiveSources: => $"blog/posts/**/*"
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
ArchivePageSize: 5
ArchiveOrderKey: published
ArchiveOrderDescending: true
Title: Categories
Expand Down
4 changes: 2 additions & 2 deletions docs/input/blog/_index.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Title: Recent Blog Posts
ArchiveSources: => $"blog/posts/**/*"
ArchiveSources: blog/posts/**/*
ArchiveDestination: >
=> GetInt("Index") <= 1 ? $"blog/index.html" : $"blog/{GetInt("Index")}.html"
ArchivePageSize: => 5
ArchivePageSize: 5
ArchiveOrderKey: Published
ArchiveOrderDescending: true
Hidden: >
Expand Down
12 changes: 11 additions & 1 deletion docs/input/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
const defaultTheme = require("tailwindcss/defaultTheme");

module.exports = {
content: ["./output/**/*.html"],
/*
we don't need to scan all the doc files because they all share the same layout. so we can exclude all but one of the namespace (Spectre.Console.Advanced) from the scan
we'll get all the css classes that we need to build up the styles for the rest.
*/
content: [
"./output/**/*.html",
"!./output/api/Spectre.Console/**/*.html",
"!./output/api/Spectre.Console.Cli/**/*.html",
"!./output/api/Spectre.Console/Spectre.Console.Cli.Unsafe/**/*.html",
"!./output/api/Spectre.Console/Spectre.Console.Rendering/**/*.html"
],
darkMode: "class",
theme: {
extend: {
Expand Down
Loading

0 comments on commit 899dd20

Please sign in to comment.