Skip to content

Latest commit

 

History

History
287 lines (159 loc) · 6.05 KB

_formatting_examples.md

File metadata and controls

287 lines (159 loc) · 6.05 KB

Formatting examples

This page illustrates and provides examples of the formatting available for Timescale documentation. Note that for most elements, spacing is important.

Procedure

Use for a logical sequence of steps to achieve a goal. For example, create a hypertable.

Procedure example

Syntax:

<Procedure>

1. **Step 1 summary in bold**

   Step 1 explanation in details.

   ```
   step 1 code
   ```

1. **Step 2 summary in bold**

   Step 2 explanation in details. 

   1. Sub-step 1.

     ```
     Sub-step 1 code
     ```

   1. Sub-step 2.

   1. Sub-step 3. 

</Procedure>

See a use example in the docs.

Highlight blocks

Use sparingly and only if it's essential to attract the reader's attention.

  • Note

    Note highlight

    Syntax:

    <Highlight type="note">
    
    Additional relevant information worth highlighting. 
    
    </Highlight>
    

    See a use example in the docs.

  • Important

    Important highlight

    Syntax:

    <Highlight type="important">
    
    Important things to keep in mind. 
    
    </Highlight>
    

    See a use example in the docs.

  • Warning

    Caution highlight

    Syntax:

    <Highlight type="warning">
    
    Caution!
    
    </Highlight>
    

    See a use example in the docs.

  • Deprecation

    Deprecated highlight

    Syntax:

    <Highlight type="deprecation">
    
    A deprecation notice.
    
    </Highlight>
    

    See a use example in the docs.

  • Cloud

    Cloud highlight

    Syntax:

    <Highlight type="cloud">
    
    A note dealing specifically with Timescale Cloud.
    
    </Highlight>
    

Tabs

Tabs

Syntax:

<Tabs label="Tabs label for accessibility">

<Tab title="First tab title">

First tab content

</Tab>

<Tab title="Second tab title">

Second tab content

</Tab>

</Tabs>

See a use example in the docs.

Code blocks

As a default, use fenced Markdown code blocks:

Regular code block

To remove line numbers and the copy button, use the CodeBlock component with canCopy and showLineNumbers set to false:

Custom code block

Syntax:

<CodeBlock canCopy={false} showLineNumbers={false} children={`
CREATE TABLE conditions (
       time          TIMESTAMPZ        NOT NULL,
       location      TEXT              NOT NULL,
       device        TEXT              NOT NULL,
       temperature   DOUBLE PRECISION  NULL,
       humidity      DOUBLE PRECISION  NULL
);
`} />

See a use example in the docs.

Multi-tab code blocks

Multi-tab code block

Syntax:

<Terminal>

<tab label='ruby'>
    
```ruby
ruby code
```
    
</tab>
    
<tab label="python">
    
```python
pyhon code
```
    
</tab>
    
<tab label="go">
    
```go
go code
```
    
</tab>
    
</Terminal>

Tags

  • Download

    Download tag

    Syntax:

    <Tag type="download">Markdown link to download</Tag>
    

    See a use example in the docs.

  • Experimental

    Experimental tag

    Syntax:

    <Tag type="experimental">Experimental</Tag>
    

    See a use example in the docs.

  • Toolkit

    Tooklit tag

    Syntax:

    <Tag type="toolkit">Toolkit</Tag>
    

    See a use example in the docs.

  • Community

    Community tag

    Syntax:

    <Tag type="community">Community</Tag>
    

    See a use example in the docs.

  • Hollow

    Hollow tag

    Syntax:

    <Tag variant="hollow">Text to display in a tag</Tag>
    

Partials

Import a partial from the _partials directory and then reference it in the relevant part of the page.

Syntax:

import PartialName from "versionContent/_partials/_partial.mdx";

<PartialName />

See a use example in the docs.

Links

Links should be reference-style Markdown links.

Syntax:

[Anchor][link-label]

[link-label]: absolute or relative URL

For example:

A link to the data tiering section in docs