hapi-docs
hapi-docs copied to clipboard
Code Examples & Example Response
How can I generate code examples and example responses?
Guide coming with a new release soon ✌️
Also stuck on this :)
I can't see in the example how code examples or languages are enabled. Is the heroku app using an older version of the example/plugin?
For anybody else who stumbles across this - check out this repository, make your template changes, run npm run build then copy the dist dir to wherever you want to point templateDir.
@antony good advice, thanks!
To add on to that, if your examples are a part of route data, you can modify path.js to pull that data from additional fields. For example,
examples: Hoek.reach(routeOptions, 'examples') || null
And use that field in the template. You will then have to fork and publish the module under your own name/org or point to a git repo.