Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b432f8f

Browse files
committedMar 23, 2025
feat(node:web): improved the ogp images
1 parent 20832ff commit b432f8f

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed
 

‎nodePackages/web/src/components/organisms/Head.tsx

+11-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { Component } from 'solid-js';
2+
import Constants from '../../constants.yml';
23
import type { HeadProps as InternalHeadProps } from '../molecules/Head.js';
34
import { Head as InternalHead } from '../molecules/Head.js';
45
import { useLanguage, useTranslator } from '../../modules/createI18N';
@@ -9,6 +10,13 @@ export interface HeadProps
910
readonly pagePath: string;
1011
}
1112

13+
/**
14+
* Creates the web URL.
15+
* @param path The path from the root.
16+
* @returns The web URL.
17+
*/
18+
const webUrl = (path: string) => `${Constants['webUrl']}${path}`;
19+
1220
/**
1321
* The head component.
1422
* @param props The component properties.
@@ -21,15 +29,15 @@ export const Head: Component<HeadProps> = (props) => {
2129
<InternalHead
2230
author={t('author')}
2331
description={t('description')}
24-
images={['./images/illustrator.png', './images/icons-unity.png']}
25-
imagesAlt="Illustrator and Unity icons"
32+
images={[webUrl('images/banner.webp')]}
33+
imagesAlt="VRC Icons by Kuroné Kito: It's a collection of UNOFFICIAL icons, such as the VRChat icons. It provides icons in SVG vector format."
2634
keywords="SVG,icons,design,illustration,icon,pack,VRChat"
2735
language={language()}
2836
next={props.next}
2937
prev={props.prev}
3038
siteName="VRC Icons"
3139
title={props.title}
32-
url={`https://kurone-kito.github.io/launchpad-icons/${props.pagePath}`}
40+
url={webUrl(props.pagePath)}
3341
/>
3442
);
3543
};

‎nodePackages/web/src/constants.yml

+1
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ npmReact: npm i @kurone-kito/launchpad-icons-react
33
npmSolid: npm i @kurone-kito/launchpad-icons-solid
44
vccUrl: vcc://vpm/addRepo?url=
55
vpmUrl: https://kurone-kito.github.io/vpm/index.json
6+
webUrl: https://kurone-kito.github.io/launchpad-icons/

0 commit comments

Comments
 (0)
Please sign in to comment.