Skip to content

Commit c6b305c

Browse files
committed
Initial pass
1 parent b648a33 commit c6b305c

File tree

4 files changed

+1024
-1
lines changed

4 files changed

+1024
-1
lines changed

README.md

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,44 @@
1-
# pullquote
1+
# pullquote
2+
3+
A simple documentation tool that keeps quotes or snippets in your docs up-to-date. Intended to be wired into CI so you never have to update your snippets again.
4+
5+
## Example
6+
7+
Given a piece of code to document like
8+
```go
9+
// fooBar is a very fine func
10+
func fooBar() {
11+
fmt.Println("Cool!")
12+
}
13+
```
14+
15+
- Insert a `pullquote` tag in your doc:
16+
```md
17+
Check out my example function:
18+
19+
<!-- pullquote src=file.go start="// fooBar" end=^} -->
20+
<!-- /pullquote -->
21+
22+
Neat, huh?
23+
```
24+
25+
- Run `pullquote` on the doc
26+
```shell
27+
pullquote doc.md
28+
```
29+
30+
- `pullquote` adds the snippet between the quotes.
31+
```md
32+
Check out my example function:
33+
34+
<!-- pullquote src=file.go start="// fooBar" end=^} -->
35+
// fooBar is a very fine func
36+
func fooBar() {
37+
fmt.Println("Cool!")
38+
}
39+
<!-- /pullquote -->
40+
41+
Neat, huh?
42+
```
43+
44+
That's it.

go.mod

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module github.com/jwilner/pullquote
2+
3+
go 1.14

0 commit comments

Comments
 (0)