Skip to content

Commit 68f2e8e

Browse files
committed
Fix formatting on :::tip blocks
1 parent bc2eed5 commit 68f2e8e

7 files changed

Lines changed: 26 additions & 26 deletions

File tree

docusaurus/docs/advanced/how-ottoman-works.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Using the default `keyGenerator` function that Ottoman provides and assuming you
2525

2626
- `User::0477024c`
2727

28-
::: tip Notice
28+
:::tip Notice
2929
This resulted key is a combination of the prefix as provided by the default `keyGenerator` function (`${metadata.modelName}`) [appended with an ID](/docs/basic/model.html#model-id) (`0477024c`).
3030
:::
3131

@@ -61,7 +61,7 @@ Let see how Ottoman handles a new document creation.
6161

6262
![How to Use](./create.png)
6363

64-
::: tip Notice
64+
:::tip Notice
6565
Using Ottoman you only need to think about `id` in order to execute CRUD Operations over documents.
6666
All the `key` management will be automatically handled by Ottoman.
6767
:::

docusaurus/docs/advanced/ottoman-couchbase.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ If you are familiar with Mongoose, an ODM for MongoDB, you will feel pretty comf
2121
In Ottoman, we have many constructs to help define schema and models at the application level. Let’s go over some of the most important terms you need to know in Ottoman.
2222

2323

24-
::: tip Couchbase document example:
24+
:::tip Couchbase document example:
2525
```json
2626
{
2727
"id": 10,
@@ -87,7 +87,7 @@ Can use the IDE that is best to your liking and open the created directory `intr
8787

8888
We will start working out of the file `./createAirline.js` under the project root and add the following (based on the default configuration):
8989

90-
::: tip Connecting to Couchbase in Ottoman
90+
:::tip Connecting to Couchbase in Ottoman
9191
```js
9292
const { Ottoman, model, Schema } = require('ottoman')
9393

@@ -118,7 +118,7 @@ Creating an Ottoman `model` comprises a few things:
118118

119119
A `schema` defines `document` properties through an object where the key name corresponds to the property name in the `collection`.
120120

121-
::: tip Create an Airline Schema
121+
:::tip Create an Airline Schema
122122
```js
123123
const airlineSchema = new Schema({
124124
callsign: String,
@@ -146,7 +146,7 @@ The following Schema Types are permitted:
146146

147147
We need to call the `model` constructor on the `ottoman` instance and pass it the name of the `collection` and a reference to the `schema` definition.
148148

149-
::: tip Create Airline Model
149+
:::tip Create Airline Model
150150
```js
151151
const Airline = ottoman.model('Airline', airlineSchema)
152152
```
@@ -156,7 +156,7 @@ When you call the [`model()`](/docs/api/classes/ottoman.html#model) function it
156156

157157
Let’s also give the `airlineSchema` a ***phone number*** property. We can add a validation function that will ensure that the value is a valid phone number. Replace the `airlineSchema` section with these three blocks of code:
158158

159-
::: tip Add Validator to Airline Schema
159+
:::tip Add Validator to Airline Schema
160160
```js
161161
const regx = /^(\([0-9]{3}\)|[0-9]{3}-)[0-9]{3}-[0-9]{4}$/
162162
if ( value && !value.match(regx) ) {
@@ -183,7 +183,7 @@ Validators registered with Ottoman (as we have done here with the `ottoman.addVa
183183

184184
There is however an easier way to validate any document properties value so long as the check you are performing uses a regular expression. The [ValidatorOption](/docs/api/interfaces/validatoroption.html#hierarchy') can take a regexp and message as an argument, so we can reduce our code down to:
185185

186-
::: tip Update Schema to use Validator
186+
:::tip Update Schema to use Validator
187187
```js
188188
const regx = /^(\([0-9]{3}\)|[0-9]{3}-)[0-9]{3}-[0-9]{4}$/
189189
const airlineSchema = new Schema({
@@ -205,7 +205,7 @@ Most of the basic operations are covered in our Ottoman V2 documentation, we wil
205205

206206
Considering the code that we already went over above that creates a `schema`, `model`, and `validators`. *Saving* a `model` and *persisting* it to the database is quite easy. Let’s create a new **Airline** `model` using our `Schema` and then *save/persist* it to the database.
207207

208-
::: tip Create Document & Save to Couchbase
208+
:::tip Create Document & Save to Couchbase
209209
```js
210210
// Constructing our document
211211
const cbAirlines = new Airline({
@@ -275,7 +275,7 @@ If we enter an invalid phone number and run node `createAirline.js` this file ag
275275
ValidationError: Phone Number 321-321-32xx is not valid
276276
```
277277

278-
::: tip Export Schema and Model
278+
:::tip Export Schema and Model
279279

280280
You can define your *connection*, *schema*, and *models* in separate files, export, and use them in other files. Create a new file named `airline-schema-model.js` and move our `schema` and `model` definition to it:
281281

@@ -300,7 +300,7 @@ exports.Airline = Airline;
300300

301301
Now we can create a few new files, `findAirline.js`, `updateAirline.js`, and `removeAirline.js` and populate each file with the following:
302302

303-
::: tip Boilerplate for Multiple Files
303+
:::tip Boilerplate for Multiple Files
304304
```js
305305
const { Ottoman } = require('ottoman')
306306
const ottoman = new Ottoman({ collectionName: '_default' });
@@ -326,7 +326,7 @@ This will help us to separate some of our code so we are not repeating it in eac
326326

327327
Let’s try to retrieve the record we saved to the database earlier. The [model class](/docs/api/classes/model.html) exposes several static and instance methods to perform operations on the database. We will now try to find the record that we created previously using the find method and pass the `callsign` as the search term. Let’s create a new file named `findAirline.js` and we can add the following code:
328328

329-
::: tip Find Airline Document by `callsign`
329+
:::tip Find Airline Document by `callsign`
330330
```js
331331
// Find the Couchbase Airline document by Callsign from Couchbase Server
332332
const findDocument = async () => {
@@ -367,7 +367,7 @@ Find document result:
367367

368368
Let’s modify the record above by finding it using the `callsign`, which we can assume that `callsign` will be a unique field in our data, then we can update the `document` all in a single operation.
369369

370-
::: tip Find Airline Document and Update
370+
:::tip Find Airline Document and Update
371371
```js
372372
// Update the Couchbase Airline document by Callsign from Couchbase Server
373373
const findDocumentAndUpdate = async () => {
@@ -416,7 +416,7 @@ _Model {
416416

417417
Ottoman has several methods that deal with removing documents: [remove](/docs/api/classes/document.html#remove), [removeById](/docs/api/interfaces/imodel.html#removebyid) and [removeMany](/docs/api/interfaces/imodel.html#removemany). Considering the many examples we have had so far, each of these should be very easy to understand how to use, so we will just provide a simple example here to show how to remove a `document` that we have already found using the [find](/docs/api/interfaces/imodel.html#find) method.
418418

419-
::: tip Remove Airline Document by ID
419+
:::tip Remove Airline Document by ID
420420
```js
421421
// Remove the Couchbase Airline document by ID from Couchbase Server
422422
const removeDocument = async () => {
@@ -452,7 +452,7 @@ Example of Middleware (a.k.a. [pre](/docs/basic/schema.html#register-hooks-with-
452452
453453
Let’s try an example by simply generating a log in the console before and after the creation (`save`) of a `document`, We are going to create a new file called `createWithHooks.js` and most of the code will look familiar except we have added `pre` and `post` hooks that will just report to us the document `name` ***pre-save*** and document `id` ***post-save***:
454454
455-
::: tip Create Document with Pre/Post Save Hooks
455+
:::tip Create Document with Pre/Post Save Hooks
456456
```js
457457
const { Ottoman } = require('ottoman')
458458
const ottoman = new Ottoman({ collectionName: '_default' });
@@ -547,7 +547,7 @@ In the next three examples, we will do the same thing using each of the three di
547547
548548
Let’s first create a new file named `findWithQueryBuilder.js`, and add the following code:
549549
550-
::: tip Find Airline Document with QueryBuilder
550+
:::tip Find Airline Document with QueryBuilder
551551
```js
552552
const { Ottoman, Query } = require('ottoman')
553553
const ottoman = new Ottoman({ collectionName: '_default' });
@@ -588,7 +588,7 @@ This file has a comment in the middle that says: ***“Replace with QueryBuilder
588588
589589
### Parameters
590590
591-
::: tip Demonstrate Query Builder using Parameters
591+
:::tip Demonstrate Query Builder using Parameters
592592
```js
593593
const generateQuery = async () => {
594594
try {
@@ -617,7 +617,7 @@ const generateQuery = async () => {
617617
618618
### Mixed Mode
619619
620-
::: tip Demonstrate Query Builder using Mixed Mode (Parameters & Access Functions)
620+
:::tip Demonstrate Query Builder using Mixed Mode (Parameters & Access Functions)
621621
```js
622622
const generateQuery = async () => {
623623
try {

docusaurus/docs/advanced/ottoman.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ const spaceX = await Company.findOne({name: 'Space X'});
129129
await spaceX._populate('*')
130130
```
131131

132-
::: tip
132+
:::tip
133133
The '_populate' function will receive 1 or many field names separate by a comma to know
134134
the field to populate or just use the `*` wildcard to populate all references in the document,
135135
as we showed in the above example. If you want just to populate the `ceo` field for example you
@@ -201,7 +201,7 @@ the result will be:
201201

202202
Congratulations! You retrieve the entire `Space X` data, from the nested Schemas `Company -> Person -> Address` design.
203203

204-
::: tip Rewriting `populateMaxDeep`
204+
:::tip Rewriting `populateMaxDeep`
205205
`populateMaxDeep` option is set to 1, as we can see in the previous example, but you can override it when creating the
206206
`Ottoman` instance.
207207

docusaurus/docs/basic/ottoman.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ const main = async () => {
247247
main();
248248
```
249249

250-
::: tip
250+
:::tip
251251
Notice we [start](/docs/api/classes/ottoman.html#start) using Ottoman without creating any instance, it's possible by using the `connect` function.
252252
`connect` function will create a default ottoman instance with default options if there's not an ottoman default instance created yet.
253253
:::
@@ -355,7 +355,7 @@ ottoman1.close();
355355
close();
356356
```
357357

358-
::: tip
358+
:::tip
359359
Always remember to close your connections.
360360
:::
361361

docusaurus/docs/basic/query-builder.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ WHERE (address IS NULL
246246
LIMIT 20
247247
```
248248

249-
::: tip Note
249+
:::tip Note
250250
Can also use `ignoreCase` as part of the `build` method, this will always prioritize the `$ignoreCase` value defined in clause
251251

252252
```ts

docusaurus/docs/intro.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ You should see results similar to the following:
6464
Nice Job!
6565
```
6666

67-
::: tip Note
67+
:::tip Note
6868
If you are using the legacy version of Ottoman, check out the [V1 docs](https://v1.ottomanjs.com/).
6969
:::
7070

@@ -103,7 +103,7 @@ Thank you to all the people who already contributed to Couchbase Ottoman!
103103

104104
1. [Install Couchbase Server Using Docker](https://docs.couchbase.com/server/current/install/getting-started-docker.html).
105105

106-
::: tip Note
106+
:::tip Tip
107107
Check results on [http://localhost:8091/](http://localhost:8091/) couchbase web client.
108108
:::
109109

docusaurus/docs/quick-start.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ node --version
3939
npm --version
4040
```
4141

42-
::: tip Note
42+
:::tip Note
4343
You can get to the Couchbase Server Web UI at any time by visiting [localhost:8091](http://localhost:8091/).
4444
:::
4545

0 commit comments

Comments
 (0)