Skip to content

Commit 8766976

Browse files
committed
feat: add GITHUB_URL
1 parent 5755047 commit 8766976

File tree

4 files changed

+7
-53
lines changed

4 files changed

+7
-53
lines changed

apps/docs/src/hooks/useLayoutOptions.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { GITHUB_URL } from '@next-i18n/const';
12
import type { BaseLayoutProps } from 'fumadocs-ui/layouts/shared';
23
import { AlbumIcon, Book, NotebookIcon } from 'lucide-react';
34
import { useTranslations } from 'next-intl';
@@ -14,7 +15,7 @@ export const useBaseOptions = () => {
1415
</>
1516
),
1617
},
17-
githubUrl: 'https://github.com/xiaoyu2er/nextjs-i18n-docs',
18+
githubUrl: GITHUB_URL,
1819
links: [
1920
{
2021
icon: <Book />,

apps/index/src/app/page.tsx

Lines changed: 3 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { PENDING_SITES, SITES } from '@next-i18n/const';
1+
import { GITHUB_URL, PENDING_SITES, SITES } from '@next-i18n/const';
22
import Image from 'next/image';
33

44
// Language metadata with display names and descriptions
@@ -288,18 +288,11 @@ export default function Home() {
288288
Want to help with translations?
289289
</p>
290290
<a
291-
href="https://github.com/vercel/next.js"
291+
href={GITHUB_URL}
292292
target="_blank"
293293
rel="noopener noreferrer"
294294
className="inline-flex items-center gap-2 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-lg transition-colors duration-200 text-sm font-medium"
295295
>
296-
<Image
297-
src="/globe.svg"
298-
alt="Contribute icon"
299-
width={16}
300-
height={16}
301-
className="invert"
302-
/>
303296
<span>Contribute on GitHub</span>
304297
</a>
305298
</div>
@@ -350,13 +343,6 @@ export default function Home() {
350343
target="_blank"
351344
rel="noopener noreferrer"
352345
>
353-
<Image
354-
src="/file.svg"
355-
alt="Docs icon"
356-
width={14}
357-
height={14}
358-
className="dark:invert"
359-
/>
360346
<span>Official Docs</span>
361347
</a>
362348
<a
@@ -365,13 +351,6 @@ export default function Home() {
365351
target="_blank"
366352
rel="noopener noreferrer"
367353
>
368-
<Image
369-
src="/file.svg"
370-
alt="Learn icon"
371-
width={14}
372-
height={14}
373-
className="dark:invert"
374-
/>
375354
<span>Learn Next.js</span>
376355
</a>
377356
<a
@@ -380,13 +359,6 @@ export default function Home() {
380359
target="_blank"
381360
rel="noopener noreferrer"
382361
>
383-
<Image
384-
src="/window.svg"
385-
alt="Templates icon"
386-
width={14}
387-
height={14}
388-
className="dark:invert"
389-
/>
390362
<span>Templates</span>
391363
</a>
392364
</div>
@@ -398,18 +370,11 @@ export default function Home() {
398370
</h4>
399371
<div className="space-y-2">
400372
<a
401-
href="https://github.com/vercel/next.js"
373+
href={GITHUB_URL}
402374
className="flex items-center gap-2 text-gray-600 dark:text-gray-300 hover:text-blue-600 dark:hover:text-blue-400 transition-colors"
403375
target="_blank"
404376
rel="noopener noreferrer"
405377
>
406-
<Image
407-
src="/globe.svg"
408-
alt="GitHub icon"
409-
width={14}
410-
height={14}
411-
className="dark:invert"
412-
/>
413378
<span>GitHub</span>
414379
</a>
415380
<a
@@ -418,13 +383,6 @@ export default function Home() {
418383
target="_blank"
419384
rel="noopener noreferrer"
420385
>
421-
<Image
422-
src="/vercel.svg"
423-
alt="Vercel icon"
424-
width={14}
425-
height={14}
426-
className="dark:invert"
427-
/>
428386
<span>Vercel</span>
429387
</a>
430388
<a
@@ -433,13 +391,6 @@ export default function Home() {
433391
target="_blank"
434392
rel="noopener noreferrer"
435393
>
436-
<Image
437-
src="/globe.svg"
438-
alt="Website icon"
439-
width={14}
440-
height={14}
441-
className="dark:invert"
442-
/>
443394
<span>Next.js</span>
444395
</a>
445396
</div>

packages/const/src/github.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const GITHUB_URL = 'https://github.com/xiaoyu2er/nextjs-i18n-docs';

packages/const/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
export * from './language';
22
export * from './sites';
3+
export * from './github';

0 commit comments

Comments
 (0)