Skip to content

Commit bf9dd3d

Browse files
committed
docs: tweaked styling and config
1 parent a8b1589 commit bf9dd3d

3 files changed

Lines changed: 73 additions & 61 deletions

File tree

docs/assets/stylesheets/extra.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,16 @@ body .md-typeset .md-typeset__table table:not([class]) th {
7676
body .md-typeset .md-typeset__table table:not([class]) td {
7777
padding-top: 0.1em;
7878
padding-bottom: 0.1em;
79+
}
80+
81+
body .md-typeset h1 {
82+
margin-bottom: 0.8em;
83+
}
84+
85+
body .md-typeset h2 {
86+
margin-top: 0.6em;
87+
}
88+
89+
body .md-main .md-main__inner {
90+
margin-top: 0.8rem;
7991
}

docs/components/component/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The object you use to update the components on the web console. It is also known
1717
|[`(Component):moveAfter`](moveAfter.md)|Move the current component after the given component|
1818
|[`(Component):moveToFront`](moveToFront.md)|Move the component to the 1st index|
1919
|[`(Component):moveToBack`](moveToBack.md)|Move the component to the last index|
20-
|[`(Component):children](children.md)|Used to iterate over all the locally known children|
20+
|[`(Component):children`](children.md)|Used to iterate over all the locally known children|
2121

2222
## Fields
2323
|Field|Description|

docs/config.md

Lines changed: 60 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -10,47 +10,47 @@ As MintMousse is a threaded library, almost all configuration must be done befor
1010
## File Paths and Locations
1111

1212
### `mintmousse.COMPONENT_PATHS`
13-
**Type**: _table_(array of strings)
13+
: **Type**: _table_(array of strings)
1414

15-
**Default**: `{ DIRECTORY_PATH .. "components/" }`
15+
**Default**: `{ DIRECTORY_PATH .. "components/" }`
1616

1717
Directories to search for components. Later entries override earlier ones on a per-file basis. Use this to add your own components or to include a git repo that provides extra components. See [Components]() to see how to create your own. -- TODO link
1818

1919
### `mintmousse.DEFAULT_INDEX_HTML`
20-
**Type**: _string_
20+
: **Type**: _string_
2121

22-
**Default**: `DIRECTORY_PATH .. "thread/index.html"`
22+
**Default**: `DIRECTORY_PATH .. "thread/index.html"`
2323

2424
Path to the base HTML file severed to connecting clients. This is a [Mustache](https://github.com/Olivine-Labs/lustache) template.
2525

2626
### `mintmousse.DEFAULT_INDEX_JS`
27-
**Type**: _string_
27+
: **Type**: _string_
2828

29-
**Default**: `DIRECTORY_PATH .. "thread/index.js"`
29+
**Default**: `DIRECTORY_PATH .. "thread/index.js"`
3030

3131
Path to the base JavaScript file served to clients. This is a [Mustache](https://github.com/Olivine-Labs/lustache) template.
3232

3333
### `mintmousse.DEFAULT_INDEX_CSS`
34-
**Type**: _string_
34+
: **Type**: _string_
3535

36-
**Default**: `DIRECTORY_PATH .. "thread/index.css"`
36+
**Default**: `DIRECTORY_PATH .. "thread/index.css"`
3737

3838
Path to base CSS file served to clients. This is a [Mustache](https://github.com/Olivine-Labs/lustache) template.
3939

4040
### RFG Icons
4141
These two settings are only relevant if you use [RFG](controller/setIconRFG.md) icons.
4242

4343
#### `mintmousse.ZIP_MOUNT_LOCATION
44-
**Type**: _string_
44+
: **Type**: _string_
4545

46-
**Default**: `".MintMousse/"
46+
**Default**: `".MintMousse/"
4747

4848
Directory used by `love.filesystem.mount()` when mounting ZIP archieves that contain RFG icons.
4949

5050
#### `mintmousse.FAVICON_PATH`
51-
**Type**: _string_
51+
: **Type**: _string_
5252

53-
**Default**: `"/favicon"`
53+
**Default**: `"/favicon"`
5454

5555
HTTP endpoint where the favicon assets are served. This must match the "favicon path" you set when generating icons on the RFG website.
5656

@@ -59,79 +59,79 @@ HTTP endpoint where the favicon assets are served. This must match the "favicon
5959
## Network and Server Settings
6060

6161
### `mintmousse.SOCKET_BACKLOG`
62-
**Type**: _number_
62+
: **Type**: _number_
6363

64-
**Default**: `32`
64+
**Default**: `32`
6565

6666
Maximum number of pending connections the OS will queue before refusing new ones.
6767

6868
### `mintmousse.MAX_HTTP_RECEIVE_SIZE`
69-
**Type**: _number_
69+
: **Type**: _number_
7070

71-
**Default**: `2^16` (65KB)
71+
**Default**: `2^16` (65KB)
7272

7373
The maximum allowed size of an incoming HTTP request body. Larger requests are rejected and the limit is included in the response headers.
7474

7575
### `mintmousse.MAX_WEBSOCKET_FRAME_SIZE`
76-
**Type**: _number_
76+
: **Type**: _number_
7777

78-
**Default**: `2^19` (512KB)
78+
**Default**: `2^19` (512KB)
7979

8080
Maximum size of a single WebSocket Frame (both incoming and outgoing).
8181

8282
### `mintmousse.MAX_WEBSOCKET_MESSAGE_SIZE`
83-
**Type**: _number_
83+
: **Type**: _number_
8484

85-
**Default**: `2^21` (2MB)
85+
**Default**: `2^21` (2MB)
8686

8787
Maximum size of a complete WebSocket message (after reassembling fragmented frames).
8888

8989
### `mintmousseCACHE_CONTROL_HEADER`
90-
**Type**: _string_
90+
: **Type**: _string_
9191

92-
**Default**: `"no-store"`
92+
**Default**: `"no-store"`
9393

9494
Value of the `Cache-Control` header sent for static assets. Change to something like `"public, max-age=3600"` for production.
9595

9696
### `mintmousse.MAX_PORT_ATTEMPTS`
97-
**Type**: _number_
97+
: **Type**: _number_
9898

99-
**Default**: `100`
99+
**Default**: `100`
100100

101101
Maximum number of sequential port increments tried when `autoIncrement = true` is passed to [`mintmousse.start`](controller/start.md).
102102

103103
### `mintmousse.TIMEOUT_HTTP`
104-
**Type**: _number_
104+
: **Type**: _number_
105105

106-
**Default**: `30`
106+
**Default**: `30`
107107

108108
Idle timeout for HTTP connections. A `408 Request Timeout` is sent if exceeded.
109109

110110
### `mintmousse.TIMEOUT_WEBSOCKET`
111-
**Type**: _number_ (seconds)
111+
: **Type**: _number_ (seconds)
112112

113-
**Default**: `60`
113+
**Default**: `60`
114114

115115
Idle timeout for WebSocket connections (includes the internal heartbeat mechanism).
116116

117117
### `mintmousse.PING_WEBSOCKET`
118-
**Type**: _number_ (seconds)
118+
: **Type**: _number_ (seconds)
119119

120-
**Default**: `30`
120+
**Default**: `30`
121121

122122
Interval between WebSocket ping frames (used for keep-alive).
123123

124124
### `mintmousse.COMPONENT_PARSE_TIMEOUT`
125-
**Type**: _number_ (seconds)
125+
: **Type**: _number_ (seconds)
126126

127-
**Default**: `3`
127+
**Default**: `3`
128128

129129
Maximum time to wait for component type parsing. If you see a timeout warning, increase this value or use the preload script.
130130

131131
### `mintmousse.REPLACE_DEFAULT_ERROR_HANDLER`
132-
**Type**: _boolean_
132+
: **Type**: _boolean_
133133

134-
**Default**: `true`
134+
**Default**: `true`
135135

136136
If `true`, MintMousse replaces Love’s default error handler with its own (adds better logging and cleaned-up stack traces).
137137

@@ -140,80 +140,80 @@ If `true`, MintMousse replaces Love’s default error handler with its own (adds
140140
## Logging Settings
141141

142142
### `mintmousse.LOG_ENABLED_TIMESTAMP`
143-
**Type**: _boolean_
143+
: **Type**: _boolean_
144144

145-
**Default**: `true`
145+
**Default**: `true`
146146

147147
Prefix every log with a timestamp.
148148

149149
### `mintmousse.LOG_TIMESTAMP_FORMAT`
150-
**Type**: _string_
150+
: **Type**: _string_
151151

152-
**Default**: `"%Y-%m-%d %H:%M:%S.%f"`
152+
**Default**: `"%Y-%m-%d %H:%M:%S.%f"`
153153

154154
Format passed to `os.date`. MintMousse adds the custom `%f` specifier (milliseconds, 3 digits padded). Performance is best when `%f` appears at the very end of the string.
155155

156156
### `mintmousse.LOG_ENABLE_STREAM_OUT`
157-
**Type**: _boolean_
157+
: **Type**: _boolean_
158158

159-
**Default**: `true`
159+
**Default**: `true`
160160

161161
Enable logging to `io.stdout` / `io.stderr` (behaves like the global `print`). Automatically strips ANSI colours when the stream is redirected to a file.
162162

163163
### `mintmousse.LOG_ENABLE_ERROR`
164-
**Type**: _boolean_
164+
: **Type**: _boolean_
165165

166-
**Default**: `true`
166+
**Default**: `true`
167167

168168
When `logger:error()` is called, also call the global `error()` function.
169169

170170
### `mintmousse.LOG_INCLUDE_TRACE`
171-
**Type**: _boolean_
171+
: **Type**: _boolean_
172172

173-
**Default**: `false`
173+
**Default**: `false`
174174

175175
Include debug info (`function@file:line`) in all log message levels. Has a noticeable performance cost with each lookup.
176176

177177
### `mintmousse.LOG_WARNINGS_CAUSE_ERRORS`
178-
**Type**: _boolean_
178+
: **Type**: _boolean_
179179

180-
**Default**: `false`
180+
**Default**: `false`
181181

182182
If `true`, warning logs are promoted to error logs.
183183

184184
### `mintmousse.LOG_WARNINGS_INCLUDE_TRACE`
185-
**Type**: _boolean_
185+
: **Type**: _boolean_
186186

187-
**Default**: `false`
187+
**Default**: `false`
188188

189189
Include trace information on warning logs (does not effect other log levels).
190190

191191
### `mintmousse.REPLACE_FUNC_PRINT`
192-
**Type**: _boolean_
192+
: **Type**: _boolean_
193193

194-
**Default**: `true`
194+
**Default**: `true`
195195

196196
Replaces the global function `print` with `logger:debug`. The original `print` is still available as `GLOBAL_print` (but it isn't considered thread-safe).
197197

198198
### `mintmousse.LOG_CLEAR_UP_TRACEBACK`
199-
**Type**: _boolean_
199+
: **Type**: _boolean_
200200

201-
**Default**: `true`
201+
**Default**: `true`
202202

203203
Clean internal MintMousse and Love calls from the traceback shown by [`MintMousse.logUncaughtError`](logging/logUncaughtError.md). It doesn't effect the public [`MintMousse.cleanupTraceback`](logging/cleanupTraceback.md) function.
204204

205205

206206
### `mintmousse.LOG_BUFFER_SIZE`
207-
**Type**: _number_
207+
: **Type**: _number_
208208

209-
**Default**: `2^20` (1MB)
209+
**Default**: `2^20` (1MB)
210210

211211
Size of the stdout buffer. Increase if you see garbled/interleaved output, or call [`mintmousse.flushLogs`](logging/flushLogs.md) more often.
212212

213213
### `mintmousse.LOG_MAX_PENDING_LOGS_PER_FLUSH`
214-
**Type**: _number_
214+
: **Type**: _number_
215215

216-
**Default**: `512`
216+
**Default**: `512`
217217

218218
Maximum number of logs the global sinks will process in a single call to [`mintmousse.flushLogs`](logging/flushLogs.md) (only runs on the main thread).
219219

@@ -223,16 +223,16 @@ Maximum number of logs the global sinks will process in a single call to [`mintm
223223
You probably won't need to change these unless you have very specific performance requirements.
224224

225225
### `mintmousse.MAX_THREAD_MESSAGES`
226-
**Type**: _number_
226+
: **Type**: _number_
227227

228-
**Default**: `100`
228+
**Default**: `100`
229229

230230
Maximum commands the MintMousse thread will process in one loop iteration.
231231

232232
### `mintmousse.THREAD_SLEEP`
233-
**Type**: _number_ (seconds)
233+
: **Type**: _number_ (seconds)
234234

235-
**Default**: `1e-4` (0.0001s)
235+
**Default**: `1e-4` (0.0001s)
236236

237237
sleep time between thread loop iterations. Increase to reduce CPU usage, decrease if the thread feels sluggish.
238238

0 commit comments

Comments
 (0)