-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
108 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,81 +1,134 @@ | ||
[![Netlify Status](https://api.netlify.com/api/v1/badges/8bf4638d-8f79-4cc4-9970-b47359eb1a35/deploy-status)](https://app.netlify.com/sites/unruffled-blackwell-31bfb2/deploys) | ||
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com) | ||
[![Code Style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier) | ||
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-green.svg)](https://conventionalcommits.org) | ||
|
||
# questdb.io | ||
# QuestDB Documentation | ||
|
||
Uses [Docusaurus](https://docusaurus.io/). | ||
|
||
Pages & components are written in | ||
TypeScript, the styles in vanilla CSS with variables using | ||
[CSS Modules](https://github.com/css-modules/css-modules). | ||
## Quick start | ||
|
||
First, clone & enter the repo directory: | ||
|
||
```shell | ||
git clone [email protected]:questdb/documentation.git | ||
cd documentation | ||
``` | ||
|
||
## Installation | ||
Next, install dependencies: | ||
|
||
```script | ||
yarn | ||
``` | ||
|
||
Note. On Linux you may have to install `autoconf` package to have a successful | ||
installation. On Ubuntu it should be enough to run | ||
`sudo apt-get install autoconf` command to install the package. | ||
```script | ||
yarn start | ||
``` | ||
|
||
This command starts a local development server and open up a browser window. | ||
|
||
Most changes are reflected live without having to restart the server. | ||
|
||
## Documentation submodule | ||
## Contributing | ||
|
||
Documentation is [hosted in a public repo](https://github.com/questdb/documentation/). | ||
You'll need to sign a quick CLA. | ||
|
||
It is pulled in via a submodule. | ||
Pretty standard, [check it out](https://cla-assistant.io/questdb/documentation). | ||
|
||
If writing documentation, clone the repo, enter the submodule, then: | ||
This is done on PR creation. | ||
|
||
```shell | ||
git submodule init | ||
git submodule update --remote --merge | ||
``` | ||
### Creating PRs | ||
|
||
This will get you up-to-date! | ||
First create a new branch. | ||
|
||
Changes made within this documentation submodule are committed to the public repo. | ||
Locally, ensure your changes look good. | ||
|
||
Recommended flow is then: | ||
Then push your branch to GitHub and create a PR. | ||
|
||
1. Enter the submodule & update it as per the above command. | ||
2. Create a new branch within it | ||
3. Make your changes, commit to that branch | ||
4. Create PR for that branch in documentation repo | ||
5. Confirm PR preview is OK when ready | ||
6. Get approval & merge :tada: | ||
We'll review the PR and generate a preview build. | ||
|
||
Prod deploys & PR previews will update from `main` automatically. | ||
A QuestDB member must add the `preview` label to your PR to deploy a preview build. | ||
|
||
## Local development | ||
Once it looks good, we'll merge! | ||
|
||
```script | ||
yarn start | ||
### Enhancements, bugs, typos | ||
|
||
We'd love your help! | ||
|
||
Raise a [GH issue](https://github.com/questdb/documentation/issues/new/choose) or tackle a PR. | ||
|
||
## Syntax | ||
|
||
### Math Expressions | ||
|
||
Use LaTeX-style math between `$` for inline or `$$` for block equations: | ||
|
||
``` | ||
$$ | ||
text | ||
Inline equation: $f(x) = x^2$ | ||
Block equation: | ||
$$ | ||
\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi} | ||
$$ | ||
``` | ||
|
||
This command starts a local development server and open up a browser window. | ||
Most changes are reflected live without having to restart the server. | ||
### Mermaid Diagrams | ||
|
||
## Build for production | ||
Create diagrams using Mermaid syntax in code blocks: | ||
|
||
```script | ||
yarn build | ||
```mermaid | ||
graph TD | ||
A[Start] --> B{Is it?} | ||
B -- Yes --> C[OK] | ||
C --> D[Rethink] | ||
D --> B | ||
B -- No --> E[End] | ||
``` | ||
|
||
This command generates static content into the `build` directory and can be | ||
served using any static contents hosting service. For that purpose, | ||
use: | ||
### Syntax | ||
|
||
```script | ||
yarn serve | ||
Syntax highlighting for many languages, including QuestDB SQL: | ||
|
||
```questdb-sql | ||
questdb-sql | ||
SELECT | ||
FROM trades | ||
WHERE timestamp > dateadd('d', -1, now()) | ||
SAMPLE BY 1h; | ||
``` | ||
|
||
## Bugs and features | ||
### Admonitions | ||
|
||
Use special callouts for important information: | ||
|
||
``` | ||
:::note | ||
This is a note | ||
::: | ||
:::tip | ||
This is a tip | ||
::: | ||
:::info | ||
This is info | ||
::: | ||
:::warning | ||
This is a warning | ||
::: | ||
:::danger | ||
This is a danger warning | ||
::: | ||
``` | ||
|
||
### Components | ||
|
||
Special React components available: | ||
|
||
- `<RemoteRepoExample />`: Include code examples from other QuestDB repos | ||
- `<TabItem />`: Create tabbed content sections | ||
- `<Tabs />`: Container for tab items | ||
|
||
Raise a [GH issue](https://github.com/questdb/questdb.io/issues/new/choose) for | ||
bug report, update request, or tutorial proposal using the respective template. | ||
See examples in the documentation source files. | ||
|
||
## Linting | ||
|
||
|