Add full-text search, EU channel theme, and web-only sources
Search: new FTS5-backed SearchStories query, /search JSON endpoint, client-side overlay (search.js) wired into the layout header. EU channel gets its own theme color (#003399) across bg/text/border/glow classes. Sources can now route to non-Matrix channels without validation error (web-only mode); a warning still flags typos.
This commit is contained in:
@@ -140,7 +140,10 @@ func (c *Config) validate() error {
|
||||
return fmt.Errorf("sources[%d] (%s): direct_route is required for enabled sources", i, s.Name)
|
||||
}
|
||||
if _, ok := c.Matrix.Channels[s.DirectRoute]; !ok {
|
||||
return fmt.Errorf("sources[%d] (%s): direct_route %q is not a configured matrix.channels key", i, s.Name, s.DirectRoute)
|
||||
// Not a Matrix channel — treated as web-only (stories visible in the
|
||||
// UI but never posted). Warn so typos still surface.
|
||||
slog.Warn("source routes to non-Matrix channel (web-only)",
|
||||
"source", s.Name, "direct_route", s.DirectRoute)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -202,23 +202,6 @@ feed_url = "https://e.com/rss"
|
||||
tier = 1
|
||||
poll_interval_minutes = 20
|
||||
enabled = true
|
||||
`},
|
||||
{"direct_route not in channels", `
|
||||
[matrix]
|
||||
homeserver = "https://h"
|
||||
user_id = "@p:h"
|
||||
password = "pw"
|
||||
[matrix.channels]
|
||||
tech = "!t:e"
|
||||
[storage]
|
||||
db_path = "/tmp/t.db"
|
||||
[[sources]]
|
||||
name = "S"
|
||||
feed_url = "https://e.com/rss"
|
||||
tier = 1
|
||||
poll_interval_minutes = 20
|
||||
direct_route = "gaming"
|
||||
enabled = true
|
||||
`},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user