Skip to content

Commit

Permalink
Scroll to url anchor when present on docs and recipes pages
Browse files Browse the repository at this point in the history
Correct incorrect docs links from the recipes page

Use scroll code from js file

Eagerly load images
  • Loading branch information
Westwooo committed Sep 27, 2024
1 parent f80f284 commit 233b4b6
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 6 deletions.
3 changes: 2 additions & 1 deletion docs/couchbase.css
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ script{
html{
font-family:sans-serif;
-ms-text-size-adjust:100%;
-webkit-text-size-adjust:100%
-webkit-text-size-adjust:100%;
scroll-padding-top: 4rem;
}
a{
background:transparent
Expand Down
5 changes: 5 additions & 0 deletions docs/index.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
= Couchbase Shell Documentation =
(c) Copyright 2024, All Rights Reserved

++++
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<script src="../js/scroll.js"></script>
++++

:sectnums:
:toclevels: 3

Expand Down
8 changes: 7 additions & 1 deletion docs/intro.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,13 @@ With our data in the correct format we can then upsert:

This results in the following doc being stored in the Cluster:

image::example_doc.png[Example,500,1000,align="center"]
++++
<div class="imageblock text-center">
<div class="content">
<img src="example_doc.png" alt="Example" width="500" height="1000" loading="eager">
</div>
</div>
++++

See the <<_importing_data,Importing data recipes>> for more examples.

Expand Down
8 changes: 7 additions & 1 deletion docs/quickstart.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,13 @@ This is because our binaries are not yet signed.
To run it nonetheless you need to either navigate to `System Preferences -> Security & Privacy` and click `Allow Anyway`, or run `sudo xattr -r -d com.apple.quarantine $PWD/cbsh` inside your terminal.
Next time you run the binary you'll get another prompt but then it should run fine.

image::mac-binary-unsigned.png[macOS Warning,600]
++++
<div class="imageblock">
<div class="content">
<img src="mac-binary-unsigned.png" alt="macOS Warning" width="600" loading="eager">
</div>
</div>
++++

==== Homebrew

Expand Down
5 changes: 5 additions & 0 deletions docs/recipes.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
= Recipes

++++
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<script src="../../js/scroll.js"></script>
++++

:sectnums:

Welcome to the recipes section of the Couchbase Shell `cbsh` documentation.
Expand Down
2 changes: 1 addition & 1 deletion docs/recipes/managing_multiple_clusters.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Say we have the following four clusters registered with CBShell:
```
There is one self-managed cluster (localdev) and three Capella clusters.
Imagine that we want to perform some general health checks on this set of clusters, a good starting point is the https://couchbase.sh/docs/#_listing_nodes[nodes] command with the https://couchbase.sh/docs/#_working_with_clusters[clusters] flag.
Imagine that we want to perform some general health checks on this set of clusters, a good starting point is the https://couchbase.sh/docs/#_nodes[nodes] command with the https://couchbase.sh/docs/#_the_clusters_flag[--clusters] flag.
[options="nowrap"]
```
Expand Down
2 changes: 1 addition & 1 deletion docs/recipes/similarity_search.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
== Similarity Search

The https://couchbase.sh/docs/#_vector_commands[vector commands] can be used to enrich your existing data and allow you to experiment with the value that similarity search can add.
The https://couchbase.sh/docs/#_vector[vector commands] can be used to enrich your existing data and allow you to experiment with the value that similarity search can add.
Before you can follow this recipe you'll need to https://couchbase.sh/docs/#_cb_env_llm[configure a llm] for use with the shell.
Next you'll need a set of data, for this example we'll be using the travel-sample data set that you can load with:
Expand Down
2 changes: 1 addition & 1 deletion docs/recipes/simple_rag.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
== Simple RAG

Couchbase Shell's https://couchbase.sh/docs/#_vector_commands[vector commands] along with https://couchbase.sh/docs/#_ask[ask] can be used to implement simple Retrieval Augmented Generation, more commonly know as RAG.
Couchbase Shell's https://couchbase.sh/docs/#_vector[vector commands] along with https://couchbase.sh/docs/#_ask[ask] can be used to implement simple Retrieval Augmented Generation, more commonly know as RAG.
In this process similarity search is used over chunks of a larger body of text to contextualize questions sent to a Large Language model to improve the answers given.
For this demo we will use a text version of the Couchbase Shell docs as the source text for our chunks of data we have this stored locally as a text file.
Expand Down

0 comments on commit 233b4b6

Please sign in to comment.