Skip to content

Commit cf64b8d

Browse files
committed
docs: Describe basename prop in UI documentation
Signed-off-by: Harri Lehtola <peruukki@hotmail.com>
1 parent 34d2bb0 commit cf64b8d

1 file changed

Lines changed: 21 additions & 1 deletion

File tree

docs/reference/alpha-web-ui.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ You can use `projectListPromise` to provide a promise that overrides where the F
122122

123123
You can add custom tabs for any of the core Feast objects through the `tabsRegistry`.
124124

125-
```
125+
```jsx
126126
const tabsRegistry = {
127127
RegularFeatureViewCustomTabs: [
128128
{
@@ -141,3 +141,23 @@ const tabsRegistry = {
141141
```
142142

143143
Examples of custom tabs can be found in the `ui/custom-tabs` folder.
144+
145+
**Custom basename**
146+
147+
If you want to serve the UI under a specific URL path instead of at the root,
148+
you can use the `basename` prop, and it will be forwarded to React Router.
149+
150+
For example, to serve the UI at the `/feast-ui` path:
151+
152+
```jsx
153+
<FeastUI
154+
basename="/feast-ui"
155+
feastUIConfigs={{
156+
projectListPromise: fetch("/feast-ui/projects-list.json", {
157+
headers: {
158+
"Content-Type": "application/json",
159+
},
160+
}).then((res) => res.json())
161+
}}
162+
/>
163+
```

0 commit comments

Comments
 (0)