feat: Wikidata engine and Wikipedia knowledge infobox

- Add wikidata engine (wbsearchentities), tests, factory/planner/config
- Wikipedia REST summary: infobox from extract, thumbnail, article URL
- InfoboxView URL; render infobox list in results_inner + base styles
- Preferences Wikidata toggle; engine badge color for wikidata

Made-with: Cursor
This commit is contained in:
ashisgreat22 2026-03-24 00:07:12 +01:00
parent 6e45abb150
commit 24577b27be
13 changed files with 344 additions and 34 deletions

View file

@ -165,7 +165,7 @@ func defaultConfig() *Config {
},
Upstream: UpstreamConfig{},
Engines: EnginesConfig{
LocalPorted: []string{"wikipedia", "arxiv", "crossref", "braveapi", "qwant", "duckduckgo", "github", "reddit", "bing", "google", "youtube", "bing_images", "ddg_images", "qwant_images"},
LocalPorted: []string{"wikipedia", "wikidata", "arxiv", "crossref", "braveapi", "qwant", "duckduckgo", "github", "reddit", "bing", "google", "youtube", "bing_images", "ddg_images", "qwant_images"},
Qwant: QwantConfig{
Category: "web-lite",
ResultsPerPage: 10,

View file

@ -14,8 +14,8 @@ func TestLoadDefaults(t *testing.T) {
if cfg.Server.Port != 5355 {
t.Errorf("expected default port 5355, got %d", cfg.Server.Port)
}
if len(cfg.Engines.LocalPorted) != 14 {
t.Errorf("expected 14 default engines, got %d", len(cfg.Engines.LocalPorted))
if len(cfg.Engines.LocalPorted) != 15 {
t.Errorf("expected 15 default engines, got %d", len(cfg.Engines.LocalPorted))
}
}