Hello!
I have long thought about converting my Wordpress blog into a static site with all the posts as markdown files, using either Hugo, or Jekyll, or Gridsome, etc.
However, I have a custom shortcodes in each of my posts which grab data from a database and convert it to elements in the post.
I tried doing some research about how to make this situation work in a static site, but I in a bit of a loss as to where to start.
- Would it still work as a static site with bits of dynamic content being called at render time?
- Or would the dynamic content be called at build time only (which would be totally ok as well)?
So I thought I'd ask you guys: anyone with similar experiences or tips about this?
Thanks!
Daniel
Top comments (7)
If that is the only dynamic example, probably the address of buildings will not change, so I would add them at "compile time".
For the dynamic parts like Gmaps I would leave some HTML forms/data and fill them at runtime, with JS.
You may want to look into JAMStack architectures. I think this may be the approach youβd want to take here.
so if all I am doing is api calls to get and display information (no mutations on server side), it should work?
Would HUGO's Data Templates be in the right direction?
I enjoyed this conversation...
yes, very concise. But very reaffirming!! :)