News for hackers. Stuff that matters.
Re:Show HN: Primo – a visual CMS with Svelte blocks, a code ... by contravariant on Friday July 21, 2023 @09:43AM (#36813646)
That sounds like static content to me, what's wrong with just HTML?
Re:Show HN: Primo – a visual CMS with Svelte blocks, a code ... by klaussilveira on Friday July 21, 2023 @09:48AM (#36813708)
It's not really static. It grabs data from a database, or an API, and renders using entity-specific templates, both from a single entity perspective (post.php theme) and listing (search.php, index.php).

What I mean is: having something like Primo that allows visual management of such dynamic blocks and themes would be nice, so Editors can just play around with the result of their content calls (which the CMS handles transparently, doesn't matter if a SQL query or an API call).

Re:Show HN: Primo – a visual CMS with Svelte blocks, a code ... by pc86 on Friday July 21, 2023 @09:59AM (#36813849)
That is static - none of it is based on user input so it can be compiled into a static HTML page every time you publish a new post or edit a page theme or anything. There's no reason the system needs to pull that 5 year old blog post from the database every time.
Re:Show HN: Primo – a visual CMS with Svelte blocks, a code ... by johnnyworker on Friday July 21, 2023 @10:37AM (#36814321)
That depends on the desired features. E.g. if you have a tag cloud displayed in the sidebar on each page, author list, etc., any change to any post could potentially mean all pages have to be rebuilt. Or if you have different ways to display items (full, thumbnail), different ways of sorting them, and maybe even variable pagination (i.e. "show me page 7 with 15 items per page"), and it can very easily become unfeasible to statically generate all possible permutations. In the context of "systems that allow newbies to get results" this may not be as important, even there you might want to have little neat things like displaying relative dates. Dynamic doesn't have to mean user input, it just means dynamic. And then there's search, in case you want/need to handle that yourself.

A probably very naive solution to that I came up with and experimented with is keeping track of all things that go into a page, and tag the cache of it with them, so I could invalidate all cached items that refer to a thing that was just changed (where that thing can be anything, a tag, the site title, whatever), but I ended up scrapping in favor of caching everything for 1 hour no questions asked, because it was just total overkill for my use case.

Re:Show HN: Primo – a visual CMS with Svelte blocks, a code ... by klaussilveira on Friday July 21, 2023 @10:34AM (#36814273)
How is it not user input? Editor can opt to show whatever in his list, playing with the external source filters: most visited, or last published, or less visited.

Once the editor is done with his work, if you want to compile a bunch of HTML/CSS and push to Netlify, that's fine. But his interaction with the CMS is not static at all.

Re:Show HN: Primo – a visual CMS with Svelte blocks, a code ... by contravariant on Friday July 21, 2023 @10:46AM (#36814419)
Hmm, well if you consider that to be dynamic then editing html files in notepad is dynamic as well I suppose.