DEV Community

Abhishek Singh
Abhishek Singh

Posted on


Github gist + Github pages

I host my personal website on Github pages, Every time whenever I wanted to update website I had to update code, because data was part of repo.

Recently I learned that we can access gist by api, So now I am hosting my data on gists and loading it dynamically with API call. Which is pretty cool.

Without Database and backend now I can update website anytime without actually updating code.

Here is sample code

let url ="";
fetch(url).then(response => {
   response.json().then(data => {
     let profileData =JSON.parse(data.files["personalData.json"].content)

Top comments (0)

Here is a post you might want to check out:

Regex for lazy developers

regex for lazy devs

Sorry for the callout πŸ˜†