You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 APIhttps://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.
The text was updated successfully, but these errors were encountered: