mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 21:19:12 +00:00
Improve rendering search results of plugin content types on web interface
Render only the entry from plugin search response instead of raw json Use the results-ledger styling for results-plugin styling
This commit is contained in:
@@ -56,7 +56,9 @@
|
||||
} else if (type === "ledger") {
|
||||
return render_ledger(query, data);
|
||||
} else {
|
||||
return `<pre id="json">${JSON.stringify(data, null, 2)}</pre>`;
|
||||
return `<div id="results-plugin">`
|
||||
+ data.map((item) => `<p>${item.entry}</p>`).join("\n")
|
||||
+ `</div>`;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -277,9 +279,10 @@
|
||||
#json {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
#results-plugin,
|
||||
#results-ledger {
|
||||
white-space: pre-line;
|
||||
text-align: left;
|
||||
white-space: pre-line;
|
||||
}
|
||||
#results-markdown {
|
||||
text-align: left;
|
||||
|
||||
Reference in New Issue
Block a user