-
Notifications
You must be signed in to change notification settings - Fork 307
Static space build docs #1742
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
Static space build docs #1742
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the documentation for building static Spaces by introducing and explaining the new app_build_command and app_file configuration options.
- Added a new section in spaces-sdks-static.md outlining how to build from source automatically.
- Updated spaces-config-reference.md to include documentation for the new app_build_command configuration.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
docs/hub/spaces-sdks-static.md | Added instructions for automatically building static Spaces. |
docs/hub/spaces-config-reference.md | Added configuration reference for app_build_command and build process. |
Co-authored-by: Copilot <[email protected]>
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
Co-authored-by: Victor Muštar <[email protected]>
Co-authored-by: Victor Muštar <[email protected]>
docs/hub/spaces-sdks-static.md
Outdated
|
||
## Adding a build step before serving | ||
|
||
Static Spaces support adding a custom build step before serving your static assets. This is useful for frameworks like Next.js, SvelteKit, and others that require a build process before serving. The build command runs automatically when your Space is updated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that Next.js and sveltekit may not be the most appropriate as they specialize in SSR and need some config to build SPAs
(and https://huggingface.co/spaces/static-templates/sveltekit / https://static-templates-sveltekit.static.hf.space I don't know why it doesn't work 😬)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mhh it should work with adapter static (didn't check the code)
ah ok https://huggingface.co/spaces/static-templates/sveltekit/blob/main/svelte.config.js idk
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if it doesnt work for next.js/sveltekit we can rollaback the wording to react/svelte/vue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes i would emphasize frontend only frameworks like React/Svelte/Vue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left a few suggestions
Co-authored-by: Julien Chaumond <[email protected]>
Co-authored-by: Julien Chaumond <[email protected]>
Co-authored-by: Victor Muštar <[email protected]>
Co-authored-by: Julien Chaumond <[email protected]>
Co-authored-by: Julien Chaumond <[email protected]>
cc @christophe-rannou @Michellehbn @julien-c @xenova @jbilcke-hf @mishig25 for viz
Also planning to add space templates