Skip to content

Commit 6d78ea4

Browse files
committed
prettified code blocks
1 parent dd6ed60 commit 6d78ea4

10 files changed

Lines changed: 383 additions & 228 deletions

‎cli-reference.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,20 +207,20 @@ It is possible to generate default or empty plots via the CLI.
207207

208208
### Create empty plots
209209
To create an empty plot, specify the plot name (`-f`) and the visualization library (`-t`). The location of the plot menu (`-m`) and the item name in the plot menu (`-n`) are optional. For example, an empty plot named `barchart` using the `plotly` library, shown in the top menu bar, can be generated by running the following command in the `single-page-app` folder:
210-
```
210+
```bash
211211
zendro create-plot -f barchart -t plotly -m top
212212
```
213213
You can then customize the data processing in `single-page-app/src/pages/barchart.tsx`. In the `fetchData` function, pass the required query as an argument to `zendro.request`, process the response `res` into the desired format, and set it as the `data` variable. Pass `data` as a parameter of the `<PlotlyPlot/>` component. The layout and other plot parameters can be set in `single-page-app/src/zendro/plots/barchart.tsx`.
214214

215215
Similarly, to generate a plot named `circle` using the `d3` library in the left menu, run the following in the `single-page-app` folder:
216-
```
216+
```bash
217217
zendro create-plot -f circle -t d3 -m left
218218
```
219219
The processed `data` can be passed as a parameter to the `<D3Plot/>` component in `single-page-app/src/pages/circle.tsx`, and the plot can be customized in the corresponding `single-page-app/src/zendro/plots/circle.tsx` file.
220220

221221
### Generate default plots
222222
Running the following command in the `single-page-app` folder generates three default plots:
223-
```
223+
```bash
224224
zendro create-plot -p
225225
```
226226
1. **scatter-plot** — only numerical attributes can be selected. The attribute for the Y-axis must be specified; if no X-axis attribute is selected, the Y-axis values are used to generate the plot. Different modes can be selected: `lines`, `markers`, `lines+markers`.

‎contributing-to-docs.md‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Every push to `main` triggers a GitHub Actions build (see `.github/workflows/pag
2828

2929
Each section of the site lives in its own folder (`getting-started/`, `data-models/`, `guides/`, `authentication/`, `api/`), with an `index.md` as that section's landing page. To add a new page to an existing section, add a new `.md` file to that folder with a front matter block like this:
3030

31-
```
31+
```md
3232
---
3333
layout: default
3434
title: My new page
@@ -65,7 +65,7 @@ For images and other static assets, use a site-root-relative path (e.g. `/figure
6565

6666
To show a per-page table of contents, add this where you want it to appear (usually right after the page title):
6767

68-
```
68+
```md
6969
## Table of contents
7070
{: .no_toc .text-delta }
7171

@@ -75,21 +75,25 @@ To show a per-page table of contents, add this where you want it to appear (usua
7575

7676
## Adding codeblocks
7777

78-
Code blocks get syntax highlighting. The default highlighting is plaintext, which highlights as console-like (black background, white foreground) block. This should only used for things that might appear in a terminal (outputs, commands). Please ***don't*** add a prepending `$` to code block lines. They make copy-pasting the code very annoying.
78+
Code blocks get syntax highlighting. The default highlighting is plaintext, which highlights as console-like (black background, white foreground) block. This should only used for things that might appear as terminal output For commands use `bash`. Please ***don't*** add a prepending `$` to code block lines. They make copy-pasting the code very annoying.
7979

8080
For other syntax look [here](https://rouge-ruby.github.io/docs/file.Languages.html) for a suiting language, as the actual might not suit the needs, like `jsom` with comments works better with `js` syntax, or `graphql` with `python`
8181

82-
~~~
82+
~~~md
8383
```python
8484
query {
8585
...DoSomething
8686
}
8787
```
88+
89+
```bash
90+
zendro start
91+
```
8892
~~~
8993

9094
## Building and previewing locally
9195

92-
```
96+
```bash
9397
bundle install
9498
bundle exec jekyll serve
9599
```

0 commit comments

Comments
 (0)