Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
1b72c55
Create HydeFront-v4-plan.md
emmadesilva Nov 15, 2024
2722124
Update HydeFront-v4-plan.md
emmadesilva Nov 15, 2024
1fbae95
Remove x-cloak style from app CSS as we have it in the head HTML
emmadesilva Nov 15, 2024
7fa3711
Track changes made
emmadesilva Nov 15, 2024
7704dca
Revert "Track changes made"
emmadesilva Nov 15, 2024
65943c4
Replace `x-uncloak-md` class with pure Tailwind
emmadesilva Nov 15, 2024
bb3324e
Remove now empty `alpine.scss` file
emmadesilva Nov 15, 2024
1ee06c4
Replace the sidebar toggle styles with pure Tailwind
emmadesilva Nov 15, 2024
68e9fa7
Remove now empty `sidebar-toggle.scss` file
emmadesilva Nov 15, 2024
0e43590
Tweak sidebar toggle styles to blend in better
emmadesilva Nov 15, 2024
92c4d11
Recreate improved sidebar toggle button
emmadesilva Nov 15, 2024
712cf95
Define table of contents styles with Tailwind
emmadesilva Nov 15, 2024
48bdd88
Define heading permalink styles with Tailwind
emmadesilva Nov 16, 2024
c6dc8bd
Update code comments
emmadesilva Nov 16, 2024
4575d7f
Merge branch 'new-asset-system' into refactor-hydefront-styles-to-tai…
emmadesilva Nov 16, 2024
c9db18c
Begin recreating the HydeSearch plugin with Alpine
emmadesilva Nov 16, 2024
4772fd1
Delete now unused `search.scss` file
emmadesilva Nov 16, 2024
1db8107
Add top margin
emmadesilva Nov 16, 2024
c6a2c77
Hide horizontal overflow
emmadesilva Nov 16, 2024
b903795
Tweak colors
emmadesilva Nov 16, 2024
531c4a0
Remove the debounce
emmadesilva Nov 16, 2024
8089425
Use indigo styles
emmadesilva Nov 16, 2024
4d739f2
Remove prose style
emmadesilva Nov 16, 2024
96bc412
Fix spacing issue
emmadesilva Nov 16, 2024
cabd5a4
Tweak styles
emmadesilva Nov 16, 2024
fe4cdb9
Tweak margin
emmadesilva Nov 16, 2024
cf17e40
Increase contrast
emmadesilva Nov 16, 2024
835fcea
Revert "Tweak margin"
emmadesilva Nov 16, 2024
fc9e2c0
Compile assets
emmadesilva Nov 16, 2024
0e46a13
Update RELEASE_NOTES.md
emmadesilva Nov 16, 2024
cf0dc9b
Merge HydeSearch Blade views into single component
emmadesilva Nov 16, 2024
dbf8cde
Remove noscript tag from search plugin
emmadesilva Nov 16, 2024
0c591b2
Format Blade
emmadesilva Nov 16, 2024
7c811e0
Manually reformat Blade
emmadesilva Nov 16, 2024
cf42f2a
Cleanup Blade
emmadesilva Nov 16, 2024
84d6537
Simplify modal layout styles
emmadesilva Nov 16, 2024
73e9067
Hide search footer when there are results
emmadesilva Nov 16, 2024
93bd9b9
Tweak margins
emmadesilva Nov 16, 2024
5cefc0b
Add padding and negative margin to get nicer focus states
emmadesilva Nov 16, 2024
fa1037b
Move font weight rule to heading
emmadesilva Nov 16, 2024
ffee3b3
Update and clean up the search feature documentation
emmadesilva Nov 16, 2024
8ebf91d
Tweak full page search styles
emmadesilva Nov 16, 2024
b592ae0
Fix not prose styles
emmadesilva Nov 16, 2024
cc796dd
Rename search widget component to search modal
emmadesilva Nov 16, 2024
5782c86
Fix Blade formatting
emmadesilva Nov 16, 2024
1f4e3d4
Merge pull request #2029 from hydephp/recreate-the-hydesearch-plugin-…
emmadesilva Nov 16, 2024
4cf461c
Extract file for the main HydeSearch script
emmadesilva Nov 16, 2024
6cf331c
Support overloading the script file
emmadesilva Nov 16, 2024
4007f9d
Remove export default
emmadesilva Nov 16, 2024
e27580b
Fix formatting
emmadesilva Nov 16, 2024
53c9ffb
Update RELEASE_NOTES.md
emmadesilva Nov 16, 2024
716c3c0
Move markup to template so Tailwind can find it
emmadesilva Nov 16, 2024
cf4d641
Rename file to HydeSearch
emmadesilva Nov 16, 2024
8b6ab34
Update RELEASE_NOTES.md
emmadesilva Nov 16, 2024
f814d4f
Merge pull request #2031 from hydephp/recreate-the-hydesearch-plugin-…
emmadesilva Nov 16, 2024
1241a39
Update app.css
emmadesilva Nov 16, 2024
4ea7de9
Merge branch 'new-asset-system' into refactor-hydefront-styles-to-tai…
emmadesilva Nov 16, 2024
8c0bddf
Add documentation page smooth scrolling using Tailwind
emmadesilva Nov 17, 2024
8c7a56b
Remove now empty `hyde-docs.scss` file
emmadesilva Nov 17, 2024
540ee94
Merge branch 'new-asset-system' into refactor-hydefront-styles-to-tai…
emmadesilva Nov 17, 2024
db829ce
Sync app stylesheets
emmadesilva Nov 17, 2024
7370623
Remove the `.torchlight-enabled` CSS class
emmadesilva Nov 17, 2024
9f6aec4
Move opinionated styles to Tailwind config
emmadesilva Nov 17, 2024
c315434
Update Markdown codeblocks to match Torchlight background color
emmadesilva Nov 17, 2024
2342078
Match base pre element styles to Torchlight base
emmadesilva Nov 17, 2024
fcf8c69
Define Torchlight styles in the Tailwind source file
emmadesilva Nov 17, 2024
baaf8de
Normalize padding between normal and Torchlight code blocks
emmadesilva Nov 17, 2024
db08205
Refactor code block file path labels to Tailwind
emmadesilva Nov 17, 2024
71b5b71
Update RELEASE_NOTES.md
emmadesilva Nov 17, 2024
7806047
Add parameter to dynamically set position for label
emmadesilva Nov 17, 2024
3d54a65
Scope styles to only inline code spans
emmadesilva Nov 17, 2024
77af72a
Adjust positioning for Torchlight label
emmadesilva Nov 17, 2024
3a92381
Refactor to use the class directive
emmadesilva Nov 17, 2024
250b3e1
Merge pull request #2036 from hydephp/normalize-code-block-styles-and…
emmadesilva Nov 17, 2024
b238280
Refactor colored blockquotes styles to Tailwind
emmadesilva Nov 17, 2024
2900eb5
Delete hyde.scss
emmadesilva Nov 17, 2024
14f38ce
Delete hyde.css
emmadesilva Nov 17, 2024
e961109
Remove HydeFront main file
emmadesilva Nov 17, 2024
3be04e5
Remove HydeFront build scripts
emmadesilva Nov 17, 2024
9926df8
Remove HydeFront dev dependencies
emmadesilva Nov 17, 2024
68436ac
Remove references to removed hyde.css file
emmadesilva Nov 17, 2024
6a0b638
Deprecate helper method which may become obsolete
emmadesilva Nov 17, 2024
0bd07ed
Update script for removed hyde.css file
emmadesilva Nov 17, 2024
14387ab
Rebuild Tailwind assets without HydeFront
emmadesilva Nov 17, 2024
cea9e1f
Simplify script as the build file no longer needs to be verified
emmadesilva Nov 17, 2024
6d2090f
Remove removed option usage
emmadesilva Nov 17, 2024
ae435af
Update tests for removed hyde.css file
emmadesilva Nov 17, 2024
6e5bed4
Remove removed build steps from internal documentation
emmadesilva Nov 17, 2024
2034b01
Update RELEASE_NOTES.md
emmadesilva Nov 17, 2024
9f44330
Remove HydeFront assets build step
emmadesilva Nov 17, 2024
a12b565
Remove HydeFront workflows as there is no longer anything to build
emmadesilva Nov 17, 2024
3c42843
Merge pull request #2037 from hydephp/remove-the-hyde-css-file-from-h…
emmadesilva Nov 17, 2024
6239753
Remove linting workflow with no effect from the subpackage
emmadesilva Nov 17, 2024
79ae75f
Remove badge for removed workflow
emmadesilva Nov 17, 2024
4aee3cd
Delete HydeFront-v4-plan.md
emmadesilva Nov 17, 2024
13f2c70
Extract HydeFront partials
emmadesilva Nov 17, 2024
16fa89c
Add component styles in the components layer to ensure proper precedence
emmadesilva Nov 17, 2024
93e0b54
Update managing-assets.md
emmadesilva Nov 17, 2024
f1cc135
Update managing-assets.md
emmadesilva Nov 17, 2024
0d12c51
Revert "Add component styles in the components layer to ensure proper…
emmadesilva Nov 17, 2024
7d631f3
Normalize formatting
emmadesilva Nov 17, 2024
13be44b
Tweak Tailwind setup for more stable cascade
emmadesilva Nov 17, 2024
8838fe0
Simplify styling setup to not need cascade at all
emmadesilva Nov 17, 2024
9304b31
Remove style rule with no effect
emmadesilva Nov 17, 2024
eabe05b
Tweak positioning for changed styles
emmadesilva Nov 17, 2024
353987e
Update RELEASE_NOTES.md
emmadesilva Nov 17, 2024
649bbe9
Improve wording
emmadesilva Nov 17, 2024
fbd70d9
Merge pull request #2038 from hydephp/extract-hydefront-partials-for-…
emmadesilva Nov 17, 2024
6ac8c27
Update RELEASE_NOTES.md
emmadesilva Nov 17, 2024
7e65fd6
Update RELEASE_NOTES.md
emmadesilva Nov 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 0 additions & 35 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,41 +109,6 @@ jobs:
run: php monorepo/scripts/tests/${{ matrix.script }}.php


build-hydefront-assets:

runs-on: ubuntu-latest
needs: run-smoke-tests

steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
cache: 'npm'

- name: Install Node.js dependencies
working-directory: 'packages/hydefront'
run: npm ci

- name: Build assets for production
working-directory: 'packages/hydefront'
run: npm run build

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: 'hydefront'
path: 'packages/hydefront/dist'

- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
add: 'packages/hydefront/dist'
message: 'Compile HydeFront assets for production'
new_branch: compile-hydefront


build-tailwindcss:

runs-on: ubuntu-latest
Expand Down
16 changes: 16 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ This serves two purposes:
- The realtime compiler now only serves assets from the media source directory (`_media`), and no longer checks the site output directory (`_site/media`) in https://github.com/hydephp/develop/pull/2012
- **Breaking:** Replaced `--run-dev` and `--run-prod` build command flags with a single `--run-vite` flag that uses Vite to build assets in https://github.com/hydephp/develop/pull/2013
- Moved the Vite build step to run before the site build to prevent duplicate media asset transfers in https://github.com/hydephp/develop/pull/2013
- Ported the HydeSearch plugin used for the documentation search to be an Alpine.js implementation in https://github.com/hydephp/develop/pull/2029
- Renamed Blade component `hyde::components.docs.search-widget` to `hyde::components.docs.search-modal` in https://github.com/hydephp/develop/pull/2029
- Added support for customizing the search implementation by creating a `resources/js/HydeSearch.js` file in https://github.com/hydephp/develop/pull/2031
- Normalized default Tailwind Typography Prose code block styles to match Torchlight's theme, ensuring consistent styling across Markdown and Torchlight code blocks in https://github.com/hydephp/develop/pull/2036.
- Extracted CSS component partials in HydeFront in https://github.com/hydephp/develop/pull/2038
- Replaced HydeFront styles with Tailwind in https://github.com/hydephp/develop/pull/2024

### Deprecated

Expand All @@ -121,6 +127,10 @@ This serves two purposes:
- Removed `Hyde::siteMediaPath()` method replaced by `MediaFile::outputPath()` in https://github.com/hydephp/develop/pull/1911
- Removed Laravel Mix as a dependency in https://github.com/hydephp/develop/pull/2010 (replaced with Vite)
- **Breaking:** Removed `npm run prod` command (replaced with `npm run build`)
- Removed CDN include for the HydeSearch plugin replaced by Alpine.js implementation in https://github.com/hydephp/develop/pull/2029
- This also removes the `<x-hyde::docs.search-input />` and `<x-hyde::docs.search-scripts />` Blade components, replaced by the new `<x-hyde::docs.hyde-search />` component.
- Removed the `.torchlight-enabled` CSS class in https://github.com/hydephp/develop/pull/2036.
- Removed The `hyde.css` file from HydeFront in https://github.com/hydephp/develop/pull/2037 as all styles were refactored to Tailwind in https://github.com/hydephp/develop/pull/2024.

### Fixed

Expand All @@ -138,6 +148,12 @@ This serves two purposes:
- Simplified the asset file locator to only serve files from the media source directory in https://github.com/hydephp/develop/pull/2012
- Added Vite HMR support in https://github.com/hydephp/develop/pull/2016

#### HydeFront

- Removed all Sass styles after porting everything to Tailwind in https://github.com/hydephp/develop/pull/2024
- Removed the `hyde.css` file in https://github.com/hydephp/develop/pull/2037 as all its styles were refactored to Tailwind in https://github.com/hydephp/develop/pull/2024
- Extracted CSS component partials in https://github.com/hydephp/develop/pull/2038

### Upgrade Guide

Please see the "Breaking changes & upgrade guide" section below for more information.
Expand Down
2 changes: 1 addition & 1 deletion _media/app.css

Large diffs are not rendered by default.

32 changes: 23 additions & 9 deletions docs/creating-content/documentation-pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -351,11 +351,13 @@ If you set this to false, Hyde will match the directory structure of the source

### Introduction

The HydeSearch plugin adds a search feature to documentation pages. It consists of two parts, a search index generator that runs during the build command, and a frontend JavaScript plugin that adds the actual search widget.
Hyde includes a built-in search feature for documentation pages powered by Alpine.js. It consists of two parts:
1. A search index generator that runs during the build command
2. An Alpine.js powered frontend that provides the search interface

>info Tip: The HydeSearch plugin is what powers the search feature on this site! Why not [try it out](search)?
>info Tip: The search feature is what powers the search on this site! Why not [try it out](search)?

The search feature is enabled by default. You can disable it by removing the `DocumentationSearch` option from the Hyde `Features` config array.
The search feature is enabled by default. You can disable it by removing the `DocumentationSearch` option from the Hyde `Features` config array:

```php
// filepath: config/hyde.php
Expand All @@ -366,17 +368,27 @@ The search feature is enabled by default. You can disable it by removing the `Do

### Using the Search

The search works by generating a JSON search index which the JavaScript plugin loads asynchronously.
The search works by generating a JSON search index which Alpine.js loads asynchronously. There are two ways to access the search:

Two ways to access the search are added, one is a full page search screen that will be saved to `docs/search.html`.

The second method is a button added to the documentation pages, similar to how Algolia DocSearch works. Opening it will open a modal with an integrated search screen. You can also open the dialog using the keyboard shortcut `/`.
1. A full-page search screen at `docs/search.html`
2. A modal dialog accessible via a button in the documentation pages (similar to Algolia DocSearch). You can also open this dialog using the keyboard shortcut `/`

>info The full page can be disabled by setting `create_search_page` to `false` in the `docs` config.

### Search Features

The search implementation includes:
- Real-time search results as you type
- Context highlighting of search terms
- Match counting and search timing statistics
- Dark mode support
- Loading state indicators
- Keyboard navigation support
- Mobile-responsive design

### Hiding Pages from Indexing

If you have a large page on your documentation site, like a changelog, you may want to hide it from the search index. You can do this by adding the page identifier to the `exclude_from_search` array in the `docs` config, similar to how navigation menu items are hidden. The page will still be accessible as normal but will not be added to the search index JSON file.
For large pages like changelogs, you may want to exclude them from the search index. Add the page identifier to the `exclude_from_search` array in the docs config:

```php
// filepath: config/docs.php
Expand All @@ -385,9 +397,11 @@ If you have a large page on your documentation site, like a changelog, you may w
]
```

The page will remain accessible but won't appear in search results.

### Live Search with the Realtime Compiler

The Realtime Compiler that powers the `php hyde serve` command will automatically generate a fresh search index each time the browser requests it.
When using `php hyde serve`, the Realtime Compiler automatically generates a fresh search index each time it's requested, ensuring your search results stay current during development.

## Automatic "Edit Page" Button

Expand Down
10 changes: 8 additions & 2 deletions docs/creating-content/managing-assets.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ With Hyde, **you don't have to do it**, in fact, you can skip this entire page i
But as always with Hyde, you can customize everything if you want to.

Hyde ships with a complete frontend using Blade views, TailwindCSS styles, and Alpine.js interactions.
Some extra custom styles are made in the HydeFront package, which is pre-installed and bundled in the pre-configured Tailwind and Vite setup.
Some extra component styles are organized into modular files in the HydeFront package, which is pre-installed and bundled in the pre-configured Tailwind and Vite setup.

To get you started quickly, all the styles are already compiled and minified into `_media/app.css`,
which will be copied to the `_site/media/app.css` directory when you run `php hyde build`.
Expand All @@ -26,7 +26,7 @@ No, it is optional. All the compiled styles that you need are already installed,

### When Should Assets be Compiled?

The `_media/app.css` file that comes with Hyde contains TailwindCSS for all classes that are used in the default Blade views, as well as the HydeFront custom styles.
The `_media/app.css` file that comes with Hyde contains TailwindCSS for all classes that are used in the default Blade views, as well as the HydeFront component styles.
If you want to customize the Tailwind settings or add custom styles, you will need to recompile the styles yourself.

For example, if you customize the Blade views and add new classes or add new classes in Blade-based pages, you may need to compile the assets yourself to get the new styles.
Expand Down Expand Up @@ -66,6 +66,12 @@ When running the `npm run dev/prod` command, Vite will compile the `resources/as

The compiled assets will then be automatically copied to `_site/media` when you run `php hyde build`.

### Customizing HydeFront Components

HydeFront components are modular and can be easily customized to fit your needs.

You can either remove the import of the component you want to customize and replace it with your own styles, or keep the import and add overriding styles after it (since CSS cascade order matters).

## Telling Hyde where to find assets

### Customizing the Blade templates
Expand Down
7 changes: 3 additions & 4 deletions monorepo/docs/hydefront.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Internal HydeFront documentation

## Building and creating a new HydeFront version
## Creating a new HydeFront version

### Prerequisites

Expand Down Expand Up @@ -28,15 +28,14 @@ cd ../../
npm link hydefront
```

### Build and setup
### Setup

```bash
cd packages/hydefront
git pull origin master
npm run build
```

### Build, version, and publish
### Version and publish

Head back to the monorepo root and run the following command to bump the version of the HydeFront package:

Expand Down
17 changes: 8 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

78 changes: 78 additions & 0 deletions packages/framework/resources/js/HydeSearch.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
function initHydeSearch(searchIndexUrl) {
return {
searchIndex: [],
searchTerm: '',
results: [],
isLoading: true,
statusMessage: '',

async init() {
const response = await fetch(searchIndexUrl);
if (!response.ok) {
console.error('Could not load search index');
return;
}
this.searchIndex = await response.json();
this.isLoading = false;
},

search() {
const startTime = performance.now();
this.results = [];

if (!this.searchTerm) {
this.statusMessage = '';
window.dispatchEvent(new CustomEvent('search-results-updated', { detail: { hasResults: false } }));
return;
}

const searchResults = this.searchIndex.filter(entry =>
entry.title.toLowerCase().includes(this.searchTerm.toLowerCase()) ||
entry.content.toLowerCase().includes(this.searchTerm.toLowerCase())
);

if (searchResults.length === 0) {
this.statusMessage = 'No results found.';
window.dispatchEvent(new CustomEvent('search-results-updated', { detail: { hasResults: false } }));
return;
}

const totalMatches = searchResults.reduce((acc, result) => {
return acc + (result.content.match(new RegExp(this.searchTerm, 'gi')) || []).length;
}, 0);

searchResults.sort((a, b) => {
return (b.content.match(new RegExp(this.searchTerm, 'gi')) || []).length
- (a.content.match(new RegExp(this.searchTerm, 'gi')) || []).length;
});

this.results = searchResults.map(result => {
const matches = (result.content.match(new RegExp(this.searchTerm, 'gi')) || []).length;
const context = this.getSearchContext(result.content);
return { ...result, matches, context };
});

const timeMs = Math.round((performance.now() - startTime) * 100) / 100;
this.statusMessage = `Found ${totalMatches} result${totalMatches !== 1 ? 's' : ''} in ${searchResults.length} pages. ~${timeMs}ms`;

window.dispatchEvent(new CustomEvent('search-results-updated', { detail: { hasResults: true } }));
},

getSearchContext(content) {
const searchTermPos = content.toLowerCase().indexOf(this.searchTerm.toLowerCase());
const sentenceStart = content.lastIndexOf('.', searchTermPos) + 1;
const sentenceEnd = content.indexOf('.', searchTermPos) + 1;
const sentence = content.substring(sentenceStart, sentenceEnd).trim();
const template = document.getElementById('search-highlight-template');

return sentence.replace(
new RegExp(this.searchTerm, 'gi'),
match => {
const mark = template.content.querySelector('mark').cloneNode();
mark.textContent = match;
return mark.outerHTML;
}
);
}
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<article id="document" itemscope itemtype="https://schema.org/Article" @class([
'mx-auto lg:ml-8 max-w-3xl p-12 md:px-16 max-w-[1000px] min-h-[calc(100vh_-_4rem)]',
config('markdown.prose_classes', 'prose dark:prose-invert'),
'torchlight-enabled' => $article && $article->hasTorchlight()])>
])>
@yield('content')

@if ($article)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
@props(['modal' => true])

<div id="hyde-search" x-data="hydeSearch">
<template id="search-highlight-template">
<mark class="bg-yellow-400 dark:bg-yellow-300"></mark>
</template>

<div class="relative">
<input type="search" name="search" id="search-input" x-model="searchTerm" @input="search()" placeholder="Search..." autocomplete="off" autofocus
{{ $attributes->merge(['class' => 'w-full rounded text-base leading-normal bg-gray-100 dark:bg-gray-700 py-2 px-3']) }}
>

<div x-show="isLoading" class="absolute right-3 top-2.5">
<div class="animate-spin h-5 w-5 border-2 border-gray-500 rounded-full border-t-transparent"></div>
</div>
</div>

<div x-show="searchTerm" class="mt-4">
<p x-text="statusMessage" class="text-sm text-gray-600 dark:text-gray-400 mb-2 pb-2"></p>

<dl class="space-y-4 -mt-4 pl-2 -ml-2 {{ $modal ? 'max-h-[60vh] overflow-x-hidden overflow-y-auto' : '' }}">
<template x-for="result in results" :key="result.slug">
<div>
<dt>
<a :href="result.destination" x-text="result.title" class="text-indigo-600 dark:text-indigo-400 hover:underline font-medium"></a><span class="text-sm text-gray-600 dark:text-gray-400" x-text="`, ${result.matches} occurrence${result.matches !== 1 ? 's' : ''} found.`"></span>
</dt>
<dd class="mt-1 text-sm text-gray-700 dark:text-gray-300" x-html="result.context"></dd>
</div>
</template>
</dl>
</div>

<script>
{!! file_get_contents(file_exists(Hyde::path('resources/js/HydeSearch.js'))
? Hyde::path('resources/js/HydeSearch.js')
: Hyde::vendorPath('resources/js/HydeSearch.js')
) !!}

document.addEventListener('alpine:init', () => {
Alpine.data('hydeSearch', () =>
initHydeSearch('{{ Hyde::relativeLink(\Hyde\Framework\Features\Documentation\DocumentationSearchIndex::outputPath()) }}')
);
});
</script>
</div>

This file was deleted.

Loading