Skip to content

Commit

Permalink
More algolia improvements (robusta-dev#1096)
Browse files Browse the repository at this point in the history
* Increase the font for algolia results

* Trim ¶ sign from search results

* Increase search CSS size
  • Loading branch information
LeaveMyYard authored and pavangudiwada committed Nov 6, 2023
1 parent 69b89b7 commit 4228417
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 8 deletions.
12 changes: 12 additions & 0 deletions docs/_static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -283,4 +283,16 @@ h2, h3 {

.sd-tab-set>label {
font-size: 16px;
}

.DocSearch-Hit-source {
font-size: 1.25em !important;
}

.DocSearch-Hit-title {
font-size: 1.10em !important;
}

.DocSearch-Hit-path {
font-size: 1em !important;
}
20 changes: 12 additions & 8 deletions docs/crawler.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@ new Crawler({
indexName: "robusta",
pathsToMatch: ["https://docs.robusta.dev/master/**"],
recordExtractor: ({ helpers, url }) => {
return helpers.docsearch(
url.pathname.includes("/triggers/")
? {
recordProps: url.pathname.includes("/triggers/")
? {
return helpers
.docsearch({
recordProps: url.pathname.includes("/triggers/")
? {
lvl0: {
selectors: [],
defaultValue: "Triggers",
Expand All @@ -27,7 +26,9 @@ new Crawler({
lvl2: ["details summary"],
content: ["details *:not(summary)"],
pageRank: 9,
} : url.pathname.includes("/actions/") ? {
}
: url.pathname.includes("/actions/")
? {
lvl0: {
selectors: [],
defaultValue: "Actions",
Expand All @@ -36,7 +37,9 @@ new Crawler({
lvl2: [".admonition .admonition-title"],
content: [".admonition *:not(.admonition-title)"],
pageRank: 8,
} : url.pathname.includes("/sinks/") ? {
}
: url.pathname.includes("/sinks/")
? {
lvl0: {
selectors: [],
defaultValue: "Sinks",
Expand All @@ -48,7 +51,8 @@ new Crawler({
lvl5: ["article h5", "h5"],
content: ["article p, article li, article code"],
pageRank: 7,
} : {
}
: {
lvl0: {
selectors: ["article h1", "head > title"],
defaultValue: "Documentation",
Expand Down

0 comments on commit 4228417

Please sign in to comment.