Skip to content

Instantly share code, notes, and snippets.

@ezefranca
Created May 23, 2025 11:20
Show Gist options
  • Select an option

  • Save ezefranca/e7f4d23066aac23b6aab723cabacdd67 to your computer and use it in GitHub Desktop.

Select an option

Save ezefranca/e7f4d23066aac23b6aab723cabacdd67 to your computer and use it in GitHub Desktop.
<script>
function loadPublications() {
 const publicationsURL = "https://gist.githubusercontent.com/your_username/gist_id/raw/publications.json";
 
 fetch(publicationsURL)
 .then(response => {
 if (!response.ok) {
 throw new Error('Network response was not ok');
 }
 return response.json();
 })
 .then(publications => {
 const publicationsList = document.getElementById('publicationsList');
 publications.forEach(pub => {
 const pubItem = document.createElement('p');
 pubItem.innerHTML = \`<strong>\${pub.year}</strong>: <a href="\${pub.link}" target="_blank">\${pub.title}</a> <i class="ai ai-google-scholar-square ai-1x"></i>\`;
 publicationsList.appendChild(pubItem);
 });
 })
 .catch(error => {
 console.error('Could not load publications:', error);
 });
}
document.addEventListener('DOMContentLoaded', loadPublications);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment