Skip to content

Commit

Permalink
Merge pull request #1468 from hydephp/split-out-extensions-documentation
Browse files Browse the repository at this point in the history
Split out extensions documentation
  • Loading branch information
caendesilva authored Nov 24, 2023
2 parents e49ff4c + f5ebd1a commit 34eaffb
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 52 deletions.
33 changes: 33 additions & 0 deletions docs/extensions/extensions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
navigation:
label: "Extensions & Integrations"
groupName: "Extensions & Integrations"
priority: 80
---

# Extensions & Integrations

## HydePHP - Extensible by design

HydePHP is designed to be extensible, and comes with a number of built-in extensions and integrations,
as well as support for third-party extensions and integrations.

## First party extensions & integrations

### Realtime Compiler

The Hyde Realtime Compiler is included with Hyde installations and is what powers the `php hyde serve` command.
- Learn more about the [Realtime Compiler](realtime-compiler) in the documentation.

## Integrations with third-party tools

### Torchlight

Torchlight is an amazing API for syntax highlighting, and is supported natively by HydePHP.
- Learn more about [Torchlight](third-party-integrations#torchlight) in the documentation.

## Contribute

Have an idea for an extension or integration? Let me know! I'd love to hear from you. Get in touch on
[GitHub](https://github.com/hydephp/hyde) or send me a DM on [Twitter](https://twitter.com/CodeWithCaen).
You may also want to look at the [Extension API](extensions-api) documentation to learn how to create extensions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
---
navigation:
label: "Extensions & Integrations"
priority: 28
label: "Realtime Compiler"
priority: 81
---

# Extensions and Integrations

# First party extensions


## Realtime Compiler
# Realtime Compiler

The Hyde Realtime Compiler is included with Hyde installations and is what powers the `php hyde serve` command,
allowing you to preview your static site on a local development server without having to rebuild the site.
Expand Down Expand Up @@ -103,47 +98,3 @@ _The live editor was added in Hyde Realtime Compiler Server v3.2.0 (November 202

- **GitHub**: [hydephp/realtime-compiler](https://github.com/hydephp/realtime-compiler)
- **Packagist**: [hydephp/realtime-compiler](https://packagist.org/packages/hyde/realtime-compiler)

---

# Integrations with third-party tools


## Torchlight

Torchlight is an amazing API for syntax highlighting, and is used by this site. I cannot recommend it highly enough,
especially for documentation sites and code-heavy blogs! As such, HydePHP has built-in support for Torchlight,
which is automatically enabled once you add an API token to your `.env` file. Nothing else needs to be done!

### Getting started

To get started you need an API token which you can get at [Torchlight.dev](https://torchlight.dev/).
It is entirely free for personal and open source projects, as seen on their [pricing page](https://torchlight.dev/#pricing).

When you have an API token, set it in the `.env` file in the root directory of your project.
Once a token is set, Hyde will automatically enable the CommonMark extension.

```env
TORCHLIGHT_TOKEN=torch_<your-api-token>
```

### Attribution and configuration

Note that for the free plan you need to provide an attribution link. Thankfully Hyde injects a customizable link
automatically to all pages that use Torchlight. You can of course disable and customize this in the `config/torchlight.php` file.

```php
'attribution' => [
'enabled' => true,
'markdown' => 'Syntax highlighting by <a href="https://torchlight.dev/" rel="noopener nofollow">Torchlight.dev</a>',
],
```

Don't have this file? Run `php hyde vendor:publish` to publish it.


## Contribute

Have an idea for an extension or integration? Let me know! I'd love to hear from you.

Get in touch on [GitHub](https://github.com/hydephp/hyde) or send me a DM on [Twitter](https://twitter.com/CodeWithCaen).
40 changes: 40 additions & 0 deletions docs/extensions/third-party-integrations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
navigation:
label: "Third-Party Integrations"
priority: 85
---

# Integrations with third-party tools

## Torchlight

Torchlight is an amazing API for syntax highlighting, and is used by this site. I cannot recommend it highly enough,
especially for documentation sites and code-heavy blogs! As such, HydePHP has built-in support for Torchlight,
which is automatically enabled once you add an API token to your `.env` file. Nothing else needs to be done!

### Getting started

To get started you need an API token which you can get at [Torchlight.dev](https://torchlight.dev/).
It is entirely free for personal and open source projects, as seen on their [pricing page](https://torchlight.dev/#pricing).

When you have an API token, set it in the `.env` file in the root directory of your project.
Once a token is set, Hyde will automatically enable the CommonMark extension.

```env
TORCHLIGHT_TOKEN=torch_<your-api-token>
```

### Attribution and configuration

Note that for the free plan you need to provide an attribution link. Thankfully Hyde injects a customizable link
automatically to all pages that use Torchlight. You can of course disable and customize this in the `config/torchlight.php` file.

```php
'attribution' => [
'enabled' => true,
'markdown' => 'Syntax highlighting by <a href="https://torchlight.dev/" rel="noopener nofollow">Torchlight.dev</a>',
],
```

Don't have this file? Run `php hyde vendor:publish` to publish it.

0 comments on commit 34eaffb

Please sign in to comment.