Skip to content

Commit

Permalink
docs: bump docusaurus to v3. (kysely-org#1050)
Browse files Browse the repository at this point in the history
  • Loading branch information
igalklebanov authored and thecodrr committed Sep 3, 2024
1 parent 7fccd88 commit 4df7097
Show file tree
Hide file tree
Showing 98 changed files with 15,060 additions and 12,241 deletions.
12 changes: 6 additions & 6 deletions scripts/generate-site-examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ function writeSiteExample(state) {
<div style={{ marginBottom: '1em' }}>
<Playground code={${codeVariable}} setupCode={exampleSetup} />
</div>
`)
`),
)

const moreExamples = buildMoreExamplesMarkdown(category)
Expand All @@ -208,7 +208,7 @@ function buildMoreExamplesMarkdown(category) {
}

const lines = [
':::info More examples',
':::info[More examples]',
'The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/),',
'but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always',
'just one hover away!',
Expand All @@ -220,7 +220,7 @@ function buildMoreExamplesMarkdown(category) {
lines.push(` - [${linkName}](${links[linkName]})`)
}

lines.push(':::')
lines.push(':::\n')

return lines.join('\n')
}
Expand All @@ -238,7 +238,7 @@ function addCodeLine(state) {

if (!code) {
console.error(
`found invalid code block in a site example in ${state.filePath}:${state.lineIndex}`
`found invalid code block in a site example in ${state.filePath}:${state.lineIndex}`,
)

process.exit(1)
Expand All @@ -260,7 +260,7 @@ function addCommentLine(state) {

if (!comment) {
console.error(
`found invalid comment in a site example in ${state.filePath}:${state.lineIndex}`
`found invalid comment in a site example in ${state.filePath}:${state.lineIndex}`,
)

process.exit(1)
Expand All @@ -278,7 +278,7 @@ function enterExample(state) {

if (!state.annotation) {
console.error(
`found invalid site example annotation in ${state.filePath}:${state.lineIndex}`
`found invalid site example annotation in ${state.filePath}:${state.lineIndex}`,
)

process.exit(1)
Expand Down
8 changes: 0 additions & 8 deletions site/docs/examples/DELETE/_category_.json

This file was deleted.

8 changes: 0 additions & 8 deletions site/docs/examples/INSERT/_category_.json

This file was deleted.

8 changes: 0 additions & 8 deletions site/docs/examples/JOIN/_category_.json

This file was deleted.

8 changes: 0 additions & 8 deletions site/docs/examples/SELECT/_category_.json

This file was deleted.

8 changes: 0 additions & 8 deletions site/docs/examples/UPDATE/_category_.json

This file was deleted.

2 changes: 1 addition & 1 deletion site/docs/examples/cte/_category_.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"position": 7,
"link": {
"type": "generated-index",
"description": "Short and simple examples of how to use common table expressions (CTE) in queries."
"description": "Short and simple examples of how to use Common Table Expressions (CTE) in queries."
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ import {
<Playground code={singleRow} setupCode={exampleSetup} />
</div>

:::info More examples
:::info[More examples]
The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/),
but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always
just one hover away!

For example, check out these sections:
- [deleteFrom method](https://kysely-org.github.io/kysely-apidoc/classes/Kysely.html#deleteFrom)
- [returning method](https://kysely-org.github.io/kysely-apidoc/classes/DeleteQueryBuilder.html#returning)
:::
:::
8 changes: 8 additions & 0 deletions site/docs/examples/delete/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"label": "DELETE",
"position": 6,
"link": {
"type": "generated-index",
"description": "Short and simple examples of how to write DELETE queries."
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
<Playground code={singleRow} setupCode={exampleSetup} />
</div>

:::info More examples
:::info[More examples]
The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/),
but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always
just one hover away!
Expand All @@ -29,4 +29,4 @@ For example, check out these sections:
- [onConflict method](https://kysely-org.github.io/kysely-apidoc/classes/InsertQueryBuilder.html#onConflict)
- [returning method](https://kysely-org.github.io/kysely-apidoc/classes/InsertQueryBuilder.html#returning)
- [insertInto method](https://kysely-org.github.io/kysely-apidoc/classes/Kysely.html#insertInto)
:::
:::
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
<Playground code={multipleRows} setupCode={exampleSetup} />
</div>

:::info More examples
:::info[More examples]
The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/),
but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always
just one hover away!
Expand All @@ -32,4 +32,4 @@ For example, check out these sections:
- [onConflict method](https://kysely-org.github.io/kysely-apidoc/classes/InsertQueryBuilder.html#onConflict)
- [returning method](https://kysely-org.github.io/kysely-apidoc/classes/InsertQueryBuilder.html#returning)
- [insertInto method](https://kysely-org.github.io/kysely-apidoc/classes/Kysely.html#insertInto)
:::
:::
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
<Playground code={returningData} setupCode={exampleSetup} />
</div>

:::info More examples
:::info[More examples]
The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/),
but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always
just one hover away!
Expand All @@ -32,4 +32,4 @@ For example, check out these sections:
- [onConflict method](https://kysely-org.github.io/kysely-apidoc/classes/InsertQueryBuilder.html#onConflict)
- [returning method](https://kysely-org.github.io/kysely-apidoc/classes/InsertQueryBuilder.html#returning)
- [insertInto method](https://kysely-org.github.io/kysely-apidoc/classes/Kysely.html#insertInto)
:::
:::
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
<Playground code={complexValues} setupCode={exampleSetup} />
</div>

:::info More examples
:::info[More examples]
The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/),
but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always
just one hover away!
Expand All @@ -31,4 +31,4 @@ For example, check out these sections:
- [onConflict method](https://kysely-org.github.io/kysely-apidoc/classes/InsertQueryBuilder.html#onConflict)
- [returning method](https://kysely-org.github.io/kysely-apidoc/classes/InsertQueryBuilder.html#returning)
- [insertInto method](https://kysely-org.github.io/kysely-apidoc/classes/Kysely.html#insertInto)
:::
:::
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
<Playground code={insertSubquery} setupCode={exampleSetup} />
</div>

:::info More examples
:::info[More examples]
The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/),
but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always
just one hover away!
Expand All @@ -31,4 +31,4 @@ For example, check out these sections:
- [onConflict method](https://kysely-org.github.io/kysely-apidoc/classes/InsertQueryBuilder.html#onConflict)
- [returning method](https://kysely-org.github.io/kysely-apidoc/classes/InsertQueryBuilder.html#returning)
- [insertInto method](https://kysely-org.github.io/kysely-apidoc/classes/Kysely.html#insertInto)
:::
:::
8 changes: 8 additions & 0 deletions site/docs/examples/insert/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"label": "INSERT",
"position": 4,
"link": {
"type": "generated-index",
"description": "Short and simple examples of how to write INSERT queries."
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
<Playground code={simpleInnerJoin} setupCode={exampleSetup} />
</div>

:::info More examples
:::info[More examples]
The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/),
but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always
just one hover away!
Expand All @@ -29,4 +29,4 @@ For example, check out these sections:
- [leftJoin method](https://kysely-org.github.io/kysely-apidoc/interfaces/SelectQueryBuilder.html#leftJoin)
- [rightJoin method](https://kysely-org.github.io/kysely-apidoc/interfaces/SelectQueryBuilder.html#rightJoin)
- [fullJoin method](https://kysely-org.github.io/kysely-apidoc/interfaces/SelectQueryBuilder.html#fullJoin)
:::
:::
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
<Playground code={aliasedInnerJoin} setupCode={exampleSetup} />
</div>

:::info More examples
:::info[More examples]
The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/),
but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always
just one hover away!
Expand All @@ -29,4 +29,4 @@ For example, check out these sections:
- [leftJoin method](https://kysely-org.github.io/kysely-apidoc/interfaces/SelectQueryBuilder.html#leftJoin)
- [rightJoin method](https://kysely-org.github.io/kysely-apidoc/interfaces/SelectQueryBuilder.html#rightJoin)
- [fullJoin method](https://kysely-org.github.io/kysely-apidoc/interfaces/SelectQueryBuilder.html#fullJoin)
:::
:::
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {
<Playground code={complexJoin} setupCode={exampleSetup} />
</div>

:::info More examples
:::info[More examples]
The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/),
but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always
just one hover away!
Expand All @@ -37,4 +37,4 @@ For example, check out these sections:
- [leftJoin method](https://kysely-org.github.io/kysely-apidoc/interfaces/SelectQueryBuilder.html#leftJoin)
- [rightJoin method](https://kysely-org.github.io/kysely-apidoc/interfaces/SelectQueryBuilder.html#rightJoin)
- [fullJoin method](https://kysely-org.github.io/kysely-apidoc/interfaces/SelectQueryBuilder.html#fullJoin)
:::
:::
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
<Playground code={subqueryJoin} setupCode={exampleSetup} />
</div>

:::info More examples
:::info[More examples]
The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/),
but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always
just one hover away!
Expand All @@ -29,4 +29,4 @@ For example, check out these sections:
- [leftJoin method](https://kysely-org.github.io/kysely-apidoc/interfaces/SelectQueryBuilder.html#leftJoin)
- [rightJoin method](https://kysely-org.github.io/kysely-apidoc/interfaces/SelectQueryBuilder.html#rightJoin)
- [fullJoin method](https://kysely-org.github.io/kysely-apidoc/interfaces/SelectQueryBuilder.html#fullJoin)
:::
:::
8 changes: 8 additions & 0 deletions site/docs/examples/join/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"label": "JOIN",
"position": 3,
"link": {
"type": "generated-index",
"description": "Examples of queries that use JOINs."
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
<Playground code={aSingleColumn} setupCode={exampleSetup} />
</div>

:::info More examples
:::info[More examples]
The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/),
but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always
just one hover away!
Expand All @@ -28,4 +28,4 @@ For example, check out these sections:
- [select method](https://kysely-org.github.io/kysely-apidoc/interfaces/SelectQueryBuilder.html#select)
- [selectAll method](https://kysely-org.github.io/kysely-apidoc/interfaces/SelectQueryBuilder.html#selectAll)
- [selectFrom method](https://kysely-org.github.io/kysely-apidoc/classes/Kysely.html#selectFrom)
:::
:::
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
<Playground code={columnWithATable} setupCode={exampleSetup} />
</div>

:::info More examples
:::info[More examples]
The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/),
but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always
just one hover away!
Expand All @@ -28,4 +28,4 @@ For example, check out these sections:
- [select method](https://kysely-org.github.io/kysely-apidoc/interfaces/SelectQueryBuilder.html#select)
- [selectAll method](https://kysely-org.github.io/kysely-apidoc/interfaces/SelectQueryBuilder.html#selectAll)
- [selectFrom method](https://kysely-org.github.io/kysely-apidoc/classes/Kysely.html#selectFrom)
:::
:::
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
<Playground code={multipleColumns} setupCode={exampleSetup} />
</div>

:::info More examples
:::info[More examples]
The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/),
but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always
just one hover away!
Expand All @@ -28,4 +28,4 @@ For example, check out these sections:
- [select method](https://kysely-org.github.io/kysely-apidoc/interfaces/SelectQueryBuilder.html#select)
- [selectAll method](https://kysely-org.github.io/kysely-apidoc/interfaces/SelectQueryBuilder.html#selectAll)
- [selectFrom method](https://kysely-org.github.io/kysely-apidoc/classes/Kysely.html#selectFrom)
:::
:::
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
<Playground code={aliases} setupCode={exampleSetup} />
</div>

:::info More examples
:::info[More examples]
The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/),
but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always
just one hover away!
Expand All @@ -28,4 +28,4 @@ For example, check out these sections:
- [select method](https://kysely-org.github.io/kysely-apidoc/interfaces/SelectQueryBuilder.html#select)
- [selectAll method](https://kysely-org.github.io/kysely-apidoc/interfaces/SelectQueryBuilder.html#selectAll)
- [selectFrom method](https://kysely-org.github.io/kysely-apidoc/classes/Kysely.html#selectFrom)
:::
:::
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
<Playground code={complexSelections} setupCode={exampleSetup} />
</div>

:::info More examples
:::info[More examples]
The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/),
but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always
just one hover away!
Expand All @@ -29,4 +29,4 @@ For example, check out these sections:
- [select method](https://kysely-org.github.io/kysely-apidoc/interfaces/SelectQueryBuilder.html#select)
- [selectAll method](https://kysely-org.github.io/kysely-apidoc/interfaces/SelectQueryBuilder.html#selectAll)
- [selectFrom method](https://kysely-org.github.io/kysely-apidoc/classes/Kysely.html#selectFrom)
:::
:::
File renamed without changes.
Loading

0 comments on commit 4df7097

Please sign in to comment.