-
-
Notifications
You must be signed in to change notification settings - Fork 68
Description
It's common for people to use Github pages as a free host for their blogs.
Often this is done with Jekyll, which means a common pattern can be identified.
Given a jekyll blog <username>.github.io the posts can be queried by the API
https://api.github.com/repos/<username>/<username>.github.io/contents/posts
(max 1000 files)
Each file will have a path which we can create the page url by concatenating to the original blog with the extension changed from .md to .html
https://<username>.github.io/<path | changesuffix('.html')>
If we need to get creation/modification date the API
https://api.github.com/repos/phra/phra.github.io/commits?path=posts/zwc-fingerprint.md&page=1&per_page=1 (with bigger page size and choosing last for getting creation date).
This would support custom-domain blogs too, provided the user can find the original.
Perhaps doing a redirect check on the final url to support custom domains better would be desirable.