diff --git a/site/bun.lock b/site/bun.lock
index 66c1333..8dc7fb9 100644
--- a/site/bun.lock
+++ b/site/bun.lock
@@ -175,7 +175,7 @@
"pathe": ["pathe@2.0.3", "", {}, "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w=="],
- "powderworks-docs": ["powderworks-docs@github:PowderworksCode/docs#c85d6ed", { "dependencies": { "marked": "^16.4.1" }, "bin": { "powderworks-docs": "./src/cli.mjs" } }, "PowderworksCode-docs-c85d6ed", "sha512-L2TIgg1DtMzWfGzwU6bA+AM7y8h0v9BebgjQ0Y2couZoR7O2KBAMIZCXvliC7e2D13+2LwRE0JSbI4wXAeTMCQ=="],
+ "powderworks-docs": ["powderworks-docs@github:PowderworksCode/docs#eb63074", { "dependencies": { "marked": "^16.4.1" }, "bin": { "powderworks-docs": "./src/cli.mjs" } }, "PowderworksCode-docs-eb63074", "sha512-Z6o8dyre/OYY2u3syz5NimCdFgcWfVKWvkjgInCfT8pn+MH0GsFnnF/v+PYOS3jV1GTK4Odgmi9+JZU7H2f9sA=="],
"semver": ["semver@7.8.5", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA=="],
diff --git a/site/content/about.md b/site/content/about.md
index 8b368e8..a22a3d6 100644
--- a/site/content/about.md
+++ b/site/content/about.md
@@ -1,7 +1,7 @@
---
title: About
description: What Straitjacket is, who builds it, and why it exists.
-order: 9
+order: 2
---
Straitjacket is a fast, deterministic scanner that flags the weird code and
@@ -17,12 +17,18 @@ pattern-level: Straitjacket tells you what is in the source, not what it means.
The reasoning behind the rule set is written down in
[the project philosophy](/project/philosophy/).
-Straitjacket is built by
-[Powderworks](https://powderworks.dev), an independent workshop of open-source
-developer tools maintained by Zack Maril. The code is MIT-licensed and lives on
+Straitjacket is built by [The Powderworks Agentic Code
+Consortium](https://powderworks.dev), and maintained by
+[Zack](https://github.com/zmaril). The code is MIT-licensed and lives on
[GitHub](https://github.com/PowderworksCode/straitjacket), where releases,
checksums, and the full commit history are public.
If you want to shape what it catches — a new smell, a false positive you should
not have to live with — the [contributing guide](/project/contributing/) is
the way in.
+
+## Newsletter
+
+Releases, and notes on building software with agents.
+
+
diff --git a/site/content/guides/index.md b/site/content/guides/index.md
index 0f79384..8e21f56 100644
--- a/site/content/guides/index.md
+++ b/site/content/guides/index.md
@@ -1,7 +1,7 @@
---
title: How-to guides
description: Recipes for getting a specific job done with Straitjacket.
-order: 2
+order: 3
---
Each one is a focused recipe for a single job, assuming you already know the
diff --git a/site/content/index.md b/site/content/index.md
index 1758df1..fe1fcf4 100644
--- a/site/content/index.md
+++ b/site/content/index.md
@@ -1,22 +1,23 @@
---
title: Straitjacket
description: A secret scanner, but for slop.
+tab-title: Straitjacket by Powderworks
---
-

+
An 1838 engraving of a strait-waistcoat. Wellcome Collection, Public Domain Mark.
**A secret scanner, but for slop.**
+[Get started](/getting-started/) · [Read the docs](/guides/) · [Browse the rules](/reference/rules/) · [GitHub](https://github.com/PowderworksCode/straitjacket)
+
Straitjacket is a fast, deterministic scanner that flags the weird code and
text LLMs produce. It sweeps your files against a set of
snobby-but-configurable rules and flags anything it finds — one static Rust
binary, no runtime, so it drops into any repo's CI regardless of language or
stack.
-[Get started](/getting-started/) · [Read the docs](/guides/) · [Browse the rules](/reference/rules/) · [GitHub](https://github.com/PowderworksCode/straitjacket)
-
```sh
curl -fsSL https://raw.githubusercontent.com/PowderworksCode/straitjacket/main/install.sh | sh
```
@@ -63,8 +64,3 @@ straitjacket: 5 error(s), 0 warning(s) across 128 file(s); 0 suppressed
Encode your taste as deterministic checks and run them across everything an
LLM writes — so you never have to go "Yuck!" by hand again.
-
----
-
-Banner engraving: *Insane patient in a strait-waistcoat*, Wellcome Collection
-(L0011301), [CC BY 4.0](https://creativecommons.org/licenses/by/4.0).
diff --git a/site/content/project/index.md b/site/content/project/index.md
index 74edf42..0bc2199 100644
--- a/site/content/project/index.md
+++ b/site/content/project/index.md
@@ -1,7 +1,7 @@
---
title: Project
description: Where Straitjacket came from, how to contribute a new smell, and the license.
-order: 3
+order: 4
---
Where Straitjacket came from, how to contribute a new smell, and the license
diff --git a/site/content/reference/index.md b/site/content/reference/index.md
index 56d2b3e..30af37d 100644
--- a/site/content/reference/index.md
+++ b/site/content/reference/index.md
@@ -1,7 +1,7 @@
---
title: Reference
description: Specifications — every rule, flag, Action input, and marker.
-order: 4
+order: 5
---
Dry, complete, and accurate. Come here to look something up, not to learn — the
diff --git a/site/package.json b/site/package.json
index d4f5b3f..9e6a475 100644
--- a/site/package.json
+++ b/site/package.json
@@ -3,7 +3,7 @@
"version": "0.0.0",
"private": true,
"scripts": {
- "build": "rm -rf out && powderworks-docs build content --out out --site-url https://straitjacket.dev --name Straitjacket --description \"A secret scanner, but for slop.\" --github PowderworksCode/straitjacket --license MIT --logo /strait-face.png --static public",
+ "build": "rm -rf out && powderworks-docs build content --out out --site-url https://straitjacket.dev --name Straitjacket --description \"A secret scanner, but for slop.\" --github PowderworksCode/straitjacket --logo /strait-face.png --copyright \"Zack Maril\" --wordmark Straitjacket --wordmark-font '\"Manufacturing Consent\"' --wordmark-woff2 /manufacturing-consent-latin.woff2 --wordmark \"The Powderworks Agentic Code Consortium\" --wordmark-font '\"IM Fell English SC\"' --wordmark-woff2 /im-fell-english-sc-latin.woff2 --wordmark Powderworks --wordmark-font '\"IM Fell English SC\"' --wordmark-woff2 /im-fell-english-sc-latin.woff2 --static public",
"deploy": "wrangler deploy",
"dev": "wrangler dev",
"test": "bun test"
diff --git a/site/public/im-fell-english-sc-OFL.txt b/site/public/im-fell-english-sc-OFL.txt
new file mode 100644
index 0000000..68632c1
--- /dev/null
+++ b/site/public/im-fell-english-sc-OFL.txt
@@ -0,0 +1,93 @@
+Copyright (c) 2010, Igino Marini (mail@iginomarini.com)
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/site/public/im-fell-english-sc-latin.woff2 b/site/public/im-fell-english-sc-latin.woff2
new file mode 100644
index 0000000..d8df2f9
Binary files /dev/null and b/site/public/im-fell-english-sc-latin.woff2 differ
diff --git a/site/public/manufacturing-consent-OFL.txt b/site/public/manufacturing-consent-OFL.txt
new file mode 100644
index 0000000..5a40e98
--- /dev/null
+++ b/site/public/manufacturing-consent-OFL.txt
@@ -0,0 +1,92 @@
+Copyright 2019 The Manufacturing Consent Project Authors (https://github.com/googlefonts/manufacturing-consent-font)
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+https://openfontlicense.org
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/site/public/manufacturing-consent-latin.woff2 b/site/public/manufacturing-consent-latin.woff2
new file mode 100644
index 0000000..5761b70
Binary files /dev/null and b/site/public/manufacturing-consent-latin.woff2 differ
diff --git a/site/tests/titles.test.ts b/site/tests/titles.test.ts
index 2e180aa..2907db5 100644
--- a/site/tests/titles.test.ts
+++ b/site/tests/titles.test.ts
@@ -4,7 +4,9 @@
//
// A page's and its come from one frontmatter field, by separate
// paths through the generator. Asserting they agree catches either path
-// dropping the title, which is how the tab broke.
+// dropping the title, which is how the tab broke. A page may say `tab-title`
+// to break that tie on purpose; then the tab must be exactly what it asked
+// for, which is the same assertion pointed at a different source.
import { afterAll, describe, expect, test } from "bun:test";
import { build } from "powderworks-docs/src/build.mjs";
import { mkdtempSync, readdirSync, readFileSync, rmSync } from "node:fs";
@@ -20,8 +22,25 @@ await build(join(import.meta.dir, "..", "content"), out, {
name: SITE_NAME,
description: "A secret scanner, but for slop.",
github: "PowderworksCode/straitjacket",
+ wordmarks: [{ text: SITE_NAME }],
});
+function tabTitlesByEmittedUrl(dir, trail = []) {
+ const found = new Map();
+ for (const entry of readdirSync(dir, { withFileTypes: true })) {
+ if (entry.isDirectory()) {
+ for (const [url, value] of tabTitlesByEmittedUrl(join(dir, entry.name), [...trail, entry.name]))
+ found.set(url, value);
+ } else if (entry.name.endsWith(".md")) {
+ const slug = entry.name.slice(0, -3);
+ const declared = /^tab-title:\s*(.+)$/m.exec(readFileSync(join(dir, entry.name), "utf8"));
+ if (declared)
+ found.set("/" + [...trail, ...(slug === "index" ? [] : [slug])].join("/"), declared[1].trim());
+ }
+ }
+ return found;
+}
+
function pages(dir, trail = []) {
const found = [];
for (const entry of readdirSync(dir, { withFileTypes: true })) {
@@ -32,6 +51,7 @@ function pages(dir, trail = []) {
}
const built = pages(out);
+const overrides = tabTitlesByEmittedUrl(join(import.meta.dir, "..", "content"));
describe("rendered titles", () => {
test("the build emitted a page for every section and leaf", () => {
@@ -42,12 +62,17 @@ describe("rendered titles", () => {
test(`${url} names itself in the tab`, () => {
const html = readFileSync(file, "utf8");
const title = /([\s\S]*?)<\/title>/.exec(html)?.[1] ?? "";
- const heading = /]*>([\s\S]*?)<\/h1>/.exec(html)?.[1] ?? "";
+ const heading = (/]*>([\s\S]*?)<\/h1>/.exec(html)?.[1] ?? "")
+ .replace(/<[^>]*>/g, "");
expect(title).not.toBe("");
expect(title).not.toContain("undefined");
expect(heading).not.toBe("");
+ if (overrides.has(url)) {
+ expect(title).toBe(overrides.get(url));
+ return;
+ }
const [name, ...rest] = title.split(" — ");
expect(name).toBe(heading);
expect(rest.join(" — ")).toBe(url === "/" ? "" : SITE_NAME);