Skip to content

Commit db586fa

Browse files
committed
docs: add README badges, install paths, and content gap fixes
- Add CI, Go Report Card, Go Reference, License, and Release badges - Expand installation section with Homebrew, pre-built binary, and go install paths for non-developer audiences - Add copy-paste Hugo/Pagefind install commands to Requirements - Document companion Markdown files for rule documentation - Add package-level doc comments for pkg.go.dev readiness
1 parent 7c835de commit db586fa

5 files changed

Lines changed: 72 additions & 6 deletions

File tree

README.md

Lines changed: 65 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# rulebound
22

3+
[![CI](https://github.com/armstrongl/rulebound/actions/workflows/ci.yml/badge.svg)](https://github.com/armstrongl/rulebound/actions/workflows/ci.yml)
4+
[![Go Report Card](https://goreportcard.com/badge/github.com/armstrongl/rulebound)](https://goreportcard.com/report/github.com/armstrongl/rulebound)
5+
[![Go Reference](https://pkg.go.dev/badge/github.com/armstrongl/rulebound.svg)](https://pkg.go.dev/github.com/armstrongl/rulebound)
6+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
7+
[![Release](https://img.shields.io/github/v/release/armstrongl/rulebound)](https://github.com/armstrongl/rulebound/releases/latest)
8+
39
Generate static style guide websites from Vale linting packages.
410

511
<img width="1185" height="973" alt="CleanShot 2026-03-26 at 11 08 53" src="https://github.com/user-attachments/assets/c3df108c-acb3-455f-a584-9b177f9c7b73" />
@@ -20,23 +26,52 @@ rulebound build ./my-vale-package --output ./public/
2026

2127
## Requirements
2228

23-
rulebound requires the following dependencies:
29+
rulebound requires Hugo to build sites. Pagefind is optional and adds client-side search.
30+
31+
**Hugo >= 0.128.0** (extended edition recommended):
32+
33+
```sh
34+
# macOS
35+
brew install hugo
36+
37+
# Linux (Debian/Ubuntu)
38+
sudo apt install hugo
39+
40+
# Windows
41+
winget install Hugo.Hugo.Extended
42+
```
43+
44+
**Pagefind** (optional -- if absent, sites build without search):
2445

25-
- **Go 1.22+** (to build from source)
26-
- **Hugo >= 0.128.0** (extended edition recommended)
27-
- **Pagefind** (optional, for client-side search indexing)
46+
```sh
47+
npm install -g pagefind
48+
```
49+
50+
**Go 1.22+** is only needed if you install from source.
2851

2952
## Installation
3053

31-
Install from source:
54+
### Homebrew (macOS and Linux)
55+
56+
```sh
57+
brew install armstrongl/tap/rulebound
58+
```
59+
60+
### Pre-built binaries
61+
62+
Download a binary for your platform from the [latest release](https://github.com/armstrongl/rulebound/releases/latest), extract it, and add it to your `PATH`.
63+
64+
### Go install
3265

3366
```sh
3467
go install github.com/armstrongl/rulebound@latest
3568
```
3669

37-
Clone the repository and use the Makefile:
70+
### Build from source
3871

3972
```sh
73+
git clone https://github.com/armstrongl/rulebound.git
74+
cd rulebound
4075
make build # compile to ./rulebound
4176
make install # install to $GOPATH/bin
4277
```
@@ -221,6 +256,30 @@ Write with clarity and confidence. Avoid jargon.
221256

222257
Guidelines appear in a dedicated sidebar section and have their own index page at `/guidelines/`. rulebound skips files without a `title` in frontmatter, files with malformed YAML, and files with non-`.md` extensions. rulebound ignores subdirectories inside `guidelines/`.
223258

259+
## Companion documentation
260+
261+
Any Vale rule can have a companion Markdown file with the same base name. When present, rulebound uses the companion file's content as the rule's documentation page body instead of the auto-generated description.
262+
263+
```
264+
my-vale-package/
265+
├── Avoid.yml
266+
├── Avoid.md <-- companion doc for the Avoid rule
267+
├── Terms.yml
268+
└── Terms.md <-- companion doc for the Terms rule
269+
```
270+
271+
Companion files use standard Markdown with no required frontmatter:
272+
273+
```markdown
274+
## Why we avoid these words
275+
276+
These terms are exclusionary or unclear. Use the suggested alternatives instead.
277+
278+
**Example:** Instead of "whitelist," write "allowlist."
279+
```
280+
281+
Rules without companion files display an auto-generated description based on the rule's YAML fields (message, severity, type, and sample patterns).
282+
224283
## Supported Vale rule types
225284

226285
rulebound parses all 11 Vale extension types:

internal/generator/generator.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Package generator produces Hugo content files and site configuration
2+
// from parsed Vale rules, content pages, and guidelines.
13
package generator
24

35
import (

internal/hugo/build.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Package hugo manages Hugo project scaffolding, theme extraction,
2+
// site building, and optional Pagefind search indexing.
13
package hugo
24

35
import (

internal/parser/parser.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Package parser reads Vale YAML rule files, companion Markdown docs,
2+
// content pages, and editorial guidelines from a package directory.
13
package parser
24

35
import (

main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// rulebound generates static style guide websites from Vale linting packages.
12
package main
23

34
import "github.com/armstrongl/rulebound/cmd"

0 commit comments

Comments
 (0)