@terrymooreii/sia 2.1.5 → 2.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,536 @@
1
+ # Markdown Guide
2
+
3
+ Sia supports GitHub Flavored Markdown (GFM) plus several enhanced features through plugins. This guide covers all supported markdown syntax.
4
+
5
+ ## Table of Contents
6
+
7
+ - [Basic Syntax](#basic-syntax)
8
+ - [GitHub Flavored Markdown](#github-flavored-markdown)
9
+ - [Syntax Highlighting](#syntax-highlighting)
10
+ - [Emoji Shortcodes](#emoji-shortcodes)
11
+ - [Heading IDs](#heading-ids)
12
+ - [Footnotes](#footnotes)
13
+ - [Smart Typography](#smart-typography)
14
+ - [Alert Boxes](#alert-boxes)
15
+ - [Auto-Linkify](#auto-linkify)
16
+ - [YouTube Embeds](#youtube-embeds)
17
+ - [Giphy Embeds](#giphy-embeds)
18
+
19
+ ---
20
+
21
+ ## Basic Syntax
22
+
23
+ ### Headings
24
+
25
+ ```markdown
26
+ # Heading 1
27
+ ## Heading 2
28
+ ### Heading 3
29
+ #### Heading 4
30
+ ##### Heading 5
31
+ ###### Heading 6
32
+ ```
33
+
34
+ ### Paragraphs
35
+
36
+ Separate paragraphs with a blank line:
37
+
38
+ ```markdown
39
+ This is the first paragraph.
40
+
41
+ This is the second paragraph.
42
+ ```
43
+
44
+ ### Emphasis
45
+
46
+ ```markdown
47
+ *italic* or _italic_
48
+ **bold** or __bold__
49
+ ***bold and italic*** or ___bold and italic___
50
+ ```
51
+
52
+ ### Links
53
+
54
+ ```markdown
55
+ [Link text](https://example.com)
56
+ [Link with title](https://example.com "Title")
57
+
58
+ <!-- Reference-style links -->
59
+ [Link text][reference]
60
+ [reference]: https://example.com
61
+ ```
62
+
63
+ ### Images
64
+
65
+ ```markdown
66
+ ![Alt text](/images/photo.jpg)
67
+ ![Alt text](/images/photo.jpg "Optional title")
68
+ ```
69
+
70
+ ### Blockquotes
71
+
72
+ ```markdown
73
+ > This is a blockquote.
74
+ >
75
+ > It can span multiple paragraphs.
76
+
77
+ > Nested blockquotes
78
+ >> Are also supported
79
+ ```
80
+
81
+ ### Lists
82
+
83
+ **Unordered:**
84
+
85
+ ```markdown
86
+ - Item 1
87
+ - Item 2
88
+ - Nested item
89
+ - Another nested item
90
+ - Item 3
91
+ ```
92
+
93
+ **Ordered:**
94
+
95
+ ```markdown
96
+ 1. First item
97
+ 2. Second item
98
+ 1. Nested item
99
+ 2. Another nested item
100
+ 3. Third item
101
+ ```
102
+
103
+ ### Horizontal Rules
104
+
105
+ ```markdown
106
+ ---
107
+ ***
108
+ ___
109
+ ```
110
+
111
+ ### Inline Code
112
+
113
+ ```markdown
114
+ Use `backticks` for inline code.
115
+ ```
116
+
117
+ ### Code Blocks
118
+
119
+ ````markdown
120
+ ```
121
+ Plain code block
122
+ ```
123
+
124
+ ```javascript
125
+ // Code block with syntax highlighting
126
+ function hello() {
127
+ console.log("Hello!");
128
+ }
129
+ ```
130
+ ````
131
+
132
+ ---
133
+
134
+ ## GitHub Flavored Markdown
135
+
136
+ ### Tables
137
+
138
+ ```markdown
139
+ | Header 1 | Header 2 | Header 3 |
140
+ |----------|:--------:|---------:|
141
+ | Left | Center | Right |
142
+ | aligned | aligned | aligned |
143
+ ```
144
+
145
+ Renders as:
146
+
147
+ | Header 1 | Header 2 | Header 3 |
148
+ |----------|:--------:|---------:|
149
+ | Left | Center | Right |
150
+ | aligned | aligned | aligned |
151
+
152
+ ### Task Lists
153
+
154
+ ```markdown
155
+ - [x] Completed task
156
+ - [ ] Incomplete task
157
+ - [ ] Another task
158
+ ```
159
+
160
+ ### Strikethrough
161
+
162
+ ```markdown
163
+ ~~This text is struck through~~
164
+ ```
165
+
166
+ ### Autolinks
167
+
168
+ URLs are automatically converted to links:
169
+
170
+ ```markdown
171
+ Visit https://example.com for more info.
172
+ ```
173
+
174
+ ---
175
+
176
+ ## Syntax Highlighting
177
+
178
+ Code blocks are automatically highlighted using [Highlight.js](https://highlightjs.org/). Specify the language after the opening backticks:
179
+
180
+ ````markdown
181
+ ```javascript
182
+ function greet(name) {
183
+ return `Hello, ${name}!`;
184
+ }
185
+ ```
186
+
187
+ ```python
188
+ def greet(name):
189
+ return f"Hello, {name}!"
190
+ ```
191
+
192
+ ```css
193
+ .container {
194
+ display: flex;
195
+ justify-content: center;
196
+ }
197
+ ```
198
+ ````
199
+
200
+ ### Supported Languages
201
+
202
+ Highlight.js supports 190+ languages including:
203
+
204
+ - `javascript`, `typescript`, `jsx`, `tsx`
205
+ - `python`, `ruby`, `php`, `go`, `rust`
206
+ - `html`, `css`, `scss`, `less`
207
+ - `json`, `yaml`, `xml`, `markdown`
208
+ - `bash`, `shell`, `powershell`
209
+ - `sql`, `graphql`
210
+ - `java`, `kotlin`, `swift`, `c`, `cpp`, `csharp`
211
+ - And many more...
212
+
213
+ If no language is specified, Highlight.js will attempt to auto-detect it.
214
+
215
+ ---
216
+
217
+ ## Emoji Shortcodes
218
+
219
+ Use emoji shortcodes in your markdown:
220
+
221
+ ```markdown
222
+ :smile: :rocket: :heart: :fire:
223
+ ```
224
+
225
+ ### Available Emojis
226
+
227
+ | Shortcode | Emoji | Shortcode | Emoji |
228
+ |-----------|-------|-----------|-------|
229
+ | `:smile:` | 😄 | `:grinning:` | 😀 |
230
+ | `:joy:` | 😂 | `:heart:` | ❤️ |
231
+ | `:thumbsup:` or `:+1:` | 👍 | `:thumbsdown:` or `:-1:` | 👎 |
232
+ | `:clap:` | 👏 | `:fire:` | 🔥 |
233
+ | `:rocket:` | 🚀 | `:star:` | ⭐ |
234
+ | `:sparkles:` | ✨ | `:check:` | ✅ |
235
+ | `:x:` | ❌ | `:warning:` | ⚠️ |
236
+ | `:bulb:` | 💡 | `:memo:` | 📝 |
237
+ | `:book:` | 📖 | `:link:` | 🔗 |
238
+ | `:eyes:` | 👀 | `:thinking:` | 🤔 |
239
+ | `:wave:` | 👋 | `:pray:` | 🙏 |
240
+ | `:muscle:` | 💪 | `:tada:` | 🎉 |
241
+ | `:party:` | 🥳 | `:coffee:` | ☕ |
242
+ | `:bug:` | 🐛 | `:wrench:` | 🔧 |
243
+ | `:hammer:` | 🔨 | `:gear:` | ⚙️ |
244
+ | `:lock:` | 🔒 | `:key:` | 🔑 |
245
+ | `:zap:` | ⚡ | `:bomb:` | 💣 |
246
+ | `:gem:` | 💎 | `:trophy:` | 🏆 |
247
+ | `:medal:` | 🏅 | `:crown:` | 👑 |
248
+ | `:sun:` | ☀️ | `:moon:` | 🌙 |
249
+ | `:cloud:` | ☁️ | `:rain:` | 🌧️ |
250
+ | `:snow:` | ❄️ | `:earth:` | 🌍 |
251
+ | `:tree:` | 🌳 | `:flower:` | 🌸 |
252
+ | `:apple:` | 🍎 | `:pizza:` | 🍕 |
253
+ | `:beer:` | 🍺 | `:wine:` | 🍷 |
254
+ | `:cat:` | 🐱 | `:dog:` | 🐶 |
255
+ | `:bird:` | 🐦 | `:fish:` | 🐟 |
256
+ | `:whale:` | 🐳 | `:snake:` | 🐍 |
257
+ | `:turtle:` | 🐢 | `:octopus:` | 🐙 |
258
+ | `:crab:` | 🦀 | `:shrimp:` | 🦐 |
259
+ | `:100:` | 💯 | | |
260
+
261
+ ---
262
+
263
+ ## Heading IDs
264
+
265
+ All headings automatically receive URL-friendly ID attributes for anchor linking:
266
+
267
+ ```markdown
268
+ ## My Section Title
269
+ ```
270
+
271
+ Becomes:
272
+
273
+ ```html
274
+ <h2 id="my-section-title">My Section Title</h2>
275
+ ```
276
+
277
+ ### Linking to Headings
278
+
279
+ Link to headings within the same document:
280
+
281
+ ```markdown
282
+ See the [Installation](#installation) section.
283
+ Jump to [Getting Started](#getting-started).
284
+ ```
285
+
286
+ ---
287
+
288
+ ## Footnotes
289
+
290
+ Add footnotes to provide additional context:
291
+
292
+ ```markdown
293
+ This is a statement that needs a citation[^1].
294
+
295
+ Here's another claim[^note].
296
+
297
+ [^1]: This is the first footnote.
298
+ [^note]: This is a named footnote with more detail.
299
+ ```
300
+
301
+ Footnotes are rendered at the bottom of the content with back-references.
302
+
303
+ ### Multi-line Footnotes
304
+
305
+ ```markdown
306
+ Here's a complex topic[^complex].
307
+
308
+ [^complex]: This footnote has multiple paragraphs.
309
+
310
+ Indent subsequent paragraphs with 4 spaces.
311
+
312
+ You can even include code blocks.
313
+ ```
314
+
315
+ ---
316
+
317
+ ## Smart Typography
318
+
319
+ Sia automatically converts plain text punctuation to typographically correct characters:
320
+
321
+ | Input | Output | Name |
322
+ |-------|--------|------|
323
+ | `"quoted"` | "quoted" | Curly double quotes |
324
+ | `'quoted'` | 'quoted' | Curly single quotes |
325
+ | `--` | – | En-dash |
326
+ | `---` | — | Em-dash |
327
+ | `...` | … | Ellipsis |
328
+
329
+ ### Examples
330
+
331
+ ```markdown
332
+ "Hello," she said. "How's it going?"
333
+
334
+ The years 2020--2024 were interesting...
335
+
336
+ Wait---I just remembered something!
337
+ ```
338
+
339
+ Renders with proper curly quotes, en-dashes, em-dashes, and ellipses.
340
+
341
+ ---
342
+
343
+ ## Alert Boxes
344
+
345
+ Create GitHub-style alert boxes for callouts:
346
+
347
+ ```markdown
348
+ > [!NOTE]
349
+ > Useful information that users should know.
350
+
351
+ > [!TIP]
352
+ > Helpful advice for doing things better.
353
+
354
+ > [!IMPORTANT]
355
+ > Key information users need to know.
356
+
357
+ > [!WARNING]
358
+ > Urgent info that needs immediate attention.
359
+
360
+ > [!CAUTION]
361
+ > Advises about risks or negative outcomes.
362
+ ```
363
+
364
+ ### Alert Types
365
+
366
+ | Type | Use Case |
367
+ |------|----------|
368
+ | `NOTE` | General information, highlights, or context |
369
+ | `TIP` | Helpful suggestions or best practices |
370
+ | `IMPORTANT` | Critical information the reader must know |
371
+ | `WARNING` | Potential issues or things to be careful about |
372
+ | `CAUTION` | Dangerous actions or serious consequences |
373
+
374
+ ### Multi-line Alerts
375
+
376
+ ```markdown
377
+ > [!WARNING]
378
+ > This is a warning with multiple lines.
379
+ >
380
+ > You can include:
381
+ > - Lists
382
+ > - **Formatting**
383
+ > - `Code`
384
+ ```
385
+
386
+ ---
387
+
388
+ ## Auto-Linkify
389
+
390
+ Plain URLs are automatically converted to clickable links:
391
+
392
+ ```markdown
393
+ Check out https://example.com for more info.
394
+ Email us at contact@example.com
395
+ ```
396
+
397
+ This works for:
398
+ - HTTP/HTTPS URLs
399
+ - Email addresses
400
+ - Other common URL schemes
401
+
402
+ ---
403
+
404
+ ## YouTube Embeds
405
+
406
+ YouTube videos are automatically embedded when you include a YouTube link. Sia supports multiple URL formats:
407
+
408
+ ### As a Markdown Link
409
+
410
+ ```markdown
411
+ [Watch this video](https://www.youtube.com/watch?v=dQw4w9WgXcQ)
412
+ ```
413
+
414
+ ### As a Plain URL
415
+
416
+ ```markdown
417
+ https://www.youtube.com/watch?v=dQw4w9WgXcQ
418
+ ```
419
+
420
+ ### Short URL Format
421
+
422
+ ```markdown
423
+ https://youtu.be/dQw4w9WgXcQ
424
+ ```
425
+
426
+ ### Supported URL Patterns
427
+
428
+ All of these formats are recognized and converted to responsive embeds:
429
+
430
+ - `https://www.youtube.com/watch?v=VIDEO_ID`
431
+ - `https://youtube.com/watch?v=VIDEO_ID`
432
+ - `https://youtu.be/VIDEO_ID`
433
+ - `https://www.youtube.com/embed/VIDEO_ID`
434
+
435
+ The embed is responsive and will scale properly on all screen sizes.
436
+
437
+ ---
438
+
439
+ ## Giphy Embeds
440
+
441
+ Giphy GIFs can be embedded in multiple ways:
442
+
443
+ ### Direct Image Link
444
+
445
+ Use standard markdown image syntax with a Giphy media URL:
446
+
447
+ ```markdown
448
+ ![Funny GIF](https://media.giphy.com/media/GIPHY_ID/giphy.gif)
449
+ ```
450
+
451
+ ### Giphy Share URL
452
+
453
+ Share URLs are automatically converted to responsive embeds:
454
+
455
+ ```markdown
456
+ [Check this out](https://giphy.com/gifs/GIPHY_ID)
457
+ ```
458
+
459
+ Or just paste the URL:
460
+
461
+ ```markdown
462
+ https://giphy.com/gifs/GIPHY_ID
463
+ ```
464
+
465
+ ### Supported URL Patterns
466
+
467
+ - `https://giphy.com/gifs/ID`
468
+ - `https://giphy.com/embed/ID`
469
+ - `https://gph.is/g/ID`
470
+ - `https://media.giphy.com/media/ID/giphy.gif`
471
+
472
+ ---
473
+
474
+ ## Complete Example
475
+
476
+ Here's a markdown file using many of these features:
477
+
478
+ ```markdown
479
+ ---
480
+ title: "My Awesome Post"
481
+ date: 2024-12-17
482
+ tags: [tutorial, markdown]
483
+ ---
484
+
485
+ # Getting Started :rocket:
486
+
487
+ Welcome to this tutorial! Let's learn about **markdown** features.
488
+
489
+ ## Code Example
490
+
491
+ Here's some JavaScript:
492
+
493
+ ```javascript
494
+ function greet(name) {
495
+ return `Hello, ${name}!`;
496
+ }
497
+ ```
498
+
499
+ ## Important Notes
500
+
501
+ > [!TIP]
502
+ > Always save your work frequently!
503
+
504
+ ## References
505
+
506
+ This feature was introduced in version 2.0[^1].
507
+
508
+ Check out this video for more:
509
+ https://www.youtube.com/watch?v=example
510
+
511
+ [^1]: See the official documentation for details.
512
+ ```
513
+
514
+ ---
515
+
516
+ ## Escaping Special Characters
517
+
518
+ To display literal characters that have special meaning in markdown, escape them with a backslash:
519
+
520
+ ```markdown
521
+ \*not italic\*
522
+ \[not a link\]
523
+ \# not a heading
524
+ \`not code\`
525
+ ```
526
+
527
+ ---
528
+
529
+ ## Best Practices
530
+
531
+ 1. **Use headings hierarchically** - Don't skip heading levels (h1 → h3)
532
+ 2. **Add alt text to images** - Improves accessibility and SEO
533
+ 3. **Use fenced code blocks** - Specify the language for syntax highlighting
534
+ 4. **Keep lines reasonable** - Long lines can be hard to read in source
535
+ 5. **Use blank lines** - Separate different elements for clarity
536
+ 6. **Preview your content** - Use `sia dev` to see how it renders