Dynamic Content in a Statically Generated Site

I migrated this site a the static site generator ('Jekyll') last year. This means that the overall site and it's complexities are managed and trackable via a version control system (such as GitHub) and generated by a build process, rather than being dependent on server side processes and database lookups.

However it does mean that even simple content updates require me to update the code, and to commit the update to my code repository to trigger the build system to regenerate my site's updated content.

If I could augment this static site with dynamic content - it would enable me to more easily make content udpates and to potentially share the content curation process with more business focused (less technical) members of the team. To achieve this I'll be using a Dynamic Content System to inject the updated content, while utilising a secondary system for content updates and publishing mechansisms, to give me the best of both worlds. If such a dynamic content system has been architected to run headless (i.e. the content and presentation layers are decoupled) then I can also utilise this content in other channels, for example if I wanted to share this content with my native iOS and Android apps, or perhaps as part of my social media publishing workflows.

The section above is (with the pink background) is being managed by, and published, from Amplience Dynamic Content and dynamically loaded, though for pages where the content would benefit from being refreshed more frequently I could have much more of the page content be driven by the dynamic content system. Another approach might be to include some of this content into the build process, so that some of the content is included from the server-side process - which might give better access to content for search engine crawlers.

While this example just uses some simple text content elements, we can easily build a comprehensive library of content types, for use in all digital channels. Amplience Dynamic Content - Content Editor

For this example I load the dynamic content asynchronously and then use the Moustache templating language to dictate the presentational aspects as mapped to the given pieces of the received structured content.

<h2>{{ dynamic_content_title }}</h2>
{{ dynamic_content_paragraph1 }}

** Note: as jekyll also uses curly braces { } for it's templating language, you must wrap your moustache logic in {% raw %} to avoid it being interpreted by Jekyll.