Pages
A page is a custom screen you add to Ryot, such as a dashboard of this month’s workouts or a wall of every book you rated five stars. Pages read your data live, can sit in your sidebar like any other view, and can be shared with a link.
Creating and publishing pages needs Ryot Pro.
The easy way: ask Ryo
Section titled “The easy way: ask Ryo”You do not need to write any code. Open Ryo, describe the page you want (“a page that summarizes my recent activity”), preview the draft it writes, ask for changes, then choose Save page. Ryo’s page appears in your saved views and in Settings → Pages, where you can manage it like any other page.
Build a page yourself
Section titled “Build a page yourself”If you write React code, you can upload a page directly. Open Settings → Pages and follow these steps.
-
Create it. Choose New page, then enter a Page name and a Page address (the unique part of its URL).
-
Add files. Under Source files and assets, enter a File path under
client/orshared/, then choose Upload file, or paste code into Paste source and choose Add pasted file. Adding a file at a path that already exists replaces it. Images and other assets are kept exactly as uploaded. -
Fill in the definition. The defaults work for a simple page:
- Entry file: the file that exports the page,
client/page.tsxby default. - Plugin dependencies (JSON): the plugins your code imports from. Use
{}for none. - Declared queries (JSON): the data queries the page may run. Use
{"queries": {}}for none. - Plugin queries (JSON): queries borrowed from a dependency. Use
{}for none.
- Entry file: the file that exports the page,
-
Save. Choose Create draft (or Save draft for later changes).
-
Compile. Choose Compile draft. If something is wrong, Ryot lists each problem with its file and line. Fix those files, save, and compile again.
-
Preview. Choose Preview compiled draft to try the page. Previews never change your data.
-
Publish. Choose Publish when you are happy.
-
Add it to the sidebar. Under Navigation, pick an icon and choose Create view and open.
A minimal client/page.tsx looks like this:
import { PluginScreenFrame } from "@ryot-app/plugin-client-sdk/screen";
export default function Page() { return ( <PluginScreenFrame title="My page"> <p>Hello!</p> </PluginScreenFrame> );}Pages use the same building blocks as plugin screens. See the plugin docs and Queries to read your data.
Change a page
Section titled “Change a page”Edit files and save the draft as often as you like. Visitors and your sidebar keep showing the published version until you choose Publish again. The page header shows the current draft and published revisions.
Your page’s code decides its own filters, sorting and paging. Saved views of a page have no separate settings.
Let a page change your data
Section titled “Let a page change your data”Pages start read-only. If a page has buttons that change your data, such as “Mark as done”, you must allow it:
- Choose Grant write access in the page’s Write access section.
- Choose Revoke write access to take it back at any time.
Write access applies only to the published page. Previews are always read-only. Whenever Ryo edits a page, its write access is revoked, so you can review the change before granting it again.
Delete a page
Section titled “Delete a page”First remove any saved views and publications that use the page. Then open the page in Settings → Pages and choose Delete page. The draft and the published page are both deleted permanently.
Troubleshooting
Section titled “Troubleshooting”“This draft changed elsewhere.” The page was saved from another tab, device or by Ryo. Copy any local changes you want to keep, then choose Reload latest draft (discard local changes).
“Preview unavailable.” The draft changed after it was compiled. Return to Settings → Pages, reload the draft, compile it again and open a new preview.
“A declared plugin dependency is unavailable.” A plugin listed in Plugin dependencies (JSON) is not installed or not ready. Check its package and scope in Settings → Plugins.
“The page compiler is temporarily unavailable.” Wait a moment and choose Compile draft again.
“This page is used by a saved view or publication.” Remove those first, then delete the page.
A button on my page says “Page write access is required”. Grant the page write access, as described above.
I am using the demo. Page changes are unavailable in demo sessions.