Skip to content

Commit

Permalink
1.3.x docs
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminHoegh committed Aug 26, 2024
1 parent 2459750 commit 4491fa4
Show file tree
Hide file tree
Showing 24 changed files with 1,195 additions and 6 deletions.
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
"typecheck": "tsc"
},
"dependencies": {
"@docusaurus/core": "^3.5.0",
"@docusaurus/preset-classic": "^3.5.0",
"@docusaurus/theme-mermaid": "^3.5.0",
"@docusaurus/core": "^3.5.2",
"@docusaurus/preset-classic": "^3.5.2",
"@docusaurus/theme-mermaid": "^3.5.2",
"@mdx-js/react": "^3.0.0",
"clsx": "^2.0.0",
"prism-react-renderer": "^2.3.0",
Expand All @@ -27,9 +27,9 @@
"remark-math": "^6.0.0"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "^3.5.0",
"@docusaurus/tsconfig": "^3.5.0",
"@docusaurus/types": "^3.5.0",
"@docusaurus/module-type-aliases": "^3.5.2",
"@docusaurus/tsconfig": "^3.5.2",
"@docusaurus/types": "^3.5.2",
"typescript": "~5.2.2"
},
"browserslist": {
Expand Down
77 changes: 77 additions & 0 deletions versioned_docs/version-1.3.x/Configuration/Abbreviations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
---
title: Abbreviations
---

# Abbreviations

## Description

The Abbreviations feature provides automatic detection and formatting of abbreviations within your Markdown content. By wrapping abbreviations in `<abbr>` tags, it enhances text comprehension and accessibility, allowing users to see the full meaning of abbreviations on hover.

## Configuration Syntax

To configure the Abbreviations feature, use the `config()->set()` and `config()->get()` methods:

### Getting the Current Configuration

To retrieve the current configuration for the Abbreviations feature:

```php
$configValue = config()->get('abbreviations');
```

### Setting the Configuration

To adjust the Abbreviations feature, use:

```php
config()->set('abbreviations', (bool|array) $value);
```

- `$value` can be a boolean to enable or disable the feature globally, or an array for more detailed configuration options.

## Configuration Options

The Abbreviations feature supports the following settings:

- **allow_custom** (bool): Allows the definition of custom abbreviations directly within your Markdown content. This option is enabled by default.
- **predefined** (array): Provides a list of predefined abbreviations and their full meanings to ensure consistency across your documents.

## Examples

### Disable Abbreviations

To completely disable the processing of abbreviations:

```php
$ParsedownExtended->config()->set('abbreviations', false);
```

### Predefine Abbreviations

To set up a predefined list of abbreviations:

```php
$ParsedownExtended->config()->set('abbreviations', [
'predefined' => [
'CSS' => 'Cascading Style Sheets',
'HTML' => 'HyperText Markup Language',
'JS' => 'JavaScript',
],
]);
```

### Use Predefined Abbreviations Only

To restrict usage to only predefined abbreviations and disable custom abbreviations:

```php
$ParsedownExtended->config()->set('abbreviations', [
'allow_custom' => false,
'predefined' => [
'CSS' => 'Cascading Style Sheets',
'HTML' => 'HyperText Markup Language',
'JS' => 'JavaScript',
],
]);
```
57 changes: 57 additions & 0 deletions versioned_docs/version-1.3.x/Configuration/Code.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
title: Code
---

# Code

## Description

Code snippets within Markdown documents can be presented in two distinct styles: inline and block. Inline code is used for highlighting code or commands within a sentence, whereas block code is suited for larger code excerpts or examples that should stand apart from the main text. ParsedownExtended enhances the management of both inline and block code snippets, offering configurable settings to fine-tune their processing and presentation.

## Configuration Syntax

To configure the code processing settings, use the `config()->set()` and `config()->get()` methods:

### Getting the Current Configuration

To retrieve the current configuration for code processing:

```php
$configValue = $ParsedownExtended->config()->get('code');
```

### Setting the Configuration

To adjust the code processing settings:

```php
$ParsedownExtended->config()->set('code', (bool|array) $value);
```

- `$value` is a boolean indicating whether inline code processing is enabled (`true`) or disabled (`false`). Alternatively, you can use an array for more detailed configuration options. By default, inline code formatting is usually enabled.

## Examples

### Disabling All Code Processing

To disable the processing of all code, including both inline and block code:

```php
$ParsedownExtended->config()->set('code', false);
```

### Disabling Inline Code

To disable the formatting of inline code, preventing text surrounded by backticks from being rendered distinctly:

```php
$ParsedownExtended->config()->set('code.inline', false);
```

### Disabling Block Code

To disable the processing of block code, which is usually delimited by triple backticks or indentation:

```php
$ParsedownExtended->config()->set('code.block', false);
```
51 changes: 51 additions & 0 deletions versioned_docs/version-1.3.x/Configuration/Comments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
title: Comments
---

# Comments

## Description

The Comments feature in Markdown allows you to include notes or annotations within your content that won't be rendered in the final output. This is useful for adding explanations or reminders that are visible in the source but invisible to the end user. ParsedownExtended provides options to enable or disable the processing of comments within your Markdown files.

## Configuration Syntax

To configure the Comments feature, use the `config()->set()` and `config()->get()` methods:

### Getting the Current Configuration

To retrieve the current configuration for comment processing:

```php
$configValue = $ParsedownExtended->config()->get('comments');
```

### Setting the Configuration

To adjust the Comments feature:

```php
$ParsedownExtended->config()->set('comments', (bool) $value);
```

- `$value` is a boolean indicating whether comment processing is enabled (`true`) or disabled (`false`). By default, comment processing may be enabled or disabled based on your system's settings.

## Examples

### Disabling Comments

To disable the processing of comments in Markdown, preventing any comments from being included in the source:

```php
$ParsedownExtended->config()->set('comments', false);
```

### Enabling Comments

To enable the processing of comments, allowing annotations to be included in your Markdown files but not rendered in the final output:

```php
$ParsedownExtended->config()->set('comments', true);
```

This configuration will ensure that any comments added within the Markdown using the appropriate syntax will be processed accordingly, following your specified settings.
43 changes: 43 additions & 0 deletions versioned_docs/version-1.3.x/Configuration/Definition Lists.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
title: Definition Lists
---

# Definition Lists

## Description

Definition lists allow for the organization of terms and their corresponding definitions in a structured format. This functionality enables authors to create glossaries or specify key concepts with descriptions directly within their Markdown content. While the capability to interpret definition list syntax comes from Parsedown, ParsedownExtended provides enhanced support by allowing users to easily enable or disable this feature through its configuration settings.

## Configuration Syntax

To configure the processing of definition lists in your Markdown, use the `config()->set()` and `config()->get()` methods:

### Getting the Current Configuration

To retrieve the current configuration for definition list processing:

```php
$configValue = $ParsedownExtended->config()->get('definition_lists');
```

### Setting the Configuration

To adjust the processing of definition lists:

```php
$ParsedownExtended->config()->set('definition_lists', (bool) $value);
```

- `$value` is a boolean indicating whether definition lists should be processed (`true`) or ignored (`false`).

## Examples

### Disable Definition Lists

To prevent the automatic processing of definition lists, thereby disabling the feature:

```php
$ParsedownExtended->config()->set('definition_lists', false);
```

This configuration allows you to control whether definition lists are recognized and formatted within your Markdown content based on your specific needs.
68 changes: 68 additions & 0 deletions versioned_docs/version-1.3.x/Configuration/Diagrams.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
title: Diagrams
---

# Diagrams

## Description

ParsedownExtended introduces support for incorporating diagrams directly into Markdown documents, enhancing visual representation and understanding. This feature recognizes syntax intended for diagram rendering, specifically designed to work with [ChartJS](https://www.chartjs.org) and [Mermaid](https://mermaid-js.github.io/mermaid/). ParsedownExtended ensures that diagram code is preserved and remains unaltered for client-side rendering, requiring the inclusion of ChartJS and Mermaid JavaScript libraries in your project.

```mermaid
graph TD;
A-->B;
A-->C;
B-->D;
C-->D;
```

## Configuration Syntax

To enable the diagrams feature in ParsedownExtended, use the `config()->set()` and `config()->get()` methods:

### Getting the Current Configuration

To retrieve the current configuration for diagram support:

```php
$configValue = $ParsedownExtended->config()->get('diagrams');
```

### Setting the Configuration

To adjust the diagram processing settings:

```php
$ParsedownExtended->config()->set('diagrams', (bool|array) $value);
```

- `$value` can be a boolean to enable or disable diagram support globally, or an array for more specific configuration options.

## Configuration Options

This feature allows the following settings:

- **chartjs**: Enable or disable support for ChartJS diagrams.
- **mermaid**: Enable or disable support for Mermaid diagrams.

## Examples

### Enable Diagrams

To activate diagram support, ensuring that Markdown containing ChartJS or Mermaid syntax is properly recognized and left intact for client-side rendering:

```php
$ParsedownExtended->config()->set('diagrams', true);
```

### Disable a Specific Diagram Type

To disable support for a specific diagram type, such as ChartJS:

```php
$ParsedownExtended->config()->set('diagrams', [
'chartjs' => false
]);
```

This configuration allows you to control how diagram syntax is handled within your Markdown content, ensuring that it is processed according to your project’s requirements.
61 changes: 61 additions & 0 deletions versioned_docs/version-1.3.x/Configuration/Emojis.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
title: Emojis
---

# Emojis

## Description

ParsedownExtended enriches Markdown documents with the capability to insert emojis using shortcodes, a feature that enhances readability and emotional expression within text. Shortcodes, which are emoji names enclosed in colons (e.g., `:smile:`), are automatically converted into their corresponding emoji characters, allowing for a more engaging and visually appealing document.

## Configuration Syntax

To enable or disable emoji shortcodes in ParsedownExtended, use the `config()->set()` and `config()->get()` methods:

### Getting the Current Configuration

To retrieve the current configuration for emoji shortcodes:

```php
$configValue = $ParsedownExtended->config()->get('emojis');
```

### Setting the Configuration

To adjust the emoji shortcode processing:

```php
$ParsedownExtended->config()->set('emojis', (bool) $value);
```

- `$value` is a boolean indicating whether emoji shortcodes should be processed (`true`) or not (`false`).

## Examples

### Enable Emoji Shortcodes

To enable the interpretation and conversion of emoji shortcodes into actual emojis:

```php
$ParsedownExtended->config()->set('emojis', true);
```

### Usage Example

Incorporate emojis into your Markdown by using shortcodes:

**Markdown Input:**

```markdown
Gone camping! :tent: Be back soon.

That is so funny! :joy:
```

**Rendered Output:**

Gone camping! ⛺ Be back soon.

That is so funny! 😂

This setup allows you to easily control whether emojis are converted from shortcodes within your Markdown content, helping you create more expressive and visually appealing documents.
Loading

0 comments on commit 4491fa4

Please sign in to comment.