Skip to content

Commit 004531f

Browse files
committed
feat: Add github_path configuration option to explicitly define the documentation folder within the GitHub repository.
1 parent 6edc614 commit 004531f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

config/pertuk.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,6 @@
4848
// GitHub Repo & Branch for "Edit on GitHub" links
4949
'github_repo' => env('PERTUK_GITHUB_REPO', 'username/repo'), // @phpstan-ignore-line
5050
'github_branch' => env('PERTUK_GITHUB_BRANCH', 'main'), // @phpstan-ignore-line
51+
'github_path' => null, // Folder path in repo where docs are located (null = use same structure as local)
5152

5253
];

resources/views/show.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
$repo = config('pertuk.github_repo');
77
$branch = config('pertuk.github_branch', 'main');
88
$root = config('pertuk.root'); // e.g. /var/www/html/docs
9-
$relativeRoot = \Illuminate\Support\Str::after($root, base_path() . DIRECTORY_SEPARATOR); // e.g. docs
9+
$relativeRoot = config('pertuk.github_path') ?? \Illuminate\Support\Str::after($root, base_path() . DIRECTORY_SEPARATOR); // e.g. docs
1010
@endphp
1111

1212
<x-pertuk::pertuk-layout :title="$title" :current-locale="$current_locale" :current-version="$current_version" :slug="$slug" :items="$items">

0 commit comments

Comments
 (0)