Skip to content

Commit

Permalink
fix: updates index and search structure
Browse files Browse the repository at this point in the history
  • Loading branch information
tnolet committed Jan 14, 2025
1 parent 75d24c3 commit f0abe70
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 13 deletions.
2 changes: 1 addition & 1 deletion algolia/config-docs.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"index_name": "checkly_docs",
"start_urls": ["https://www.checklyhq.com/docs"],
"sitemap_urls": ["https://docs.checklyhq.com/sitemap.xml"],
"sitemap_urls": ["https://www.checklyhq.com/docs-sitemap.xml"],
"selectors": {
"lvl0": {
"selector": ".DocSearch-lvl1",
Expand Down
15 changes: 10 additions & 5 deletions algolia/config-learn.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
{
"index_name": "checkly_docs_learning",
"index_name": "checkly_learn",
"start_urls": ["https://www.checklyhq.com/learn/"],
"stop_urls": [
".*(?<!/)$"
],
"selectors": {
"lvl0": ".learn-page article h1",
"lvl1": ".learn-page article h2",
"lvl2": ".learn-page article h3",
"text": ".learn-page article p,.learn-page article ul,.learn-page article ol"
"lvl0": {
"selector": ".DocSearch-lvl1",
"global": true,
"default_value": "Learn"
},
"lvl1": ".learn-page article h1",
"lvl2": ".learn-page article h2",
"lvl3": ".learn-page article h3",
"text": ".DocSearch-content p, .DocSearch-content li, .DocSearch-content .alert"
}
}
2 changes: 1 addition & 1 deletion site/layouts/learn/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="d-flex container-fluid learn">
{{- partial "learn-menu" . -}}
<div class="learn-page">
<article class="markdown">
<article class="markdown DocSearch-content">

{{ partial "learn-breadcrumb" .}}

Expand Down
8 changes: 4 additions & 4 deletions site/layouts/partials/learn-breadcrumb.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@
{{ if ne $element "learn" }}
{{ if eq $index 2 }}
{{ if eq $element "playwright" }}
<a href="/learn/playwright/">Playwright Automation Guide</a>
<a href="/learn/playwright/" class="DocSearch-lvl1">Playwright Automation Guide</a>
{{ end }}
{{ if eq $element "opentelemetry" }}
<a href="/learn/opentelemetry/">Open Telemetry Guide</a>
<a href="/learn/opentelemetry/" class="DocSearch-lvl1">Open Telemetry Guide</a>
{{ end }}
{{ if eq $element "kubernetes" }}
<a href="/learn/kubernetes/">Kubernetes Monitoring Guide</a>
<a href="/learn/kubernetes/" class="DocSearch-lvl1">Kubernetes Monitoring Guide</a>
{{ end }}
{{ if eq $element "monitoring" }}
<a href="/learn/monitoring/">Monitoring Guide</a>
<a href="/learn/monitoring/" class="DocSearch-lvl1">Monitoring Guide</a>
{{ end }}
{{ else }}
<span>/</span>
Expand Down
3 changes: 1 addition & 2 deletions src/js/learn.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,5 @@ window.docsearch({
apiKey: 'b2b616fdea14b860ff00c72fa72bf267',
indexName: 'checkly_learn',
appId: 'LCMJSZN73Z',
container: '#docsearch',
debug: true
container: '#docsearch'
})

0 comments on commit f0abe70

Please sign in to comment.