summaryrefslogtreecommitdiff
path: root/Hutch/Views/More/ManPageBrowserView.swift
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2026-08-07 03:45:47 -0500
committerGitHub <[email protected]>2026-08-07 03:45:47 -0500
commitdb40d346c28800a1eec384a5e4f3d7d090198e4d (patch)
treecebd9fb63f26e402b85f5db4192f5dc844c48a27 /Hutch/Views/More/ManPageBrowserView.swift
parent6c26cf048119bf4ff6af039991d3e34d76bac2ad (diff)
parentf9f86b9681909b14304909b1286b9b50362625d7 (diff)
downloadhutch-db40d346c28800a1eec384a5e4f3d7d090198e4d.tar.gz
hutch-db40d346c28800a1eec384a5e4f3d7d090198e4d.tar.bz2
hutch-db40d346c28800a1eec384a5e4f3d7d090198e4d.zip
Merge pull request #32 from krazywarez/sync-man-pages
Sync bundled man page catalog from man.sr.ht (#7)
Diffstat (limited to 'Hutch/Views/More/ManPageBrowserView.swift')
-rw-r--r--Hutch/Views/More/ManPageBrowserView.swift19
1 files changed, 4 insertions, 15 deletions
diff --git a/Hutch/Views/More/ManPageBrowserView.swift b/Hutch/Views/More/ManPageBrowserView.swift
index c22eafe..575b3ae 100644
--- a/Hutch/Views/More/ManPageBrowserView.swift
+++ b/Hutch/Views/More/ManPageBrowserView.swift
@@ -1,26 +1,15 @@
import SwiftUI
/// Entry point for the man.sr.ht browser in the More tab.
-/// Shows a pre-populated list of official sr.ht man pages.
+/// Shows the official sr.ht man pages from the bundled catalog, which the
+/// scheduled sync workflow keeps current with man.sr.ht.
struct ManPageBrowserView: View {
- private let officialDocs: [(title: String, url: URL)] = [
- ("sr.ht", URL(string: "https://man.sr.ht/sr.ht/")!),
- ("hub.sr.ht", URL(string: "https://man.sr.ht/hub.sr.ht/")!),
- ("git.sr.ht", URL(string: "https://man.sr.ht/git.sr.ht/")!),
- ("hg.sr.ht", URL(string: "https://man.sr.ht/hg.sr.ht/")!),
- ("lists.sr.ht", URL(string: "https://man.sr.ht/lists.sr.ht/")!),
- ("todo.sr.ht", URL(string: "https://man.sr.ht/todo.sr.ht/")!),
- ("builds.sr.ht", URL(string: "https://man.sr.ht/builds.sr.ht/")!),
- ("paste.sr.ht", URL(string: "https://man.sr.ht/paste.sr.ht/")!),
- ("man.sr.ht", URL(string: "https://man.sr.ht/man.sr.ht/")!),
- ("meta.sr.ht", URL(string: "https://man.sr.ht/meta.sr.ht/")!),
- ("srht.site", URL(string: "https://srht.site/")!)
- ]
+ private let officialDocs = ManPageCatalog.load()
var body: some View {
List {
Section("Official Man Pages") {
- ForEach(officialDocs, id: \.title) { doc in
+ ForEach(officialDocs) { doc in
NavigationLink(value: MoreRoute.manPage(doc.url)) {
Text(doc.title)
}