Website and documentation for Rivet, Indiana University’s design system for web application development
BSD 3-Clause "New" or "Revised" License
7
stars
3
forks
source link
Updated add-on page to fetch README files from add-on repos rather than inline docs #92
Closed
scottanthonymurray closed 5 years ago
Previously, documentation for Rivet add-ons were duplicated on both the Rivet website and the add-on repo itself.
This PR updates the Rivet add-on directory to fetch an add-on's default branch
README
file via the GitHub API and embed it into the page.The API call is made via Hugo's
getJSON
function. TheREADME
file is cached for 10 hours once fetched, preventing rate limiting issues.The API URL is built by manipulating an add-on's
repo
front matter property.An add-on repo must be hosted on github.com for this process to work.