A blog article might be read hundreds of times between edits. Each reader needs essentially the same title, body and publication date.
For a personal site, I like an arrangement where the CMS handles editing and the website serves a local copy. An import reads the published content, transforms it into the shape the site needs, and stores it in the application's database.
That gives the website a straightforward reading path. It can query articles, load their categories and render the page using its own records.
The interesting part is deciding what happens when that copy can't be refreshed.
Choose the delay you can live with
An imported copy introduces a gap between publishing an edit and showing it on the site.
For a personal blog, a scheduled import might be entirely reasonable. If I need a correction to appear immediately, I'd want a way to request an import after publishing. Other sites may need a different approach because their content changes more often or has a stricter requirement for freshness.
I'd make that delay an explicit decision. It affects how someone checks their work and what they should expect after pressing Publish.
This also gives the site some independence from the CMS during ordinary reading. If a refresh fails, there may still be useful content available locally. That advantage depends on how carefully the import handles its failures.
Decide which content belongs in the copy
Drafts and published entries need different treatment. Contentful separates them through its APIs: the Delivery API retrieves published content, while the Preview API can also retrieve unpublished content. Its API overview explains that distinction.
I'd choose the source deliberately and keep preview behaviour separate from the public reading path.
A stable entry identifier matters too. A title or slug can change without making the article a new piece of content. I'd want the import to recognise the existing entry and update its local record.
Transformations belong at this boundary. If the frontend needs rendered rich text or a table of contents, generating those during the import can keep that work out of each page request.
Treat missing content carefully
An article missing from a complete import may have been unpublished or removed. An article missing because the request failed is a different situation.
I wouldn't want a connection problem to turn into an instruction to empty the blog.
Pagination deserves the same care. If an API returns results in pages, seeing the first page doesn't tell us what exists beyond it. Any cleanup based on absence needs a complete view of the content it's comparing.
The import also needs a policy for an entry it can't transform. Should the previous local version remain available? Should the whole refresh stop? The right answer depends on the site, but it should be intentional and visible to whoever maintains it.
Make the next refresh easy to understand
I want to know when an import last completed and whether any entries were skipped. If it failed, I want enough context to investigate the affected operation.
I'd test repeated imports as well. Importing unchanged content twice should have a predictable result, including keeping the same local identity. I'd also cover edits, removals and failures after some work has already happened.
For more demanding applications, staging a complete import before replacing the visible copy may be worth the extra work. A small site might choose a simpler process with clearly understood limitations.
Keeping a local copy adds something to maintain. For a site with relatively infrequent edits, I like being able to make that trade deliberately: a familiar database query for the reader, and a refresh process whose behaviour I can inspect.