Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix SSG explanation #2925

Merged
merged 2 commits into from
Jul 23, 2024
Merged

docs: fix SSG explanation #2925

merged 2 commits into from
Jul 23, 2024

Conversation

flogehring
Copy link
Contributor

Description of Problem

The docs state that with SSG data may not change between deploys.

Proposed Solution

Rephrase it to say data may not change between requests instead.

Copy link

netlify bot commented Jul 10, 2024

Deploy Preview for vuejs ready!

Name Link
🔨 Latest commit 1dd8fcf
🔍 Latest deploy log https://app.netlify.com/sites/vuejs/deploys/668fa29c9d37cf00089d2a10
😎 Deploy Preview https://deploy-preview-2925--vuejs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@AloisSeckar
Copy link
Contributor

AloisSeckar commented Jul 10, 2024

I believe the current wording is correct. "Static" means that no matter how many requests you do, you'll always receive the very same file(s). To change anything in the content, you need to deploy a new version of application with updated files.

Purely static sites should be HTML + CSS + media files only. No backend, no database, no web services, no processing on server...

But I think the term is also often used for JavaScript files, that are "static" from the server perspective (they are always served the same), but dynamic for the user - JavaScript on client allows interaction with the content, including fetching data from external endpoints. And this might cause the confusion.

@flogehring
Copy link
Contributor Author

Purely static sites should be HTML + CSS + media files only. No backend, no database, no web services, no processing on server...

They are being processed on the server (or in CI). During Generation in the build process, which may very well include backends and databases etc. Purely static files are the results of that with SSG.

The current text said, that the data cannot change between deploys. That sentence would only make sense to me, if you separate the meaning of the build process from the actual deployment as in hosting. If so, the wording should be updated further, to include that notion and thus make it more clear.

Considering the possibly dynamic data at build time I still think that my PR makes more sense than the current wording.

@AloisSeckar
Copy link
Contributor

If you make request to /foo on SSG site 1000 times, you will receive the very same foo.html every time. Data are not changed between requests. To change the content, you have to statically build and deploy a new version of the application.

@flogehring
Copy link
Contributor Author

Yes absolutely! 😊

That is why the previous wording was wrong.

@AloisSeckar
Copy link
Contributor

Oh, now I am finally getting you. Both sentences are true, but the updated one sounds more explanatory. You're right, sorry.

@flogehring
Copy link
Contributor Author

Oh, now I am finally getting you. Both sentences are true, but the updated one sounds more explanatory. You're right, sorry.

Glad we're on the same page.

Do you think it would help to change consuming into providing in the previous sentence?

The keyword here is static: SSG can only be applied to pages consuming providing static data i.e. data that is known at build time and can not change between requests.

@AloisSeckar
Copy link
Contributor

Do you think it would help to change consuming into providing in the previous sentence?

The keyword here is static: SSG can only be applied to pages consuming providing static data i.e. data that is known at build time and can not change between requests.

Now when you point it out, yes. Although we can say a site "consumes" input data to create a content, more natural way of thinking about the concept probably would be to say a site "provides" data to the user...

@NataliaTepluhina NataliaTepluhina merged commit 2276b13 into vuejs:main Jul 23, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants