Skip to content

Commit ecec5b9

Browse files
committed
feat: add example Vale package for zero-setup demos
1 parent db586fa commit ecec5b9

17 files changed

Lines changed: 218 additions & 0 deletions

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@ Generate a style guide site from a Vale package:
2424
rulebound build ./my-vale-package --output ./public/
2525
```
2626

27+
Try it with the included example package:
28+
29+
```sh
30+
git clone https://github.com/armstrongl/rulebound.git
31+
cd rulebound
32+
go run . build examples/starter-package --output /tmp/my-style-guide
33+
open /tmp/my-style-guide/index.html
34+
```
35+
2736
## Requirements
2837

2938
rulebound requires Hugo to build sites. Pagefind is optional and adds client-side search.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
extends: substitution
2+
message: "Use '%s' instead of '%s'."
3+
level: suggestion
4+
ignorecase: true
5+
swap:
6+
are not: aren't
7+
cannot: can't
8+
could not: couldn't
9+
did not: didn't
10+
do not: don't
11+
does not: doesn't
12+
has not: hasn't
13+
have not: haven't
14+
is not: isn't
15+
it is: it's
16+
should not: shouldn't
17+
that is: that's
18+
was not: wasn't
19+
will not: won't
20+
would not: wouldn't
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
extends: capitalization
2+
message: "'%s' should use sentence case."
3+
level: error
4+
scope: heading
5+
match: $sentence
6+
indicators:
7+
- ":"

examples/starter-package/Jargon.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Use plain language that every reader can understand. Replace jargon and unnecessarily complex phrasing with simpler alternatives.
2+
3+
## Guiding principle
4+
5+
If a shorter, plainer word means the same thing, use it. Documentation is not the place to demonstrate vocabulary. Write at a level that a new team member can follow without a glossary.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
extends: substitution
2+
message: "Prefer '%s' over '%s'."
3+
level: warning
4+
ignorecase: true
5+
swap:
6+
leverage: use
7+
utilize: use
8+
functionality: feature
9+
in order to: to
10+
at this point in time: now
11+
due to the fact that: because
12+
prior to: before
13+
subsequent to: after
14+
in the event that: if
15+
a large number of: many
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Active voice makes documentation clearer and more direct. When you write in active voice, the reader knows immediately who or what performs the action.
2+
3+
## Why it matters
4+
5+
Passive voice obscures the actor and adds unnecessary words. In technical documentation, readers need to know exactly what to do and what the system does.
6+
7+
| Passive (avoid) | Active (prefer) |
8+
| --- | --- |
9+
| The file was created by the system. | The system creates the file. |
10+
| The setting is required by the application. | The application requires this setting. |
11+
| Errors were found during validation. | Validation found errors. |
12+
13+
## Exceptions
14+
15+
Passive voice is acceptable when the actor is unknown, unimportant, or when you intentionally want to emphasize the object rather than the actor. For example: "The package is installed automatically during setup."
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
extends: existence
2+
message: "'%s' looks like passive voice. Use active voice instead."
3+
level: warning
4+
tokens:
5+
- was created
6+
- was deleted
7+
- was found
8+
- was made
9+
- was removed
10+
- was set
11+
- was updated
12+
- were changed
13+
- were found
14+
- were removed
15+
- is expected
16+
- is required
17+
- are expected
18+
- are required
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
extends: occurrence
2+
message: "This sentence has %s words. Try to keep sentences under 30 words."
3+
level: suggestion
4+
scope: sentence
5+
max: 30
6+
token: '[^\s]+'
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
extends: existence
2+
message: "'%s' is wordy. Consider a more concise alternative."
3+
level: suggestion
4+
ignorecase: true
5+
tokens:
6+
- a number of
7+
- as a matter of fact
8+
- at the present time
9+
- by means of
10+
- for the purpose of
11+
- has the ability to
12+
- in the process of
13+
- it is important to note that
14+
- on a regular basis
15+
- take into consideration
16+
- with regard to
17+
- with respect to
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: "TechDocs Style Guide"
3+
description: "Documentation standards for technical writing teams"
4+
---
5+
6+
This style guide defines how we write technical documentation. It covers voice, tone, formatting, and the linting rules that enforce our standards automatically.
7+
8+
Browse the sections below or use search to find a specific topic.

0 commit comments

Comments
 (0)