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
feat(docs): add self-referential deep links from docs to app screens
- Add deepLink field to DocPage and KeywordIndexEntry models
- Populate deep links for 7 user guide pages (connections, messages,
nodes, map, settings, modules, firmware)
- DocsLinkUriHandler now intercepts meshtastic:// URIs in markdown
- DocsPageRouteScreen shows 'Open in App' button when deepLink is set
- DocsNavigation wires onDeepLink through platform UriHandler
- Add deep_link frontmatter field to 7 user doc pages
- Update navigation-and-deep-links developer doc with full reference
- Fix link validator to skip meshtastic:// URIs
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@@ -117,5 +122,46 @@ fun `help docs deep link routes correctly`() {
117
122
}
118
123
```
119
124
125
+
## Self-Referential Deep Links in Docs
126
+
127
+
User guide documentation pages can include a `deep_link` frontmatter field that maps the doc page to its corresponding app screen. When present, the in-app docs viewer shows an **"Open in App"** button in the top bar, allowing users to jump directly from documentation to the live feature.
128
+
129
+
### How It Works
130
+
131
+
1. The `deep_link` field in frontmatter specifies the target `meshtastic://` URI.
132
+
2.`DocBundleLoader` populates `DocPage.deepLink` from the page definition.
133
+
3.`DocsPageRouteScreen` renders a `TextButton` in the top app bar when `deepLink` is non-null.
134
+
4. Tapping the button fires the URI through the platform `UriHandler`, which routes back through `UIViewModel.handleDeepLink()` → `DeepLinkRouter`.
1. Add `deep_link: meshtastic://meshtastic/{path}` to the page's YAML frontmatter.
151
+
2. Add the matching `deepLink` parameter to the page's `UserPageDef` in `DocBundleLoader`.
152
+
3. The in-app docs viewer picks up the deep link automatically — no further UI changes needed.
153
+
154
+
> **Note:** Deep links in frontmatter are ignored by Jekyll and Docusaurus, ensuring no broken links on external doc sites. The `meshtastic://` URI scheme is only active in-app.
155
+
156
+
### Inline Deep Links in Markdown
157
+
158
+
The `DocsLinkUriHandler` also intercepts `meshtastic://` URIs in markdown content. Authors can use inline deep links for contextual "try it now" actions:
159
+
160
+
```markdown
161
+
Configure your LoRa preset in [Settings](meshtastic://meshtastic/settings/lora).
162
+
```
163
+
164
+
These links only work in the in-app docs viewer. On Jekyll/Docusaurus, they render as non-functional links. Use sparingly and always provide equivalent text instructions.
0 commit comments