```
--------------------------------
### Creating Basic Tables (Markdown)
Source: https://github.com/unkinseong/gitbook-unofficial-sdk-lazy/blob/main/content-creation/markdown-basics.md
Demonstrates the basic syntax for creating a simple table with headers, a separator line using hyphens and pipes, and rows of content using pipes to separate columns.
```markdown
| Header 1 | Header 2 | Header 3 |
|----------|----------|----------|
| Row 1, Col 1 | Row 1, Col 2 | Row 1, Col 3 |
| Row 2, Col 1 | Row 2, Col 2 | Row 2, Col 3 |
```
--------------------------------
### Creating GitBook Hints/Callouts (Markdown)
Source: https://github.com/unkinseong/gitbook-unofficial-sdk-lazy/blob/main/content-creation/markdown-basics.md
Shows how to create special colored hint or callout blocks in GitBook using the {% hint style="..." %} syntax, with styles like info, warning, danger, and success to highlight important information.
```markdown
{% hint style="info" %}
This is an informational hint.
{% endhint %}
{% hint style="warning" %}
This is a warning.
{% endhint %}
{% hint style="danger" %}
This is a dangerous warning.
{% endhint %}
{% hint style="success" %}
This indicates success or a tip.
{% endhint %}
```
--------------------------------
### Creating Ordered Lists (Markdown)
Source: https://github.com/unkinseong/gitbook-unofficial-sdk-lazy/blob/main/content-creation/markdown-basics.md
Demonstrates how to create ordered lists using numbers followed by a period and a space. Nesting is achieved by indenting, similar to unordered lists.
```markdown
1. First item
2. Second item
1. Subitem 2.1
2. Subitem 2.2
3. Third item
```
--------------------------------
### Creating Basic HelloWorld Function (JavaScript)
Source: https://github.com/unkinseong/gitbook-unofficial-sdk-lazy/blob/main/content-creation/code-snippets.md
This snippet demonstrates a fundamental JavaScript function that prints 'Hello, world!' to the console. It is used to show the basic structure of a GitBook code block including title and line numbers parameters.
```javascript
function helloWorld() {
console.log("Hello, world!");
}
```
--------------------------------
### Creating Unordered Lists (Markdown)
Source: https://github.com/unkinseong/gitbook-unofficial-sdk-lazy/blob/main/content-creation/markdown-basics.md
Illustrates how to create unordered lists using -, *, or + symbols followed by a space, including nesting items by indenting, in Markdown.
```markdown
- Item 1
- Item 2
- Subitem 2.1
- Subitem 2.2
- Item 3
```
--------------------------------
### Adding Cover Image and Description in GitBook Frontmatter (YAML)
Source: https://github.com/unkinseong/gitbook-unofficial-sdk-lazy/blob/main/advanced-features/covers-and-icons.md
Demonstrates how to add a cover image using the 'cover' property (specifying the image path), control its vertical position with 'coverY' (0 is top), and provide a page summary using the 'description' property in YAML frontmatter.
```YAML
cover: ../.gitbook/assets/cover-image.png
coverY: 0
description: A concise description of what this page contains and its purpose.
```
--------------------------------
### Creating User Data JavaScript Fetch
Source: https://github.com/unkinseong/gitbook-unofficial-sdk-lazy/blob/main/advanced-features/api-documentation.md
Demonstrates how to perform a POST request using JavaScript's Fetch API to create a user. It shows setting headers, including the authorization token and content type, and sending the user data as a JSON string in the request body. This is suitable for browser-based or Node.js applications.
```javascript
fetch('https://api.example.com/users', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Jane Smith',
email: 'jane@example.com'
})
})
.then(response => response.json())
.then(data => console.log(data));
```
--------------------------------
### Creating Image Gallery with GitBook Tabs
Source: https://github.com/unkinseong/gitbook-unofficial-sdk-lazy/blob/main/content-creation/inserting-images.md
Demonstrates creating a simple image gallery using GitBook's custom tabs syntax. Each tab can contain an image, allowing users to switch between multiple images within a single block of content. This syntax is specific to GitBook's rendering engine.
```GitBook Syntax
{% tabs %}
{% tab title="Screenshot 1" %}

{% endtab %}
{% tab title="Screenshot 2" %}

{% endtab %}
{% endtabs %}
```
--------------------------------
### Creating a Pie Chart with Mermaid
Source: https://github.com/unkinseong/gitbook-unofficial-sdk-lazy/blob/main/content-creation/diagrams.md
Illustrates how to display data distribution using the 'pie' directive. Each slice is defined with a label and a numerical value representing its proportion of the total.
```Mermaid
pie
title Distribution
"Category A" : 42.4
"Category B" : 30.1
"Category C" : 27.5
```
--------------------------------
### Basic Page Frontmatter Configuration (YAML)
Source: https://github.com/unkinseong/gitbook-unofficial-sdk-lazy/blob/main/README.md
This YAML snippet illustrates the basic frontmatter block used at the top of a GitBook page file. It configures metadata such as the page description, cover image path, cover position, and an icon, enclosed within --- delimiters. Dependencies: GitBook platform, YAML syntax.
```yaml
---
description: Page description
cover: ./assets/cover-image.png
coverY: 0
icon: star
---
```
--------------------------------
### Creating GitBook Content Tabs (Markdown)
Source: https://github.com/unkinseong/gitbook-unofficial-sdk-lazy/blob/main/content-creation/markdown-basics.md
Demonstrates how to create tabbed content blocks in GitBook using the {% tabs %} and {% tab title="..." %} syntax. This is useful for presenting alternative content versions, like code snippets in different languages.
```markdown
{% tabs %}
{% tab title="First Tab" %}
Content of the first tab
{% endtab %}
{% tab title="Second Tab" %}
Content of the second tab
{% endtab %}
{% endtabs %}
```
--------------------------------
### Applying Text Emphasis (Markdown)
Source: https://github.com/unkinseong/gitbook-unofficial-sdk-lazy/blob/main/content-creation/markdown-basics.md
Shows different ways to apply emphasis like italics, bold, and strikethrough using *, _, **, __, and ~~ symbols in Markdown. Combinations like bold and italic are also shown.
```markdown
*Italic text* or _Italic text_
**Bold text** or __Bold text__
***Bold and italic text*** or ___Bold and italic text___
~~Strikethrough text~~
```
--------------------------------
### Configuring Advanced Layout Options in GitBook Frontmatter (YAML)
Source: https://github.com/unkinseong/gitbook-unofficial-sdk-lazy/blob/main/advanced-features/covers-and-icons.md
Illustrates how to use the 'layout' block in YAML frontmatter to customize page presentation. It allows controlling the visibility and size ('hero', 'full', 'partial') of the cover, and the visibility and depth ('maxDepth') of elements like title, description, table of contents, outline, and pagination.
```YAML
layout:
cover:
visible: true
size: hero # Options: hero, full, partial
title:
visible: true
description:
visible: true
tableOfContents:
visible: true
maxDepth: 3
outline:
visible: true
pagination:
visible: true
```
--------------------------------
### Using Reference-Style Links (Markdown)
Source: https://github.com/unkinseong/gitbook-unofficial-sdk-lazy/blob/main/content-creation/markdown-basics.md
Explains how to define link URLs separately using reference labels (e.g., [ref1]: URL) and then link to them in the text using the label (e.g., [link text][ref1]). This can improve readability for documents with many repeated links.
```markdown
[reference link][ref1]
[ref1]: https://www.example.com
```
--------------------------------
### Advanced Page Layout Configuration (YAML)
Source: https://github.com/unkinseong/gitbook-unofficial-sdk-lazy/blob/main/README.md
This YAML snippet expands upon basic frontmatter, showing how to configure detailed layout options for a GitBook page. It includes visibility and sizing settings for elements like the cover, title, description, table of contents, outline, and pagination. Dependencies: GitBook platform, YAML syntax.
```yaml
---
cover: ./assets/cover-image.png
coverY: 0
icon: star
description: Page description
layout:
cover:
visible: true
size: hero # Options: hero, full, partial
title:
visible: true
description:
visible: true
tableOfContents:
visible: true
maxDepth: 3
outline:
visible: true
pagination:
visible: true
---
```
--------------------------------
### Creating Blockquotes (Markdown)
Source: https://github.com/unkinseong/gitbook-unofficial-sdk-lazy/blob/main/content-creation/markdown-basics.md
Illustrates how to create blockquotes using the > symbol at the beginning of lines. Blockquotes can span multiple paragraphs and can also be nested using additional > symbols.
```markdown
> This is a blockquote.
>
> It can span multiple paragraphs.
>
> > And can be nested.
```
--------------------------------
### Using HTML Details/Summary in Markdown (HTML/Markdown)
Source: https://github.com/unkinseong/gitbook-unofficial-sdk-lazy/blob/main/content-creation/markdown-basics.md
Illustrates how to use HTML
```
--------------------------------
### Configuring Custom GitBook Redirects in .gitbook.yaml (YAML)
Source: https://github.com/unkinseong/gitbook-unofficial-sdk-lazy/blob/main/gitbook-structure/routing.md
This YAML snippet shows how to configure custom redirects in the .gitbook.yaml file. Redirects are used to map old URL paths to new file paths, ensuring backward compatibility and preventing broken links after restructuring content.
```yaml
# In .gitbook.yaml
redirects:
old/url: new-folder/new-page.md
legacy/api-docs: api/v2/overview.md
```
--------------------------------
### Making Image Responsive with CSS
Source: https://github.com/unkinseong/gitbook-unofficial-sdk-lazy/blob/main/content-creation/inserting-images.md
Provides CSS styling within an inline 'style' attribute to make an image responsive. Setting 'max-width: 100%' ensures the image doesn't overflow its container, and 'height: auto' maintains the aspect ratio, allowing the image to scale down gracefully on smaller screens.
```CSS
```
--------------------------------
### Creating a Class Diagram with Mermaid
Source: https://github.com/unkinseong/gitbook-unofficial-sdk-lazy/blob/main/content-creation/diagrams.md
Illustrates how to model classes and their relationships using the 'classDiagram' directive. Class properties and methods are defined, and inheritance is shown using '<|--'.
```Mermaid
classDiagram
class User {
+String username
+String email
+login()
+logout()
}
class Admin {
+manageUsers()
}
User <|-- Admin
```
--------------------------------
### Adding Footnotes (Markdown)
Source: https://github.com/unkinseong/gitbook-unofficial-sdk-lazy/blob/main/content-creation/markdown-basics.md
Demonstrates how to add footnote references within the text using the [^label] syntax and define the footnote content elsewhere in the document using [^label]: followed by the content.
```markdown
Here's a sentence with a footnote reference[^1].
[^1]: This is the footnote content.
```
--------------------------------
### Linking to GitBook Pages with Custom Text (Markdown)
Source: https://github.com/unkinseong/gitbook-unofficial-sdk-lazy/blob/main/content-creation/markdown-basics.md
Explains how to create internal links to other pages within a GitBook using the {% page-ref page="./path/to/page.md" %} syntax, allowing you to specify custom text for the link instead of just the page title.
```markdown
{% page-ref page="./path/to/page.md" %}
My Custom Link Text
{% endpage-ref %}
```
--------------------------------
### Creating GitBook Figure Block with HTML
Source: https://github.com/unkinseong/gitbook-unofficial-sdk-lazy/blob/main/content-creation/inserting-images.md
Illustrates how to use GitBook's extended figure syntax, based on HTML tags, to include an image with a caption. This provides more structured presentation than basic Markdown. It requires an image source ('src'), alternative text ('alt'), and allows for a descriptive caption via the '
```
--------------------------------
### Aligning Image Right with CSS Style
Source: https://github.com/unkinseong/gitbook-unofficial-sdk-lazy/blob/main/content-creation/inserting-images.md
Demonstrates using inline CSS within the 'style' attribute to align an image to the right. The 'float: right' property makes the image float on the right side, and 'margin-left: 10px' adds space between the image and surrounding text, allowing text to wrap around it.
```CSS
```
--------------------------------
### Displaying Long String with Wrapping (JavaScript, GitBook)
Source: https://github.com/unkinseong/gitbook-unofficial-sdk-lazy/blob/main/content-creation/code-snippets.md
This JavaScript snippet includes a deliberately long string variable definition. It is used to demonstrate how the `overflow='wrap'` parameter prevents horizontal scrolling for long lines of code, causing them to wrap within the GitBook code block instead.
```javascript
// Long lines will wrap instead of requiring horizontal scrolling
const veryLongLine = "This is a very long line of code that would normally extend beyond the bounds of the code block and require horizontal scrolling, but with overflow='wrap' it will automatically wrap to the next line.";
```
=== COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.