Skip to content

Commit 84a296c

Browse files
committed
hide archive path from robots, update preview meta tags
1 parent ed53bba commit 84a296c

File tree

5 files changed

+15
-27
lines changed

5 files changed

+15
-27
lines changed

.env.production

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
NEXT_PUBLIC_BASE_PATH=/Source_Skyboxes
2+
NEXT_PUBLIC_SITE_URL=https://jacobdeanr.github.io/Source_Skyboxes

app/layout.tsx

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@ import './globals.css';
22
import { Inter, JetBrains_Mono } from 'next/font/google';
33
import { Metadata } from 'next';
44

5+
import { SITE_URL, withBase } from '@/app/lib/basepath';
6+
57
const inter = Inter({ subsets: ['latin'], variable: '--font-sans', display: 'swap' });
68
const jetbrains = JetBrains_Mono({ subsets: ['latin'], variable: '--font-mono', display: 'swap' });
79

810

911
export const metadata: Metadata = {
10-
metadataBase: new URL('https://jacobdeanr.github.io/Source_Skyboxes_NextJS'),
12+
metadataBase: new URL(SITE_URL),
1113
title: {
1214
default: 'Source Skyboxes',
1315
template: '%s | Source Skyboxes',
@@ -21,29 +23,15 @@ export const metadata: Metadata = {
2123
url: '/',
2224
title: 'Source Skyboxes',
2325
description:
24-
'High-quality skybox textures. Free download - Source Engine ready sets and original EXR.',
26+
'High-quality skybox textures. Free download Source Engine ready sets and original EXR.',
2527
images: [
26-
{ url: '/skyboxes/sky_cloudy017_hdr/images/previews/1.webp', width: 1200, height: 630 },
28+
{ url: withBase('/skyboxes/sky_cloudy017_hdr/images/previews/1.webp'), width: 1200, height: 630 },
2729
],
2830
},
2931
keywords: [
30-
'skybox',
31-
'HDRI',
32-
'Source Engine',
33-
'EXR',
34-
'VTF',
35-
'VMT',
36-
'HL2',
37-
'CSGO',
38-
'Source 2',
39-
'TF2',
40-
'S&box',
41-
'Source Skyboxes',
42-
'GarrysMod',
43-
'gmod',
44-
'hammer',
45-
'cs2',
46-
'free textures',
32+
'skybox', 'HDRI', 'Source Engine', 'EXR', 'VTF', 'VMT',
33+
'HL2', 'CSGO', 'Source 2', 'TF2', 'S&box', 'Source Skyboxes',
34+
'GarrysMod', 'gmod', 'hammer', 'cs2', 'free textures',
4735
],
4836
authors: [{ name: 'Jacob Robbins', url: 'https://github.com/Jacobdeanr' }],
4937
};

app/lib/basepath.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
export const BASE = process.env.NEXT_PUBLIC_BASE_PATH || '';
1+
export const BASE_PATH = process.env.NEXT_PUBLIC_BASE_PATH || '';
2+
export const SITE_URL = process.env.NEXT_PUBLIC_SITE_URL || 'http://localhost:3000';
23

34
export function withBase(p: string) {
4-
return `${BASE}${p}`;
5-
}
5+
return `${BASE_PATH}${p}`;
6+
}

app/skyboxes/[slug]/skybox-client.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,7 @@ export default function SkyboxClient({ slug, skyboxData, previewCount }: SkyboxC
8383
<div className="flex flex-col sm:flex-row gap-3 w-full md:w-auto">
8484

8585
{/* Source engine download
86-
87-
https://github.com/Jacobdeanr/Source_Skyboxes_NextJS/releases/download/assets/sky_cloudy005.tgd
88-
86+
8987
9088
*/}
9189
{Object.values(downloads).map((d) => (

scripts/generate-sitemap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const index = JSON.parse(fs.readFileSync(indexPath, 'utf8'));
99

1010
const pages = [
1111
'',
12-
'/archive',
12+
//'/archive',
1313
...Object.keys(index).map((s) => `/skyboxes/${s}/`)
1414
];
1515

0 commit comments

Comments
 (0)