Skip to content

Commit

Permalink
Merge branch 'master' into realtime-compiler-live-edit
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Nov 14, 2023
2 parents 8ca06ba + 132c5f7 commit ee6e9b7
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 15 deletions.
1 change: 1 addition & 0 deletions docs/creating-content/documentation-pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ navigation menu items are hidden. The page will still be accessible as normal bu

The Realtime Compiler that powers the `php hyde serve` command will automatically generate a fresh search index each time the browser requests it.


## Automatic "Edit Page" button

### Introduction
Expand Down
8 changes: 2 additions & 6 deletions docs/digging-deeper/customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ Learn more in the [Navigation Menu](navigation-menus) documentation.
#### Customizing the documentation sidebar

- To customize the sidebar, use the setting `sidebar_order` in the `docs.php` config.
- When customizing the sidebar, can use the route key, or just the [page identifier](core-concepts#page-identifiers) of the page.
- When customizing the sidebar, can use the route key, or just the [page identifier](core-concepts#page-identifiers) of the page.

Learn more in the [Documentation Pages](documentation-pages) documentation.

Expand All @@ -231,7 +231,7 @@ However, some pages are autoconfigured to have a lower priority, for example, th

#### Basic syntax for changing the priorities

The cleanest way is to use the list-style syntax where each item will get the priority calculated according to its position in the list, plus an offset of `500`.
The cleanest way is to use the list-style syntax where each item will get the priority calculated according to its position in the list, plus an offset of `500`.
The offset is added to make it easier to place pages earlier in the list using front matter or with explicit priority settings.

```php
Expand Down Expand Up @@ -316,7 +316,6 @@ navigation:
hidden: true
---


#### Adding Custom Navigation Menu Links

You can easily add custom navigation menu links similar how we add Authors. Simply add a `NavItem` model to the `navigation.custom` array.
Expand Down Expand Up @@ -354,14 +353,12 @@ php hyde publish:views

The files will then be available in the `resources/views/vendor/hyde` directory.


## Frontend Styles

Hyde is designed to not only serve as a framework but a whole starter kit and comes with a Tailwind starter template
for you to get up and running quickly. If you want to customize these, you are free to do so.
Please see the [Managing Assets](managing-assets) page to learn more.


## Markdown Configuration

Hyde uses [League CommonMark](https://commonmark.thephpleague.com/) for converting Markdown into HTML, and
Expand Down Expand Up @@ -424,7 +421,6 @@ arbitrary PHP code specified in Markdown to be executed. It's easy to enable how

See the [Blade in Markdown](advanced-markdown#blade-support) documentation for more information on how to use this feature.


## YAML Configuration

The settings in the `config/hyde.php` file can also be set by using a `hyde.yml` file in the root of your project directory.
Expand Down
46 changes: 37 additions & 9 deletions docs/digging-deeper/extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,55 @@ navigation:

# Extensions and Integrations

## First party extensions
# First party extensions

### Realtime Compiler

The Hyde Realtime Compiler is now included with Hyde
installations and is what powers the `php hyde serve` command.
## 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.

### Usage

To start the server, run the following command from a terminal in your project directory:

```bash
php hyde serve
```

This will start a local development server at `http://localhost:8080`

### Configuration

The server can be configured in the `config/hyde.php` file to change the port, host, and to customize its features.

```php
// filepath config/hyde.php

'server' => [
'port' => env('SERVER_PORT', 8080),
'host' => env('SERVER_HOST', 'localhost'),
'save_preview' => true,
],
```

### Source code

- **GitHub**: [hydephp/realtime-compiler](https://github.com/hydephp/realtime-compiler)
- **Packagist**: [hydephp/realtime-compiler](https://packagist.org/packages/hyde/realtime-compiler)
- **YouTube video**: [Introducing the Hyde Realtime Compiler](https://www.youtube.com/watch?v=1ZM4fQMKi64)

---

# Integrations with third-party tools

## Integrations with third-party tools

### Torchlight
## 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
### 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).
Expand All @@ -38,7 +66,7 @@ Once a token is set, Hyde will automatically enable the CommonMark extension.
TORCHLIGHT_TOKEN=torch_<your-api-token>
```

#### Attribution and configuration
### 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.
Expand Down

0 comments on commit ee6e9b7

Please sign in to comment.