Join the Webstudio community

b
blaze
Offline, last seen 3 months ago
Joined December 13, 2024
Hi,

Was building a site menu and looking to fill out the entries in that automatically. Is there a way to get a variable, or through some mechanism, for all the pages that are in the project? And then I can add the title to the link text and the URL for clicking it. Would also be ideal if I could filter on those - so I can add a variable on some pages to hide them from the menu, if they're a work in progress etc.

Thanks!
26 comments
O
B
p
b
X
When I build my project locally for SSG, the output filenames under /dist/client contain a unique version hash:

Is there a way I can disable this? I want to version-control the output, and this then interferes with that.

Thanks!
Hi,

Is there an easy way to output unminified HTML for SSG builds? If possible, I don't want to lose comments and the indentation I have in my JS and CSS featured in the page. I see use of "prettier" in the repository but not sure if there's an appropriate place I can put it in config or use a custom build command for my synced project locally.

Thanks
4 comments
b
J
Hi,

I want to export my project for a static site. When I use the cloud web interface I wait for it to complete, and then get some "failed to download" error, so I'm trying the CLI.

I've linked my project, gone into that directory, run npm install on the project (as I got a backtrace with missing packages if I didn't and just used the CLI), and then I can build successfully:
Plain Text
# webstudio build --template ssg
│
◇  Scaffolding the project files
│
◇  Downloaded fonts and images
│
◇  Build finished


Except no HTML files are output. I assume the "public" folder is the intended destination. I see the assets containing images and CSS, but there are no pages in there.

Am I missing something here? Or is this bug?

Thanks
20 comments
b
B
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....
28 comments
b
S
J
O