You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4d6d632
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: frontend/purestack.studio/guides/extending/regor.mdx
+26-19Lines changed: 26 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,13 @@ highlights:
17
17
18
18
# Regor
19
19
20
-
<ahref="https://github.com/PureStackStudio/Regor"target="_blank"rel="noopener">Regor</a> is the component framework PureStack is built on. It runs in two places:
20
+
<a
21
+
href="https://github.com/PureStackStudio/Regor"
22
+
target="_blank"
23
+
rel="noopener"
24
+
>Regor</a
25
+
>
26
+
is the component framework PureStack is built on. It runs in two places:
21
27
22
28
<Gridcolumns="1"columnsSm="2"class="gap-3 mb-4">
23
29
<Paneltone="neutral"bodyClass="p-3">
@@ -153,7 +159,7 @@ Every page goes through the same four steps:
153
159
| Where it runs | Your build, once per page | The visitor's browser |
154
160
| What it produces | Static HTML | A live, interactive interface |
155
161
| Event handlers, `r-model`, timers | Not kept | Run normally |
156
-
| Page data (`tsSsgContext`) | Available | Not available |
162
+
| Page data (`pageContext`) | Available | Not available |
157
163
| Components | All built-in and registered components | The component families you register |
158
164
159
165
## Regor at build time
@@ -185,24 +191,24 @@ A plain attribute passes a string. An attribute that starts with a colon is a Re
finds components through their exported interfaces. Without the export, it
305
+
can't complete the component's props or jump from a tag in your markup to the
306
+
component's source.
300
307
</AlertBox>
301
308
302
309
Then use it in any page. Content between the tags fills the `<slot>`:
@@ -307,7 +314,7 @@ Then use it in any page. Content between the tags fills the `<slot>`:
307
314
</ReleaseNote>
308
315
```
309
316
310
-
Tag names match registered keys regardless of case, so `<ReleaseNote>` finds `releaseNote`. The kebab-case form `<release-note>` works too. Components can also read page data. Pass the component head to `resolveTsSsgContext` from `@purestack/ts-common`, as the built-in navigation and page-link components do.
317
+
Tag names match registered keys regardless of case, so `<ReleaseNote>` finds `releaseNote`. The kebab-case form `<release-note>` works too. Components can also read page data. Pass the component head to `resolvePageContext` from `@purestack/ts-common`, as the built-in navigation and page-link components do.
311
318
312
319
## Regor in the browser
313
320
@@ -332,8 +339,8 @@ Browser apps do not get the build's component list. Each app registers the compo
0 commit comments