DEV Community

Discussion on: Static Portfolio with dynamic content

 
niklasfyi profile image
Niklas Resch

This will just print the content of my last public toot from Mastodon.

<ul>
  {{ $urlPre := "https://chaos.social" }}
  {{ $gistJ := getJSON $urlPre "/api/v1/accounts/166987/statuses?limit=1" }}
    {{ .content | plainify }}
</ul>

I don't need any backup. I just want to show the last toot and link to it. So I think that would be simple enough.

When the site is complete I will check how long the hugo build will run on my uberspace.de host and then I can think about the frequency of building. Maybe every 30 min.

Thread Thread
 
rpalo profile image
Ryan Palo

The nice thing about backup is you can check to see if there have been any tweets, and only build if that is the case. If you’re averse to deploying super frequently, maybe that’s a good idea. Otherwise, what you have sounds great! 😁