102 Commits
Author SHA1 Message Date
Bogdan Chadkin a9584b8435 refactor: drop tsconfig paths (#3256)
We use tsconfig paths option only to resolve single constants module. It
requires additional plugin in vite and all other tools. At least in
generated published sites it can be just dropped.

Moved __templates__/route-template.tsx to app/routes/template.tsx
2024-04-29 23:51:38 +04:00
Ivan Starkov d8994140ba feat: Sitemap resource (#3228)
## Description

## First Part 

Here is only new local resource `/$resources/sitemap.xml` support

It can't be implemented as route for now as we have 2 issues:
1. Cloudflare does not allow server fetches from same domain
2. Remix does not have fetch like sveltekit allowing to bypass real http
roundtrip when fetching local resources

The idea is to write/use it like any route in case of anything of above
will be solved.

Most PR Size is generated new fixture page.
Move SiteData into the resource.

Here is example of rendering this resource using html.

Project to play:

https://sitemap.staging.webstudio.is/builder/cab934af-8615-411a-99c1-5822a98eac74

Published site:
https://sitemap-saas-t6j12.wstd.work/

<img width="785" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/b62af518-37bb-4daa-9f57-9145b4c77364">

## Next steps:

- Add `origin` to the system, or even better add `system.hostUrl` with
origin, hostname etc
- Add xml element and hardcoded sitemap.xml page

## Steps for reproduction

1. click button
4. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2024-04-24 13:05:53 +03:00
Ivan Starkov a2e9e472a3 build: Stage publish (#3170)
## Description

1. What is this PR about (link the issue and add a short description)

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2024-04-15 12:58:52 +03:00
Bogdan Chadkin 201ffd5fb8 refactor: generalize css api and add test (#3081)
Here just small refactoring. generateCss will accept only maps instead
of arrays of tuples. Also added one test to not break on changes.
2024-04-03 19:26:06 +07:00
Bogdan Chadkin 33d3dbc546 refactor: prepare remix types (#3075)
Here replaced LoaderArgs and ActionArgs with LoaderFunctionArgs and
ActionFunctionArgs to simplify bump with remix v2 which changed named of
these types.
2024-03-31 22:45:30 +07:00
Bogdan Chadkin 86e747e09d fix: update package.json dependencies with cli (#3073)
Here improved CLI build command to upgrade dependencies in user
package.json whenever we change them in template.

For our own dependencies added "internal" template with `workspace:*`
2024-03-30 23:29:50 +07:00
Bogdan Chadkin adfbe51a8f fix: resolve social image asset at build time (#3072)
This fixes the issue with looking for social image asset in server only
image assets array. Data is generated client side but only for social
image similar to favicon asset.
2024-03-30 23:19:34 +07:00
Ivan Starkov be64337d93 fix: Partially revert server only imports (#3053)
## Description

1. What is this PR about (link the issue and add a short description)

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2024-03-25 23:42:37 +03:00
Oleg Isonen cd0174807d chore: use console.info instead of console.log (#3049)
## Description

We allow console.info (btw we should also allow warn/error/info), we
only disallow console.log in the linter because that's what we use for
debugging.

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @TrySound , I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2024-03-24 12:52:46 +01:00
Bogdan Chadkin 4392e1fd1a refactor: move generated data into server module (#3035)
Here another case to potentionally optimize client bundle by moving data
used only in loaders, actions, meta and links into .server.tsx module to
guarantee splitting from client bundle.

Also removed circular PageData type dependecy between route and
generated modules.
2024-03-20 17:41:48 +07:00
Bogdan Chadkin 20df0cef32 refactor: move forms properties into server module (#3034)
Here moved forms properties, page meta and remix params into server
module as used only in loader and never executed on client. Especially
forms properties may contain user credentials and remix does not
guarantee it to not appear in client side bundle.

Also moved those into sdk as universal generators.
2024-03-20 16:42:51 +07:00
Bogdan Chadkin dad898e6a4 refactor: move expressions into base sdk (#3032)
We need to move stuff not related to react out of react-sdk into
universal sdk package.
2024-03-19 02:02:07 +07:00
Bogdan Chadkin e17f1e082a experimental: support system variable in compiler (#3009)
Ref https://github.com/webstudio-is/webstudio/issues/2903

Here switched to system variable in resources, page meta and component
generator. Removed legacy path params variable from schema.
2024-03-14 00:09:44 +07:00
Bogdan Chadkin 7b629b6908 experimental: navigate to dynamic path without reload (#2982)
Ref https://github.com/webstudio-is/webstudio/issues/2903

Here fixed the issue with navigating to dynamic paths. The page get full
reload because provided path does not match pages list and remix link is
not used.

Solved by using the following heuristic: use remix link when the path is
relative and not asset. It will cover manually specified link href or
computed with expression one.

Now we can remove pagePaths from generated code.
2024-03-09 11:25:15 +07:00
Ivan Starkov 2b888d52fd feat: CLI Mutiple template support (#2957)
## Description

We have that depending on some external parameters we will need to have
custom builds. Like adding analytics, web vitals etc on specific
resources.

Instead of relying on env variables (has different support on different
build systems vite, esbuild etc)

We can just use additional templates override. i.e.



```bash
# Without analytics
webstudio build --template ./custom-template

# With analytics
webstudio build --template ./custom-template --template ./custom-template-analytics
```


## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2024-03-04 14:03:34 +03:00
Bogdan Chadkin 2d5e5c88f9 refactor: revert remix redirect method (#2951)
This reverts commit fa376d4204.

Seems like native redirect does not suppot relative paths which are
essential for redirect ui.
2024-02-28 00:23:14 +07:00
Bogdan Chadkin fa376d4204 refactor: use native Response.redirect method (#2943)
Here switched from remix redirect method to native Response.redirect
available in all platforms.
2024-02-25 12:31:41 +07:00
Ivan Starkov 979d0fa5d9 feat: Preload page font and background-image assets (#2932)
## Description

Add background images and fonts to link rel preload (to reduce FCP, LCP
and Layout Shift)

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2024-02-22 15:53:08 +03:00
Jaya Krishna Namburu 59593e313b feat: allow users to set custom redirect status code (#2930)
## Description

Allow users to configure `301` or `302` status code for redirects.

## Steps for reproduction

- Go to project settings
- Add a redirect
- Select a status code from the dropdown at the time of adding a
redirect.
- When the project is deployed, and redirects should reflect the status
code that is added in project settings.

![Screenshot 2024-02-21 at 13 48
18](https://github.com/webstudio-is/webstudio/assets/11075561/69999f06-8140-4b98-b095-eda32530047b)


## Code Review

- [ ] hi @kof   I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [x] made a self-review

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
2024-02-21 12:35:18 +01:00
Jaya Krishna Namburu 7e8896cb75 experimental: Add support for redirects in deployment (#2824)
## Description

WIP, still a lot of cases to cover. Please don't review yet

1. What is this PR about (link the issue and add a short description)

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2024-02-16 06:46:41 +01:00
Bogdan Chadkin be2b5ce31a refactor: rename page.pathVariableId to pathParamsDataSourceId (#2915)
Ref https://github.com/webstudio-is/webstudio/issues/2903

Small renaming for clarity
2024-02-15 19:31:55 +07:00
Bogdan Chadkin 4c20e2d317 refactor: avoid generating unused variables in page components (#2906)
Here improved component generator logic to not generate unused
variables. This way later we will be able to avoid requesting unused
resources as well.
2024-02-14 11:50:10 +07:00
Bogdan Chadkin 4a6c91bf31 experimental: generate variables for page meta website (#2898)
Here added support for variables in page meta in generated websites.
Prevented creating unused variables. We can reuse the same way for other
generated parts later.
2024-02-11 20:53:19 +07:00
Oleg Isonen d1dba475c5 feat: Clonable project (#2871)
## Description

Every project is now clonable if you have a shared link with at least
view permission or higher.

## Steps for reproduction

1. get a link with view permission from another owner
2. clone it
3. repeat the same from your own project

## Code Review

- [ ] hi @istarkov , I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2024-02-07 15:46:22 +01:00
Bogdan Chadkin 84fc906721 refactor: convert page meta fields into expressions (#2853)
Here added huge migration to convert page meta into expressions and
adapted the code to compute those.
2024-02-01 14:20:18 +07:00
Bogdan Chadkin 35fbcb9fc4 refactor: generate page meta in loader (#2844)
Here refactored page meta with simpler type than full page data and
moved it into factory which is invoked lazily in loader.

This will let us support variables and resources in page settings later.
2024-01-30 21:24:55 +07:00
Ivan Starkov 091bd3d9a3 feat: Allow change route template in cli custom templates (#2827)
Allow change route template, so various tests in saas become easier. 
Also now each template can have own route template.
2024-01-26 14:38:53 +07:00
Bogdan Chadkin d0395d072e refactor: generalize generating components (#2816)
Ref https://github.com/webstudio-is/webstudio/issues/2791

Here renamed generatePageComponent to generateWebstudioComponent and
refactored to use it later for slots.

"Page Params" variable is now passed as parameter. Similar way we will
support parameters in design components.
2024-01-25 23:17:17 +07:00
Bogdan Chadkin 8d073e598d refactor: pass resources to page with context (#2777)
Resources should not be part of component props.
Drilling resources to nested custom components
would be more complex so using context can
simplify this part and prepare for rendering
slots as separate components.
2024-01-18 23:33:54 +07:00
Oleg Isonen 8e2e07ea23 feat: Allow selecting a nested path for link href (#2773)
Ref https://github.com/webstudio-is/webstudio/issues/404

## Description

- can select a nested path for link pages
- can click in preview to get to the page

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @TrySound , I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2024-01-17 19:02:41 +01:00
Oleg Isonen 65d0df8213 feat: Nested routes compiler (#2766)
Ref https://github.com/webstudio-is/webstudio/issues/404

## Description

- generate remix app with nested routes

## Steps for reproduction

1. create nested routes 
2.  generate app using cli

## Code Review

- [ ] hi @istarkov , I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2024-01-16 17:03:54 +01:00
Ivan Starkov 672ee9a98a feat: Support atomic CSS on build (#2739)
## Description

Logic was changed only in `prebuild.ts`. All other changes or README or
autogenerated

Integrate atomic CSS support into CLI

The Vercel fixtures project now explicitly sets atomicStyles to true.
Netlify explicitly sets atomicStyles to false.
The custom template doesn't have a default setting, so atomicCss=true is
used."

## Steps for reproduction

See fixtures.

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2024-01-08 10:36:09 +02:00
Oleg Isonen c6bdef5084 feat: CSS engine has now a Style Sheet rendering with atomic classes which will lead to a 10x smaller bundle size (#2713)
## Description

CSS engine has now a Style Sheet rendering with atomic classes which
will lead to a much smaller bundle size

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-12-30 21:08:37 +01:00
Oleg Isonen 5930064678 feat: Rename Site to Project because we are not just building a site builder (#2718)
## Description

Site is too narrow name for things that are pssible with webstudio


## Code Review

- [ ] hi @TrySound , I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-12-30 10:40:09 +01:00
Bogdan Chadkin f0b7a41824 fix: improve generating resources (#2715)
Ref https://github.com/webstudio-is/webstudio/issues/2532

Here added resources fixture and fixed a few issues with it

- add optional chaining to collection?.map to safely skip iterating
missing data
- added any to resource responses to access remote data without type
errors
- always generate empty headers array
- skip empty body in generated resources
2023-12-27 23:42:50 +07:00
Bogdan Chadkin 842c017c11 refactor: make resources universal (#2710)
Refactored resources generator to use universal http resource which
cover most cases.
- loadResource is imported from sdk
- accepts url (expression), method, headers (value is expression) and
body (expression)
- all variables and page params parameter are available for loader
expressions
2023-12-24 01:03:44 +07:00
Bogdan Chadkin dcd989108e feat: generate resource loaders (#2701)
Ref https://github.com/webstudio-is/webstudio/issues/2532

Here added generation of server modules with resource loaders. These
loaders are invoked in remix loader and result is passed to page
component.

Check fixtures and tests.
2023-12-18 21:24:50 +07:00
Bogdan Chadkin 7fe4b770d6 feat: support page path params in site compiler (#2682)
Ref https://github.com/webstudio-is/webstudio/issues/2532

Here remix route params are adapted to URLPattern format and passed to
generate page component as prop.

For this added 2 remix specific utilities
- convert subset of url pattern to remix route
- generate utility to adapt remix params to URLPattern params for
example for `/*` `params['*']` is replaced with `params[0]` and for
`/:slug*` `params['*']` is replaced with `params['slug']`
2023-12-15 00:34:51 +07:00
Bogdan Chadkin 60c17c6751 fix: create temporary files within assets directory (#2669)
Fixes
https://discord.com/channels/955905230107738152/1133337749856989316/1181798549982302329

This fixes linux issue when tmp and cwd are on different mounts or
drives.
2023-12-08 00:12:05 +07:00
Jaya Krishna Namburu 301e7d95ca fix: Display error messages when a template is not passed for building a project (#2660)
## Description

fixes #2538 and #2615

Don't use `vercel` as default template while exporting from cli

## Code Review

- [ ] hi @istarkov , I need you to do
  - detailed review (read every line)
  
## Before requesting a review

- [x] made a self-review

## Before merging

- [x] tested locally and on preview environment (preview dev login:
5de6)
- [x] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
2023-11-28 18:07:21 +01:00
Ivan Starkov 437d23f4d7 fix: Omit excluded pages from sitemap generation (#2579)
## Description

Omit excluded pages from sitemap generation

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-11-07 15:26:01 +02:00
Ivan Starkov 3eba3e1ede feat: Sitemap endpoint support (#2565)
## Description

Need to merge, before proceed with sitemap generation. Will ruin all
fixtures tests after merge

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-11-05 17:45:27 +02:00
Ivan Starkov aaaf57da9f feat: Add Twitter card support & exclude pages from search/index (#2545)
## Description

ref #2544

Corresponding SAAS PR
https://github.com/webstudio-is/webstudio-saas/pull/215

- Support of page property - `excludePageFromSearch`
- Introduced functionality to enable the meta robot noindex tag for the
entire website.
- Implemented robots.txt support, which appears to be essential for
Twitter meta cards functionality.

Needs corresponding PR in SAAS deploy.

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-11-02 09:39:06 +02:00
Ivan Starkov 50373db9c1 build: Cli support for meta tags (#2537)
## Description

- Added support of   "image/x-icon",  "image/ico", for upload
- changed local dev resize path
- fixed zod meta types
- added favicon, site_name og tags in route template
- added cache headers for html content

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-10-31 15:51:17 +02:00
Oleg Isonen 8e9620721d feat: Rename webstudio-cli to webstudio as we got the shorter namespace (#2443)
## Description

1. What is this PR about (link the issue and add a short description)

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-10-10 12:25:00 +04:00
Bogdan Chadkin 5482ec414a perf: drop internal data from generated sites (#2362)
Internal data structures like instances, props, data sources, assets and
pages no longer necessary in generated sites. Nanostores not longer used
to store them.

Now we have less dependencies and smaller runtime.
2023-09-29 16:22:09 +04:00
Jaya Krishna Namburu f22e0105aa chore: Add netlify deploy command list in cli and in export tab (#2380)
## Description

Adds the `netlify` deployment commands sequence. Tested one by one,
seems to be the best flow i can come by. Would like to validate on
someone else too.


## Code Review

- [x] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview


## Before requesting a review

- [x] made a self-review
2023-09-26 19:12:12 +02:00
Jaya Krishna Namburu ac793ca457 chore: Add checks for template names for build command in cli (#2358)
## Description

Small changes that adds checks for templates and hints for templates in
the `--help` command.

## Steps for reproduction

```sh
webstudio-cli --help
```

## Code Review

- [ ] hi @TrySound , I need you to do
  - detailed review (read every line)
2023-09-26 06:52:41 +02:00
Bogdan Chadkin d25e97fe65 perf: generate pages paths (#2360)
Here generated a list of pages paths. It is used in link component to
switch to remix link internally when the link is app route.

Providing whole pages list can bloat runtime when there are many pages
or when there are many seo data so having single page per route should
be enough.

The list is always empty in builder because links are managed with
global interceptor. Ideally frameworks should uses navigation api and
distinct routes from other paths so we would not need to generate
anything.
2023-09-25 12:20:08 +04:00
Bogdan Chadkin 5f93ecb228 perf: generate page prop for links (#2357)
Moved links resolve into props normalizing which is called for whole
project before rendering converting page prop into string.

Remix links now check only if provided path matches any page. Ideally it
should be handled with navigation api to remove all complexity from
links components.

This will let us stop rendering props and assets data in generated
pages.

Also fixed links with hashes.
2023-09-24 20:07:15 +04:00