Skip to content

Commit a158d3a

Browse files
committed
make package links dynamic by moving them to config
1 parent 41f8085 commit a158d3a

File tree

4 files changed

+49
-30
lines changed

4 files changed

+49
-30
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,17 @@ return [
6767
// Route middleware
6868
'middleware' => ['web'],
6969

70+
// GitHub Repo & Branch for "Edit on GitHub" links
71+
'github_repo' => env('PERTUK_GITHUB_REPO', 'username/repo'),
72+
'github_branch' => env('PERTUK_GITHUB_BRANCH', 'main'),
73+
'github_path' => null, // Folder path in repo where docs are located
74+
7075
// Assets directory (relative to documentation root)
7176
'assets_path' => 'assets',
77+
78+
// External Links
79+
'github_url' => env('PERTUK_GITHUB_URL', ''),
80+
'discord_url' => env('PERTUK_DISCORD_URL', ''),
7281
];
7382
```
7483

config/pertuk.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,8 @@
5656
// Assets directory (relative to documentation root)
5757
'assets_path' => 'assets',
5858

59+
// External Links
60+
'github_url' => env('PERTUK_GITHUB_URL', 'https://github.com/Xoshbin/kezi'),
61+
'discord_url' => env('PERTUK_DISCORD_URL', 'https://discord.gg/your-discord'),
62+
5963
];

resources/views/components/header.blade.php

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -147,14 +147,16 @@ class="rounded-md p-2 text-gray-600 transition-colors hover:bg-gray-100 hover:te
147147
</button>
148148

149149
<!-- GitHub Link -->
150-
<a href="https://github.com/Xoshbin/jmeryar-notebooklm" target="_blank" rel="noopener noreferrer"
151-
class="rounded-md p-2 text-gray-600 transition-colors hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:ring-2 focus:ring-orange-500/20 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-white"
152-
aria-label="View on GitHub">
153-
<svg class="h-5 w-5" fill="currentColor" viewBox="0 0 24 24">
154-
<path
155-
d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z" />
156-
</svg>
157-
</a>
150+
@if(config('pertuk.github_url'))
151+
<a href="{{ config('pertuk.github_url') }}" target="_blank" rel="noopener noreferrer"
152+
class="rounded-md p-2 text-gray-600 transition-colors hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:ring-2 focus:ring-orange-500/20 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-white"
153+
aria-label="View on GitHub">
154+
<svg class="h-5 w-5" fill="currentColor" viewBox="0 0 24 24">
155+
<path
156+
d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z" />
157+
</svg>
158+
</a>
159+
@endif
158160

159161
<!-- Mobile Menu Button -->
160162
<button type="button"

resources/views/index.blade.php

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -132,28 +132,32 @@
132132
Join our community or check out the GitHub repository for more resources.
133133
</p>
134134
<div class="flex flex-col sm:flex-row gap-4 justify-center">
135-
<a
136-
href="https://github.com/Xoshbin/jmeryar-notebooklm"
137-
target="_blank"
138-
rel="noopener noreferrer"
139-
class="inline-flex items-center gap-2 rounded-lg bg-gray-900 dark:bg-white px-4 py-2 text-sm font-medium text-white dark:text-gray-900 transition-colors hover:bg-gray-800 dark:hover:bg-gray-100"
140-
>
141-
<svg class="h-4 w-4" fill="currentColor" viewBox="0 0 24 24">
142-
<path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/>
143-
</svg>
144-
View on GitHub
145-
</a>
146-
<a
147-
href="https://discord.gg/your-discord"
148-
target="_blank"
149-
rel="noopener noreferrer"
150-
class="inline-flex items-center gap-2 rounded-lg border border-gray-300 dark:border-gray-600 px-4 py-2 text-sm font-medium text-gray-700 dark:text-gray-300 transition-colors hover:bg-gray-50 dark:hover:bg-gray-800"
151-
>
152-
<svg class="h-4 w-4" fill="currentColor" viewBox="0 0 24 24">
153-
<path d="M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z"/>
154-
</svg>
155-
Join Discord
156-
</a>
135+
@if(config('pertuk.github_url'))
136+
<a
137+
href="{{ config('pertuk.github_url') }}"
138+
target="_blank"
139+
rel="noopener noreferrer"
140+
class="inline-flex items-center gap-2 rounded-lg bg-gray-900 dark:bg-white px-4 py-2 text-sm font-medium text-white dark:text-gray-900 transition-colors hover:bg-gray-800 dark:hover:bg-gray-100"
141+
>
142+
<svg class="h-4 w-4" fill="currentColor" viewBox="0 0 24 24">
143+
<path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/>
144+
</svg>
145+
View on GitHub
146+
</a>
147+
@endif
148+
@if(config('pertuk.discord_url'))
149+
<a
150+
href="{{ config('pertuk.discord_url') }}"
151+
target="_blank"
152+
rel="noopener noreferrer"
153+
class="inline-flex items-center gap-2 rounded-lg border border-gray-300 dark:border-gray-600 px-4 py-2 text-sm font-medium text-gray-700 dark:text-gray-300 transition-colors hover:bg-gray-50 dark:hover:bg-gray-800"
154+
>
155+
<svg class="h-4 w-4" fill="currentColor" viewBox="0 0 24 24">
156+
<path d="M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z"/>
157+
</svg>
158+
Join Discord
159+
</a>
160+
@endif
157161
</div>
158162
</div>
159163
</div>

0 commit comments

Comments
 (0)