### Quick Start CLI Source: https://github.com/unhappychoice/mdts/blob/main/README.md Starts the mdts CLI tool with default settings, opening a local server at http://localhost:8521 and launching your browser. ```bash npx mdts ``` -------------------------------- ### Start mdts Server Source: https://github.com/unhappychoice/mdts/blob/main/public/welcome.md Command to start the Markdown Tree Server. It takes the path to your markdown directory as an argument. The server will then be accessible via `http://localhost:`. ```bash mdts ``` -------------------------------- ### PHP Echo Example Source: https://github.com/unhappychoice/mdts/blob/main/sample_documents/features/code-syntax.md A minimal PHP script that outputs the string "Hello, PHP!" to the browser or console using the echo construct. ```php ``` -------------------------------- ### Markdown: Tables with More Content Source: https://github.com/unhappychoice/mdts/blob/main/sample_documents/features/tables.md Provides an example of a table with more data entries, demonstrating how to structure tables with multiple columns and rows for detailed information. ```markdown | Item | Quantity | Price (USD) | Notes | |------|----------|-------------|-------| | Apple | 10 | 1.00 | Fresh and crisp | | Banana | 5 | 0.50 | Organic | | Orange | 15 | 0.75 | From Florida | ``` -------------------------------- ### JSON Data Structure Example Source: https://github.com/unhappychoice/mdts/blob/main/sample_documents/features/code-syntax.md An example of a JSON object representing a person's details, including name, age, student status, and a list of courses with titles and credits. ```json // JSON example { "name": "John Doe", "age": 30, "isStudent": false, "courses": [ {"title": "History", "credits": 3}, {"title": "Math", "credits": 4} ] } ``` -------------------------------- ### Java Main Method Example Source: https://github.com/unhappychoice/mdts/blob/main/sample_documents/features/code-syntax.md A basic Java program structure showing the main method, the entry point for execution, and printing a string to standard output. ```java // Java example public class Main { public static void main(String[] args) { System.out.println("Hello, Java!"); } } ``` -------------------------------- ### TypeScript Class and Function Examples Source: https://github.com/unhappychoice/mdts/blob/main/sample_documents/features/code-syntax.md Demonstrates defining a class with members and methods, arrow functions, and regular functions in TypeScript. Includes basic console logging. ```typescript const helloWorld = () => { console.log('Hello World!') } function blah() { hellowWorld(); } class Dog { member = 'm'; init() { console.log('initialize'); } } ``` -------------------------------- ### HTML Document Structure Example Source: https://github.com/unhappychoice/mdts/blob/main/sample_documents/features/code-syntax.md A standard HTML5 document template including , , , and sections. Demonstrates basic page structure with a title, heading, and paragraph. ```html Page Title

My First Heading

My first paragraph.

``` -------------------------------- ### YAML Frontmatter Example Source: https://github.com/unhappychoice/mdts/blob/main/sample_documents/features/frontmatter.md Demonstrates the structure and content of YAML Frontmatter, commonly used for metadata in Markdown files. ```yaml title: My Awesome Document author: Gemini CLI date: 2025-07-18 tags: - markdown - frontmatter - example category: Documentation published: true version: 1.0.0 ``` -------------------------------- ### Go Hello World Program Source: https://github.com/unhappychoice/mdts/blob/main/sample_documents/features/code-syntax.md A basic Go program that prints "Hello, Go!" to the console. Demonstrates the package main, import fmt, and the main function. ```go // Go example package main import "fmt" func main() { fmt.Println("Hello, Go!") } ``` -------------------------------- ### Markdown: Basic Table Creation Source: https://github.com/unhappychoice/mdts/blob/main/sample_documents/features/tables.md Demonstrates the fundamental syntax for creating a table in Markdown. It includes a header row and data rows separated by pipes and hyphens. ```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 | ``` -------------------------------- ### Zero-install Usage with npx Source: https://github.com/unhappychoice/mdts/blob/main/docs/comparison.md Demonstrates how to use mdts without prior installation by leveraging Node Package Execute (npx). This allows immediate execution of the tool from the command line. ```JavaScript npx mdts ``` -------------------------------- ### Run mdts with npx Source: https://github.com/unhappychoice/mdts/blob/main/docs/faq.md mdts can be run instantly without installation using npx. This command downloads and executes the latest version of the tool, serving local Markdown files. ```bash npx mdts ``` -------------------------------- ### Javascript greet function Source: https://github.com/unhappychoice/mdts/blob/main/sample_documents/specs/basic.md A simple Javascript function named `greet` that accepts a name and logs a greeting message to the console. This example showcases basic function definition and console output in Javascript. ```javascript // Javascript code example function greet(name) { console.log(`Hello, ${name}!`); } greet('World'); ``` -------------------------------- ### Ruby Greeting Method Source: https://github.com/unhappychoice/mdts/blob/main/sample_documents/features/code-syntax.md A simple Ruby method that takes a name as input and prints a greeting message to the console using string interpolation. ```ruby # Ruby example def say_hello(name) puts "Hello, #{name}!" end say_hello("Ruby") ``` -------------------------------- ### JavaScript Greeting Function Source: https://github.com/unhappychoice/mdts/blob/main/sample_documents/features/code-syntax.md A simple JavaScript function that takes a name as input and logs a greeting message to the console. Demonstrates string interpolation. ```javascript // JavaScript example function greet(name) { console.log(`Hello, ${name}!`); } greet('World'); ``` -------------------------------- ### Raw HTML Code Block Source: https://github.com/unhappychoice/mdts/blob/main/sample_documents/features/inline-html.md A simple HTML paragraph enclosed within a Markdown code block, demonstrating raw HTML content. ```html

This is a raw HTML paragraph.

``` -------------------------------- ### Python Recursive Factorial Function Source: https://github.com/unhappychoice/mdts/blob/main/sample_documents/features/code-syntax.md Implements a recursive function to calculate the factorial of a non-negative integer in Python. Shows how to call the function and print the result. ```python def factorial(n): if n == 0: return 1 else: return n * factorial(n-1) print(factorial(5)) ``` -------------------------------- ### CLI with Custom Options Source: https://github.com/unhappychoice/mdts/blob/main/README.md Starts the mdts CLI tool with custom host, port, and silent mode enabled. This allows specifying the root directory, network host, server port, and controlling log output. ```bash npx mdts --host 0.0.0.0 --port 3000 --silent ``` -------------------------------- ### CSS Styling for Web Elements Source: https://github.com/unhappychoice/mdts/blob/main/sample_documents/features/code-syntax.md Provides basic CSS rules to style HTML elements like the body and headings. Sets font family, margins, padding, and colors. ```css /* CSS example */ body { font-family: Arial, sans-serif; margin: 0; padding: 0; background-color: #f4f4f4; } h1 { color: #333; } ``` -------------------------------- ### Markdown Abbreviation Syntax Source: https://github.com/unhappychoice/mdts/blob/main/sample_documents/features/abbreviations.md Defines abbreviations using Markdown syntax. This allows for short forms to be linked to their full meanings, typically rendered as tooltips on hover in compatible viewers. ```Markdown *[HTML]: HyperText Markup Language *[CSS]: Cascading Style Sheets *[MD]: Markdown ``` -------------------------------- ### Markdown: Table Alignment Source: https://github.com/unhappychoice/mdts/blob/main/sample_documents/features/tables.md Shows how to control text alignment within table columns using colons in the header separator line. Left, center, and right alignments are supported. ```markdown | Left-aligned | Center-aligned | Right-aligned | |:-------------|:--------------:|--------------:| | Left | Center | Right | | Left | Center | Right | ``` -------------------------------- ### Python Fenced Code Block Example Source: https://github.com/unhappychoice/mdts/blob/main/sample_documents/specs/github_flavored.md Demonstrates a basic Python function within a GitHub Flavored Markdown fenced code block. Fenced code blocks are commonly used for code presentation and support syntax highlighting. ```python # Python example def hello_gfm(): print("Hello, GFM!") hello_gfm() ``` -------------------------------- ### Markdown: Tables with Rich Cell Content Source: https://github.com/unhappychoice/mdts/blob/main/sample_documents/features/tables.md Illustrates using Markdown formatting such as bold, italic, and inline code within table cells. This enhances readability and presentation of data. ```markdown | Feature | Description | Example | |---------|-------------|---------| | **Bold** | Emphasize text | `**text**` | | *Italic* | Italicize text | `*text*` | | `Code` | Display code snippet | `` `code` `` | ``` -------------------------------- ### mdts CLI Options Source: https://github.com/unhappychoice/mdts/blob/main/README.md Documentation for the command-line interface options available for the mdts tool. These options control the server's behavior and accessibility. ```APIDOC mdts [directory] [options] Options: Specify the root directory to serve Markdown files from. Defaults to the current directory (.). Example: ./docs --host Specify the network host to listen on. Defaults to 'localhost'. Use '0.0.0.0' to make it accessible from other devices on the network. Example: 0.0.0.0 --port Change the server port. Defaults to 8521. Example: 8000 --silent Suppress server logs from being printed to the console. Example: --silent (or --silent=true) Usage Example: npx mdts docs/ --host 0.0.0.0 --port 8080 --silent ``` -------------------------------- ### Python add function Source: https://github.com/unhappychoice/mdts/blob/main/sample_documents/specs/basic.md A basic Python function named `add` that takes two arguments, `a` and `b`, and returns their sum. This snippet illustrates simple arithmetic operations and function return values in Python. ```python # Python code example def add(a, b): return a + b print(add(5, 3)) ``` -------------------------------- ### Render Markdown Tables Source: https://github.com/unhappychoice/mdts/blob/main/docs/markdown_features.md Demonstrates how to render structured data using Markdown tables. Supports alignment for columns. ```markdown | Name | Age | City | |----------|:---:|----------:| | Alice | 30 | Tokyo | | Bob | 25 | New York | ``` -------------------------------- ### Gantt Chart Source: https://github.com/unhappychoice/mdts/blob/main/sample_documents/features/mermaid.md Defines a Gantt chart for project scheduling, showing tasks, durations, and dependencies over time. It includes date formatting and task sections. ```mermaid gantt dateFormat YYYY-MM-DD title Adding GANTT diagram to mermaid section A section Task A :a1, 2014-01-01, 30d Task B :after a1 , 20d section Another Task C :2014-01-12 , 12d Task D :after a1 , 12d ``` -------------------------------- ### Create Mermaid Diagrams Source: https://github.com/unhappychoice/mdts/blob/main/docs/markdown_features.md Visualizes workflows and diagrams using Mermaid.js syntax directly within Markdown code blocks. ```mermaid graph TD; A[Start] --> B[Process]; B --> C{Decision}; C -->|Yes| D[End]; C -->|No| A; ``` -------------------------------- ### Create Markdown Task Lists Source: https://github.com/unhappychoice/mdts/blob/main/docs/markdown_features.md Enables the creation of interactive checklists within Markdown documents for tracking tasks. Supports checked and unchecked states. ```markdown - [x] Write documentation - [ ] Implement feature ``` -------------------------------- ### Include YAML Frontmatter Source: https://github.com/unhappychoice/mdts/blob/main/docs/markdown_features.md Supports YAML metadata at the beginning of Markdown files for configuration and context, often used for document properties. ```yaml --- title: "Sample Doc" author: "Jane Doe" tags: ["mdts", "docs"] --- ``` -------------------------------- ### Pie Chart Source: https://github.com/unhappychoice/mdts/blob/main/sample_documents/features/mermaid.md Creates a pie chart to visualize data proportions. It assigns values to different slices, representing parts of a whole. ```mermaid pie title Key Lime Pie "Slice A" : 42 "Slice B" : 28 "Slice C" : 15 "Slice D" : 15 ``` -------------------------------- ### Flowchart Diagram Source: https://github.com/unhappychoice/mdts/blob/main/sample_documents/features/mermaid.md Demonstrates a basic flowchart using Mermaid syntax. It shows directional flow with nodes and decision points, illustrating a simple process. ```mermaid graph TD A[Start] --> B{Is it hot?} B -- Yes --> C[Drink water] B -- No --> D[Go outside] C --> E[End] D --> E ``` -------------------------------- ### Git Graph Source: https://github.com/unhappychoice/mdts/blob/main/sample_documents/features/mermaid.md Visualizes a Git commit history using a graph format. It shows commits, branches, and merges in a chronological sequence. ```mermaid gitGraph commit commit branch develop commit commit commit checkout main commit commit merge develop ``` -------------------------------- ### Syntax Highlighting in Code Blocks Source: https://github.com/unhappychoice/mdts/blob/main/docs/markdown_features.md Provides automatic syntax highlighting for code blocks when a language identifier is specified. ```rust fn main() { println!("Hello, mdts!"); } ``` -------------------------------- ### State Diagram Source: https://github.com/unhappychoice/mdts/blob/main/sample_documents/features/mermaid.md Shows a state diagram illustrating the different states an object can be in and the transitions between them. It uses explicit event names for transitions. ```mermaid stateDiagram-v2 [*] --> Still Still --> Moving: EvMove Moving --> Still: EvStop Moving --> Crash: EvCrash Crash --> [*] ``` -------------------------------- ### User Journey Source: https://github.com/unhappychoice/mdts/blob/main/sample_documents/features/mermaid.md Depicts a user journey, mapping out activities and tasks performed by a user over time. It includes sections and assigns tasks to participants. ```mermaid journey title My working day section Go to work Make tea: 5: Me Go upstairs: 3: Me Do work: 1: Me, Cat section Go home Go downstairs: 5: Me Sit down: 3: Me ``` -------------------------------- ### Add Markdown Footnotes Source: https://github.com/unhappychoice/mdts/blob/main/docs/markdown_features.md Allows adding inline references to detailed explanations or sources located at the end of the document. ```markdown Here is some text with a footnote[^1]. [^1]: This is the footnote text. ``` -------------------------------- ### Sequence Diagram Source: https://github.com/unhappychoice/mdts/blob/main/sample_documents/features/mermaid.md Illustrates a sequence diagram to show interactions between participants over time. It uses arrows to represent messages exchanged between entities. ```mermaid sequenceDiagram Alice->>Bob: Hello Bob, how are you? Bob-->>Alice: I am good thanks! Alice->>Bob: Long time no see, next week? Bob->>Alice: Sure! ``` -------------------------------- ### Class Diagram Source: https://github.com/unhappychoice/mdts/blob/main/sample_documents/features/mermaid.md Represents a class diagram showing inheritance, attributes, and methods. It defines relationships between classes and their members. ```mermaid classDiagram Animal <|-- Duck Animal <|-- Fish Animal <|-- Zebra Animal : +int age Animal : +String gender Animal: +isMammal() Animal: +mate() class Duck{ +String beakColor +swim() +quack() } class Fish{ -int sizeInFeet -canEat() } class Zebra{ +bool is_wild +run() } ``` -------------------------------- ### Embed Inline HTML Source: https://github.com/unhappychoice/mdts/blob/main/docs/markdown_features.md Allows direct embedding of raw HTML elements within Markdown content for advanced formatting. ```html This is bold using HTML. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.