Skip to content

Commit 339f1cf

Browse files
authored
Merge pull request #21 from joshraphael/docs-generation
add local embedded doc generation
2 parents eae234c + e0db97c commit 339f1cf

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
cover.*
2-
vendor/
2+
vendor/
3+
_site/

Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,9 @@ test:
88
smoke:
99
bash ./scripts/smoke.sh
1010

11-
docs:
12-
godoc -http=:8080
11+
docs: docs-gen
12+
cd _site && python3 -m http.server 8080
13+
14+
docs-gen:
15+
rm -rf _site/
16+
doc2go -embed -out _site ./...

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,4 +136,12 @@ For convenience, the API docs and examples can be found in the tables below
136136
|`GetMostRecentTickets()`|Gets ticket metadata information about the latest opened achievement tickets on RetroAchievements.|[docs](https://api-docs.retroachievements.org/v1/get-ticket-data/get-most-recent-tickets.html) \| [example](examples/ticket/getmostrecenttickets/getmostrecenttickets.go)|
137137
|`GetGameTicketStats()`|Gets ticket stats for a game, targeted by that game's unique ID.|[docs](https://api-docs.retroachievements.org/v1/get-ticket-data/get-game-ticket-stats.html) \| [example](examples/ticket/getgameticketstats/getgameticketstats.go)|
138138
|`GetDeveloperTicketStats()`|Gets ticket stats for a developer, targeted by that developer's site username.|[docs](https://api-docs.retroachievements.org/v1/get-ticket-data/get-developer-ticket-stats.html) \| [example](examples/ticket/getdeveloperticketstats/getdeveloperticketstats.go)|
139-
|`GetAchievementTicketStats()`|Gets ticket stats for an achievement, targeted by that achievement's unique ID.|[docs](https://api-docs.retroachievements.org/v1/get-ticket-data/get-achievement-ticket-stats.html) \| [example](examples/ticket/getachievementticketstats/getachievementticketstats.go)|
139+
|`GetAchievementTicketStats()`|Gets ticket stats for an achievement, targeted by that achievement's unique ID.|[docs](https://api-docs.retroachievements.org/v1/get-ticket-data/get-achievement-ticket-stats.html) \| [example](examples/ticket/getachievementticketstats/getachievementticketstats.go)|
140+
141+
## Documentation
142+
This library uses [doc2go](https://abhinav.github.io/doc2go/) to generate local static docs for the package. you will first need to install the package and then run the make command to serve up the site
143+
144+
```sh
145+
go install go.abhg.dev/doc2go@latest
146+
make docs
147+
```

0 commit comments

Comments
 (0)