Optimizing build

* 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
This commit is contained in:
Phil Scott 2022-02-21 22:12:30 -05:00 committed by Patrik Svensson
parent 8ae3d258e4
commit 899dd20b65
7 changed files with 70 additions and 1505 deletions

View File

@ -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>

View File

@ -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"
]
}
}
}
}

View File

@ -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

View File

@ -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: >

View File

@ -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: {

1515
docs/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -13,13 +13,9 @@
"license": "MIT",
"devDependencies": {
"@tailwindcss/forms": "^0.4.0",
"@tailwindcss/typography": "^0.5.1",
"asciinema-player": "^3.0.0-beta.4",
"autoprefixer": "^10.4.0",
"@tailwindcss/typography": "^0.5.2",
"asciinema-player": "^3.0.0-rc.1",
"cross-env": "^7.0.3",
"playwright": "^1.18.1",
"postcss": "^8.4.4",
"postcss-cli": "^8.3.1",
"tailwindcss": "^3.0.19"
"tailwindcss": "^3.0.23"
}
}