Skip to content

Commit

Permalink
feat: add meta config.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Oct 14, 2024
1 parent 27cbc71 commit 7a07f79
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .refsrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,20 @@
"label": "Home",
"url": "https://jaywcjlove.github.io/refs-cli"
},
"meta": [
{
"name": "author",
"content": "jaywcjlove"
},
{
"name": "license",
"content": "MIT"
},
{
"name": "funding",
"content": "https://jaywcjlove.github.io/#/sponsor"
}
],
"giscus": {
"src": "https://giscus.app/client.js",
"data-repo": "jaywcjlove/refs-cli",
Expand Down
2 changes: 1 addition & 1 deletion src/utils/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export function create(str = '', options: Options = {}) {
title: `${title ? `${title} & ` : ''} ${subTitle} ${options.config?.title || 'Quick Reference'}`,
css: [...options.css],
link: [{ rel: 'icon', href: favicon, type: 'image/svg+xml' }],
meta: [{ description: description }, { keywords: keywords }],
meta: [{ description: description }, { keywords: keywords }, ...(options.config?.meta || [])],
},
],
],
Expand Down
1 change: 1 addition & 0 deletions src/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export interface Config {
footer?: string;
license?: string;
giscus?: Record<string, string>;
meta?: Array<Record<string, string>>;
'data-info'?: string;
search?: {
label: string;
Expand Down

0 comments on commit 7a07f79

Please sign in to comment.