I host a page on GitHub pages and wanted to embed a changelog on the page that would be pulled from the repo commit history. I wasn’t sure if I could use the GitHub API through GitHub pages, so figured out a possible hacky way was to request the HTML of the commit page through $.get() and to go through it, parsing it and filtering out the information I need. This worked fine until I pushed it to GitHub - I get the following error:
Access to XMLHttpRequest at ‘https://github.com/Bassoonian/bassoonian.github.io/commits/master’ from origin ‘https://bassoonian.github.io’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
Is there some other way to gain access to the commit history of a given repository, either through the API or through some other means, and to display it on GitHub Pages? Thank you in advance!