Skip to content

Commit

Permalink
remove docs prefix from hit url
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Panagiotakos committed Mar 3, 2020
1 parent 36048dd commit 476edbc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ cockroachcloud: cockroachcloud-build

.PHONY: algolia
algolia: bootstrap
ALGOLIA_API_KEY=$(ALGOLIA_DOCS_STAGING) bundle exec jekyll algolia --config _config_base.yml --builds-config _config_cockroachdb.yml,_config_cockroachcloud.yml
ALGOLIA_API_KEY=59f9349e4f9559874b17a1b932e8fea7 bundle exec jekyll algolia --config _config_base.yml --builds-config _config_cockroachdb.yml,_config_cockroachcloud.yml

.PHONY: test
test:
Expand Down
4 changes: 2 additions & 2 deletions jekyll-algolia-dev/lib/jekyll/algolia/hooks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ def self.before_indexing_each(record, _node, context)
if context.config['cockroachcloud']
record[:doc_type] = 'cockroachcloud'
record[:url] = "https://www.cockroachlabs.com/docs/cockroachcloud#{record[:url]}"
record[:canonical] = "https://www.cockroachlabs.com/docs/cockroachcloud#{record[:url]}"
# record[:canonical] = "/cockroachcloud#{record[:url]}"
else
record[:url] = "https://www.cockroachlabs.com/docs/#{record[:url]}"
record[:url] = "https://www.cockroachlabs.com/docs#{record[:url]}"
record[:doc_type] = 'cockroachdb'
end
record
Expand Down
2 changes: 1 addition & 1 deletion search.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
hit =>
`<div class="search-item">
<div class="search-title">
<a href="/docs${hit.url}">${hit.title}</a>
<a href="${hit.url}">${hit.title}</a>
</div>
<div class="search-snippet">${hit._highlightResult.content.value}</div>
<div class="search-link">${hit.doc_type}</div>
Expand Down

0 comments on commit 476edbc

Please sign in to comment.