Join the Webstudio community

Updated 5 months ago

Static Sites + CMS

At a glance

The community member is a developer looking to use WebStudio, a graphical site builder, to mock up a website design. They are interested in using a static export approach, where the main site content is static but the blog/news section can be updated separately. The community member is trying to understand how much of WebStudio relies on server-side functionality versus client-side JavaScript. They wonder if it's feasible to have the blog content fetched and rendered client-side, or if that would require server-side processing.

The comments discuss the feasibility of this approach, with some community members suggesting that blogs would require a JavaScript-based application rather than a static site. There is a discussion around dynamic routing and whether the content could be fetched client-side. The WebStudio team indicates that this type of rendering is not their current focus, but it could be possible architecturally. The community members also discuss alternative approaches, such as using a CMS like Nextcloud to manage the content and integrating it into the site build.

There is no explicitly marked answer, but the discussion provides insights into the community member's goals and the technical considerations around implementing a static site with a dynamic blog section.

Hi,

Only just found out about WebStudio today. Am a developer, but not really experienced in anything web-related. I was really just looking for a decent graphical site builder so that I could mock up the design for bits that won't change. So this may be a bit of a basic question.

The way conceptually I saw myself using WebStudio is using a static export. The site I have to work on is mostly files that don't change much, and if they do, I can rerun the export. There is a news page however, and that is the main thing that will evolve over time. The approach that makes most sense to me is to provide the person who will be writing those pages with something like StaticCMS and manage it like the main site - changes get committed, some content and an index JSON or something get deployed, and then the blog posts on the main site would now refer through URLs to the new versions of the content. This GraphQL stuff looks great but I think is overkill for what I need. Then the blog-style content is decoupled from any design changes to the website that might be made.

So I see that you can export statically, and you can also serve the built website using node. What I'm trying to get my head around is how much of WebStudio relies on that server-side functionality, and how much is working as client-side JS.

E.g. let's say that blog posts go somewhere as a JSON array already sorted by date. If the site is output statically, is it able to render things like a list of blog posts with an image and the title plus a URL? Or would all that require something server-side to work at all? I assume dynamic URLs would be off the table - but I assume something like cloudflare workers could glue that together so that each blog post page has a permanent link. Maybe even just a redirect that sets something in JS....
1
b
O
S
28 comments
.... And then if the body of that page is able to fetch its content from the CMS export using AJAX or equivalent, it can render the relevant post.

So I'm wondering, is something like this feasible? Or are the output sites not really plumbed this way and it's mostly designed to be running on the server? I guess many things are possible if I knock up my own scripts and add them in, but it'd be a help if more of this is handled client-side, and I don;t know where the boundaries lie so to speak.

Thanks!
Blogs will require js app, not static
Dynamic routing etc
So, why does the routing need to be dynamic though?
Can the content of something like a collection not be filled out client-side from an AJAX request?
Then it would be purely client side app which is not good for all content-heavy use cases
I think I'd be okay with that myself.
Guess I'll look into it down the line, thanks
this type of rendering is not our current focus, but architecturally should be possible, just not something we are looking into right now
We discussed this internally, in theory it could be possible to make Resource fetch everything on the client and html would be a blank page until js loads
I don't think this is going to be a priority for us though
Sure, got you
I may be able to work it in with some custom code an infrastructure client-side and/or look at the source
another thing to be aware of is that all apis must be public, any authorization token won't be private any more
I think that's fine.
It should be a pretty simple setup with just the site and blog pages. I'm only part of a small team so thinking to serve the content in machine-parseable format in cloudflare pages in the same way.
So the actual CMS system would be talking to repository and repository deploys to hosting and then everything is public
Hi @blaze Have you implemented this blogging system? I would like to know more if you have.
I have yeah. The content is hosted on Nextcloud, so content writers can just use the visual editor for markdown files, then that gets served as a preview and generated using zola, and integrated into the main site build.
Although it's not just plain HTML etc. at the moment. So the build process knits the two together
@blaze very interested in this setup with Nextcloud. A walk through at some point when you are finished would be very valuable for GDPR and privacy and so on it would really be helpful.
It's a lot of custom scripts, so it's not really in a format I can share easily I'm afraid.
But in essence it's just a shared folder on the server. Then you can pass those into whatever static site generator you want.
I'm using zola, but Hugo, Jekyll, whatever should all be very similar.
There's a plugin for PicoCMS which I used to start with. Bur that genrates pages on the fly, turned out to be less suitable for building the entire site and then committing that into a repository for hosting elsewhere
Thank you. Notion allows for exporting pages into separate markdownfiles as i read it. That could be interesting also. But that would be for more personal low volume stuff, so I am satisfied plugging it into markdown components in webstudio.

Appreciated @blaze
Thanks @blaze for sharing your insights. This would help to go in a direction.
You're welcome!
Add a reply
Sign up and join the conversation on Discord