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

Remove images from docs page
  • Loading branch information
Westwooo committed Sep 27, 2024
1 parent 9272147 commit 4c139d6
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 11 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
4 changes: 0 additions & 4 deletions docs/intro.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,6 @@ 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"]

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

=== Exporting Data from the Shell
Expand Down
2 changes: 0 additions & 2 deletions docs/quickstart.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ 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]

==== Homebrew

If running on macOS you can install via the https://formulae.brew.sh/formula/couchbase-shell[Homebrew] formula:
Expand Down
4 changes: 4 additions & 0 deletions docs/recipes.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
= Recipes

++++
<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/moving_data.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ The first step to doing this is to list all of the index definitions on the `loc
╰────┴───────────────┴───────────┴────────────┴───────────────────────────────────────┴────────┴──────────────┴──────────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴─────╯
```
Here we use https://couchbase.sh/docs/#_query_commands[query] with the definitions flag to fetch all of the query definitions on the active cluster.
Here we use https://couchbase.sh/docs/#_query[query] with the definitions flag to fetch all of the query definitions on the active cluster.
Then we have used `where` to filter out all of the primary indexes as these were already created when we created the buckets on the Capella cluster.
Now we can https://www.nushell.sh/commands/docs/select.html[select] the definition column and iterate over the definitions, using `query` to re-create the indexes on the `remote` cluster:
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 4c139d6

Please sign in to comment.