Skip to content

Commit 88e5119

Browse files
authored
feat: add project and date to published websites (#5114)
Added following attributes to html element - data-ws-project - data-ws-last-published This should help debugging issues and webstudio discoverability <img width="851" alt="image" src="https://github.com/user-attachments/assets/a4572070-a6da-40ec-88cd-308ab7f7d22f" />
1 parent 10a6118 commit 88e5119

File tree

82 files changed

+207
-103
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+207
-103
lines changed

fixtures/react-router-docker/app/__generated__/[another-page]._index.server.tsx

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

fixtures/react-router-docker/app/__generated__/[another-page]._index.tsx

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

fixtures/react-router-docker/app/__generated__/_index.server.tsx

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

fixtures/react-router-docker/app/__generated__/_index.tsx

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

fixtures/react-router-docker/app/root.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import { Links, Meta, Outlet, useMatches } from "react-router";
44
// @todo think about how to make __generated__ typeable
55
// @ts-ignore
6-
import { CustomCode } from "./__generated__/_index";
6+
import { CustomCode, projectId, lastPublished } from "./__generated__/_index";
77

88
const Root = () => {
99
// Get language from matches
@@ -19,7 +19,11 @@ const Root = () => {
1919
const lang = lastMatchWithLanguage?.data?.pageMeta?.language ?? "en";
2020

2121
return (
22-
<html lang={lang}>
22+
<html
23+
lang={lang}
24+
data-ws-project={projectId}
25+
data-ws-last-published={lastPublished}
26+
>
2327
<head>
2428
<meta charSet="utf-8" />
2529
<meta name="viewport" content="width=device-width,initial-scale=1" />

fixtures/react-router-docker/app/routes/[another-page]._index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import {
2222
PageSettingsTitle,
2323
} from "@webstudio-is/react-sdk/runtime";
2424
import {
25+
projectId,
2526
Page,
2627
siteName,
2728
favIconAsset,
@@ -33,7 +34,6 @@ import {
3334
getResources,
3435
getPageMeta,
3536
getRemixParams,
36-
projectId,
3737
contactEmail,
3838
} from "../__generated__/[another-page]._index.server";
3939
import { assetBaseUrl, imageLoader } from "../constants.mjs";

fixtures/react-router-docker/app/routes/_index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import {
2222
PageSettingsTitle,
2323
} from "@webstudio-is/react-sdk/runtime";
2424
import {
25+
projectId,
2526
Page,
2627
siteName,
2728
favIconAsset,
@@ -33,7 +34,6 @@ import {
3334
getResources,
3435
getPageMeta,
3536
getRemixParams,
36-
projectId,
3737
contactEmail,
3838
} from "../__generated__/_index.server";
3939
import { assetBaseUrl, imageLoader } from "../constants.mjs";

fixtures/react-router-netlify/app/__generated__/[another-page]._index.server.tsx

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

fixtures/react-router-netlify/app/__generated__/[another-page]._index.tsx

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

fixtures/react-router-netlify/app/__generated__/_index.server.tsx

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)