README.md 7.64 KB
Newer Older
bailuo's avatar
readme  
bailuo committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
## Introduction

This repository contains the documentation for Nixtla TimeGPT. It is the third iteration of the docs:

- First version was hosted in readme.com and still visible there for reference. https://timegpt.readme.io/ and in this same doc in the [migration to mintlify](#migration-from-readmeio-to-mintlify) section you can see some details about the migration.
- Second version has exactly this same content but it's in the same repo as the website, which isn't ideal for collaborators, currently visible at https://nixtla.io/docs/ and hosted in mintlify.
- This iteration will also be hosted in mintlify.

## Contributing

### Option 1: Using Mintlify Online Editor

The easiest and safest way to make changes to the documentation is using the [online mintlify editor](https://dashboard.mintlify.com/nixtla/nixtla-docs/editor/main).

The mintlify editor will send a PR in github so the team can review the changes and merge them. Same process as if you were contributing to the repo in any other way.

### Option 2: Using GitHub Codespaces

If you prefer to work locally, this repository is configured with GitHub Codespaces to easily view and develop documentation with Mintlify.

1. Click the "Code" button at the top of this repository
2. Select the "Codespaces" tab
3. Click "Create codespace on [branch]"
4. Once the Codespace is ready, open a terminal and run:

   ```bash
   mintlify dev
   ```
5. Click on the "Ports" tab and open port 3000 in your browser to view the documentation

For more information about the Codespace setup, see the `.devcontainer` directory.

Please be aware that linters and formatters fail most of the time because the docs follow a very specific structure that is not supported by the default linters. So please turn them off when working locally to prevent extra changes in your PRs like adding or removing spaces in the code.

## Release process

When a PR is merged to main branch, the docs are deployed to production automatically.

## Pending improvements and wishlist

### Technical

- Add support for .ipynb files, so that we can run the notebooks and output the results in the docs.
- Implement Nixtla branding on the docs.
- Organize the docs in subfolders.

### Content

- Rethink how we welcome non technical users into the docs, currently we start the into with "Welcome to TimeGPT - The foundational model for time series forecasting and anomaly detection" which sounds very overwhelming for a non technical user. It would be nice to add content for people who are just starting to work with time series forecasting and anomaly detection.
- ????

## Migration from Readme.io to Mintlify

#### HTML to Markdown Link Conversion

We've standardized the documentation by converting all HTML links (`<a href="URL">text</a>`) to Markdown format (`[text](URL)`). This makes the documentation more consistent and easier to maintain.

#### Conversion Script

The conversion was done using a Node.js script located at `/docs/utils/convert-links.js`. To run the script:

1. Install dependencies (if not already installed):

   ```bash
   npm install glob
   ```
2. Change to the docs directory:

   ```bash
   cd docs
   ```
3. Run the script:

   ```bash
   node utils/convert-links.js
   ```

For testing a single file without making changes:

```bash
node utils/convert-links.js --test path/to/file.mdx
```

For a dry run (simulate changes without writing to files):

```bash
node utils/convert-links.js --dry-run
```

### HTML to Markdown General Conversion

We've enhanced our documentation by converting various HTML elements to their Markdown equivalents for improved readability and maintainability. This comprehensive conversion captures elements beyond just links.

#### Conversion Script

The conversion was performed using a more advanced Node.js script at `/docs/utils/html-to-markdown.js`. This script:

1. Converts HTML formatting to Markdown equivalents
2. Preserves component structure and attributes
3. Makes the content more consistent with Markdown best practices

To run the script:

1. Change to the docs directory: `cd docs`
2. Run the script:

```bash
node utils/html-to-markdown.js
```

For testing a single file without making changes:

```bash
node utils/html-to-markdown.js --test path/to/file.mdx
```

For a dry run (simulate changes without writing to files):

```bash
node utils/html-to-markdown.js --dry-run
```

### Frame Component Image Standardization

We've standardized how images are used inside Frame components by ensuring all images use Markdown syntax (`![alt](url)`) rather than HTML `img` tags or the deprecated `src` attribute.

#### Frame Image Fix Script

The standardization was done using a Node.js script located at `/docs/utils/fix-frame-images.js`. This script fixes two issues:

1. Converts `<Frame src="URL" alt="ALT"></Frame>` to `<Frame>![ALT](URL)</Frame>`
2. Converts `<Frame><img src="URL" alt="ALT" /></Frame>` to `<Frame>![ALT](URL)</Frame>`

To run the script:

1. Change to the docs directory:

   ```
   cd docs
   ```
2. Run the script:

   ```
   node utils/fix-frame-images.js
   ```

For testing a single file without making changes:

```
node utils/fix-frame-images.js --test path/to/file.mdx
```

For a dry run (simulate changes without writing to files):

```
node utils/fix-frame-images.js --dry-run
```

### Card Title Standardization

We've standardized how titles are defined in Card components by ensuring they use the `title` prop rather than bold text (`**Text**`) inside the card body.

#### Card Title Check Script

To identify and fix cards with incorrectly defined titles, use the script at `/docs/utils/check-card-titles.js`. This script:

1. Identifies Card components where the title is defined using bold text instead of the `title` prop
2. Reports which files have this issue and shows what needs to be fixed
3. Can automatically fix the issues with the `--fix` flag

To run the script:

1. Change to the docs directory:

   ```
   cd docs
   ```
2. Check for issues without making changes:

   ```
   node utils/check-card-titles.js
   ```
3. Automatically fix issues:

   ```
   node utils/check-card-titles.js --fix
   ```

For testing a single file:

```
node utils/check-card-titles.js --test path/to/file.mdx
```

For a dry run (simulate fixes without making changes):

```
node utils/check-card-titles.js --fix --dry-run
```

### Table Conversion to Markdown

We've standardized how tables are presented in documentation by converting all `<Table>` components to native Markdown table syntax. This makes the documentation more consistent and easier to maintain.

#### Table Conversion Script

To convert tables from HTML to Markdown format, use the script at `/docs/utils/convert-tables.js`. This script:

1. Identifies `<Table>` components in MDX files
2. Converts them to Markdown table syntax (`| Header | Header |` format)
3. Preserves all table data while simplifying the format

To run the script:

1. Change to the docs directory:

   ```
   cd docs
   ```
2. Check for tables without making changes:

   ```
   node utils/convert-tables.js
   ```
3. Automatically convert all tables:

   ```
   node utils/convert-tables.js --fix
   ```

For testing a single file:

```
node utils/convert-tables.js --test path/to/file.mdx
```

For a dry run (simulate conversions without making changes):

```
node utils/convert-tables.js --fix --dry-run
```

### Publishing Changes

Install our Github App to auto propagate changes from your repo to your deployment. Changes will be deployed to production automatically after pushing to the default branch. Find the link to install on your dashboard.

#### Troubleshooting

- Mintlify dev isn't running - Run `mintlify install` it'll re-install dependencies.
- Page loads as a 404 - Make sure you are running in a folder with `docs.json`