Skip to content

Commit efee820

Browse files
committed
Merge branch 'master' into feat/release-notes
2 parents 46abcfd + 2cf46ed commit efee820

File tree

57 files changed

+675
-1618
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+675
-1618
lines changed
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Sync documentation mirror
2+
3+
on:
4+
push:
5+
branches: [ master, '1.x' ]
6+
paths:
7+
- 'docs/**'
8+
- '.github/workflows/sync-documentation-mirror.yml'
9+
10+
# Avoid overlapping runs trying to push at once
11+
concurrency:
12+
group: sync-docs-${{ github.ref }}
13+
cancel-in-progress: false
14+
15+
jobs:
16+
sync:
17+
if: github.repository == 'hydephp/develop'
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout monorepo
21+
uses: actions/checkout@v5
22+
with:
23+
fetch-depth: 0
24+
25+
- name: Determine target subdirectory (1.x vs 2.x)
26+
id: vars
27+
run: |
28+
if [ "${GITHUB_REF_NAME}" = "master" ]; then
29+
echo "TARGET_SUBDIR=2.x" >> "$GITHUB_OUTPUT"
30+
elif [ "${GITHUB_REF_NAME}" = "1.x" ]; then
31+
echo "TARGET_SUBDIR=1.x" >> "$GITHUB_OUTPUT"
32+
else
33+
echo "Unsupported branch: ${GITHUB_REF_NAME}"
34+
exit 78
35+
fi
36+
37+
- name: Clone target repo (hydephp/docs)
38+
env:
39+
TOKEN: ${{ secrets.DOCS_SYNC_TOKEN }}
40+
run: |
41+
set -euo pipefail
42+
if [ -z "${TOKEN}" ]; then
43+
echo "❌ Missing DOCS_SYNC_TOKEN secret with repo access to hydephp/docs."
44+
exit 1
45+
fi
46+
git clone --depth 1 "https://x-access-token:${TOKEN}@github.com/hydephp/docs.git" target-docs
47+
48+
- name: Replace target directory with monorepo /docs
49+
run: |
50+
set -euo pipefail
51+
DEST="target-docs/${{ steps.vars.outputs.TARGET_SUBDIR }}"
52+
# Remove and recreate the target subdir to ensure a full replacement
53+
rm -rf "$DEST"
54+
mkdir -p "$DEST"
55+
# Mirror monorepo docs into the dest (delete removed files)
56+
rsync -a --delete --exclude='.git' ./docs/ "$DEST/"
57+
58+
- name: Commit & push if there are changes
59+
env:
60+
GIT_AUTHOR_NAME: hydephp-bot
61+
GIT_AUTHOR_EMAIL: bot@hydephp.com
62+
GIT_COMMITTER_NAME: hydephp-bot
63+
GIT_COMMITTER_EMAIL: bot@hydephp.com
64+
TOKEN: ${{ secrets.DOCS_SYNC_TOKEN }}
65+
run: |
66+
set -euo pipefail
67+
cd target-docs
68+
git add -A
69+
if git diff --cached --quiet; then
70+
echo "✅ No changes to sync."
71+
exit 0
72+
fi
73+
git commit -m "Sync docs from ${GITHUB_REPOSITORY}@${GITHUB_SHA} (${GITHUB_REF_NAME}) → ${{ steps.vars.outputs.TARGET_SUBDIR }}"
74+
# Push to main on hydephp/docs
75+
git push origin HEAD:main

_media/app.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/docs.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
|
9191
| Example: https://github.com/hydephp/docs/blob/master
9292
| Do not specify the filename or extension, Hyde will do that for you.
93-
| Setting the setting to null will disable the feature.
93+
| Setting this to null will disable the feature.
9494
|
9595
*/
9696

config/hyde.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@
138138
| Site Output Directory
139139
|--------------------------------------------------------------------------
140140
|
141-
| This setting specifies the output path for your site, useful to for
141+
| This setting specifies the output path for your site, useful to, for
142142
| example, store the site in the docs/ directory for GitHub Pages.
143143
| The path is relative to the root of your project.
144144
|
@@ -308,7 +308,7 @@
308308
|
309309
| Here you can customize the footer Markdown text for your site.
310310
|
311-
| If you don't want to write Markdown here, you use a Markdown include.
311+
| If you don't want to write Markdown here, you can use a Markdown include.
312312
| You can also customize the Blade view if you want a more complex footer.
313313
| You can disable it completely by changing the setting to `false`.
314314
|
@@ -428,7 +428,7 @@
428428
|
429429
| Here you can configure settings for the built-in realtime compiler server.
430430
| The server also includes a magic dashboard feature that supercharges
431-
| your local development! This feature can alo be customised here.
431+
| your local development! This feature can also be customised here.
432432
|
433433
*/
434434

config/markdown.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
|
7272
| This feature allows you to use basic Laravel Blade in Markdown files.
7373
|
74-
| It's disabled by default since can be a security risk as it allows
74+
| It's disabled by default since it can be a security risk as it allows
7575
| arbitrary PHP to run. But if your Markdown is trusted, try it out!
7676
|
7777
| To see the syntax and usage, see the documentation:

docs/architecture-concepts/automatic-routing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Automatic Routing
1+
# Automatic Routing
22

33
>info This covers an intermediate topic which is not required for basic usage, but is useful if you want to use the framework to design custom Blade templates.
44
@@ -57,7 +57,7 @@ But where it really shines is when you supply a route. This will then resolve th
5757
<x-link :href="Routes::get('index')">Home</x-link>
5858
```
5959

60-
You can of course, also supply extra attributes like classes:
60+
You can also supply extra attributes like classes:
6161

6262
```blade
6363
<x-link :href="Routes::get('index')" class="btn btn-primary">Home</x-link>

docs/creating-content/blog-posts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ image: image.jpg
205205

206206
#### Full URL
207207

208-
Full URL starting with `http(s)://`) or `//` (protocol-relative).
208+
Full URL starting with `http(s)://` or `//` (protocol-relative).
209209
The image source will be used as-is, and no additional processing is done.
210210

211211
```yaml

docs/creating-content/documentation-pages.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Hyde compiles your Markdown content into beautiful static HTML pages using a Tai
1414

1515
Additionally, if you have an `_docs/index.md` file, the sidebar header will link to it, and an automatically generated "Docs" link will be added to your site's main navigation menu, pointing to your documentation page.
1616

17-
If you have a Torchlight API token in your `.env` file, Hyde will even enable syntax highlighting automatically, saving you time and effort. For more information about this feature, see the [extensions page](extensions#torchlight).
17+
If you have a Torchlight API token in your `.env` file, Hyde will even enable syntax highlighting automatically, saving you time and effort. For more information about this feature, see the [extensions page](third-party-integrations#torchlight).
1818

1919
### Best Practices and Hyde Expectations
2020

@@ -241,17 +241,19 @@ To quickly arrange the order of items in the sidebar, you can reorder the page i
241241
]
242242
```
243243

244-
See [the chapter in the customization page](customization#navigation-menu--sidebar) for more details. <br>
244+
See [the chapter in the customization page](customization#navigation-menu--sidebar) for more details.
245245

246246
### Setting Sidebar Group Labels
247247

248248
When using the automatic sidebar grouping feature the titles of the groups are generated from the subdirectory names. If these are not to your liking, for example if you need to use special characters, you can override them in the configuration file. The array key is the directory name, and the value is the label.
249249

250250
```php
251-
// Filepath: config/docs.php
251+
// filepath: config/docs.php
252252
253-
'sidebar_group_labels' => [
254-
'questions-and-answers' => 'Questions & Answers',
253+
'sidebar' => [
254+
'labels' => [
255+
'questions-and-answers' => 'Questions & Answers',
256+
],
255257
],
256258
```
257259

@@ -264,7 +266,7 @@ By default, each group will be assigned the lowest priority found inside the gro
264266
Just use the sidebar group key as instead of the page identifier/route key:
265267

266268
```php
267-
// Filepath: config/docs.php
269+
// filepath: config/docs.php
268270
'sidebar' => [
269271
'order' => [
270272
'readme',
@@ -345,7 +347,7 @@ If this setting is set to true, Hyde will output all documentation pages into th
345347
If you set this to false, Hyde will match the directory structure of the source files (just like all other pages).
346348

347349
```php
348-
// Filepath: config/docs.php
350+
// filepath: config/docs.php
349351
'flattened_output_paths' => true,
350352
```
351353

@@ -420,7 +422,7 @@ The feature is automatically enabled when you specify a base URL in the Docs con
420422
Here's an example configuration from the official HydePHP.com documentation:
421423

422424
```php
423-
// Filepath: config/docs.php
425+
// filepath: config/docs.php
424426
425427
'source_file_location_base' => 'https://github.com/hydephp/docs/blob/master/',
426428
```
@@ -430,7 +432,7 @@ Here's an example configuration from the official HydePHP.com documentation:
430432
Changing the label is easy, just change the following config setting:
431433

432434
```php
433-
// Filepath: config/docs.php
435+
// filepath: config/docs.php
434436
'edit_source_link_text' => 'Edit Source on GitHub',
435437
```
436438

@@ -439,7 +441,7 @@ Changing the label is easy, just change the following config setting:
439441
By default, the button will be shown in the documentation page footer. You can change this by setting the following config setting to `'header'`, `'footer'`, or `'both'`
440442

441443
```php
442-
// Filepath: config/docs.php
444+
// filepath: config/docs.php
443445
'edit_source_link_position' => 'header',
444446
```
445447

docs/creating-content/managing-assets.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ To get you started quickly, all the styles are already compiled and minified int
1717

1818
## Vite
1919

20-
Hyde uses [Vite](https://vitejs.dev/) to compile assets. Vite is a build tool that aims to provide a faster and more efficient development experience for modern web projects.
20+
Hyde uses [Vite](https://vite.dev/) to compile assets. Vite is a build tool that aims to provide a faster and more efficient development experience for modern web projects.
2121

2222
### Why Vite?
2323

@@ -66,6 +66,10 @@ You can check if the Vite HMR server is running with `Vite::running()`, and you
6666
@endif
6767
```
6868

69+
### Laravel Herd
70+
71+
If using Laravel Herd for HydePHP, you can still use Vite by running `npm run dev`. The Herd integration is in public beta, please report any issues to https://github.com/hydephp/realtime-compiler.
72+
6973
## Additional Information and Answers to Common Questions
7074

7175
### Is NodeJS/NPM Required for Using Hyde?

docs/creating-content/static-pages.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ navigation:
7878
7979
- `label` is the text that will be displayed in the navigation menu
8080
- `priority` is the order in which the page will appear in the navigation menu (`order` is also supported)
81-
- `hidden` will hide the page from the navigation menu (`visible`) is also supported, but obviously invert the value)
82-
- `group` will put the page in a dropdown menu with the specified group name (`category`) is also supported)
81+
- `hidden` will hide the page from the navigation menu (`visible` is also supported, but obviously invert the value)
82+
- `group` will put the page in a dropdown menu with the specified group name (`category` is also supported)
8383

8484
## Creating Blade Pages
8585

0 commit comments

Comments
 (0)