@hagicode/hagilight-starlight 0.1.0-dev.148.1.e0c630e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AIDisclosureNotice.astro +12 -0
- package/ArticlePromotion.astro +630 -0
- package/ArticlePromotionPicker.astro +9 -0
- package/ContentLayoutToggle.astro +31 -0
- package/Footer.astro +201 -0
- package/Header.astro +131 -0
- package/LanguageChooser.astro +386 -0
- package/MarkdownContent.astro +45 -0
- package/NotFoundHero.astro +44 -0
- package/PageTitle.astro +7 -0
- package/PromotoFooter.astro +7 -0
- package/README.md +178 -0
- package/SEOHead.astro +67 -0
- package/ThemeSelect.astro +176 -0
- package/assets/showcase/hero-avatar.webp +0 -0
- package/assets/showcase/heroes.webp +0 -0
- package/assets/showcase/manifest.json +333 -0
- package/assets/showcase/pillar-efficient.svg +1 -0
- package/assets/showcase/pillar-fun.svg +1 -0
- package/assets/showcase/pillar-smart.svg +1 -0
- package/assets/showcase/proposal-workflow.webp +0 -0
- package/assets/showcase/workbench.webp +0 -0
- package/content-width.css +81 -0
- package/dist/ai-disclosures.d.ts +31 -0
- package/dist/ai-disclosures.js +105 -0
- package/dist/article-promotion-copy/de-DE.d.ts +34 -0
- package/dist/article-promotion-copy/de-DE.js +43 -0
- package/dist/article-promotion-copy/en-US.d.ts +34 -0
- package/dist/article-promotion-copy/en-US.js +43 -0
- package/dist/article-promotion-copy/es-ES.d.ts +34 -0
- package/dist/article-promotion-copy/es-ES.js +43 -0
- package/dist/article-promotion-copy/fr-FR.d.ts +34 -0
- package/dist/article-promotion-copy/fr-FR.js +43 -0
- package/dist/article-promotion-copy/index.d.ts +32 -0
- package/dist/article-promotion-copy/index.js +50 -0
- package/dist/article-promotion-copy/ja-JP.d.ts +34 -0
- package/dist/article-promotion-copy/ja-JP.js +43 -0
- package/dist/article-promotion-copy/ko-KR.d.ts +34 -0
- package/dist/article-promotion-copy/ko-KR.js +43 -0
- package/dist/article-promotion-copy/pt-BR.d.ts +34 -0
- package/dist/article-promotion-copy/pt-BR.js +43 -0
- package/dist/article-promotion-copy/ru-RU.d.ts +34 -0
- package/dist/article-promotion-copy/ru-RU.js +43 -0
- package/dist/article-promotion-copy/zh-CN.d.ts +34 -0
- package/dist/article-promotion-copy/zh-CN.js +43 -0
- package/dist/article-promotion-copy/zh-Hant.d.ts +34 -0
- package/dist/article-promotion-copy/zh-Hant.js +43 -0
- package/dist/article-promotion.d.ts +40 -0
- package/dist/article-promotion.js +14 -0
- package/dist/content-width-i18n.d.ts +6 -0
- package/dist/content-width-i18n.js +15 -0
- package/dist/content-width.d.ts +5 -0
- package/dist/content-width.js +42 -0
- package/dist/index.d.ts +105 -0
- package/dist/index.js +583 -0
- package/dist/language-routing.d.ts +18 -0
- package/dist/language-routing.js +95 -0
- package/dist/locales.d.ts +48 -0
- package/dist/locales.js +13 -0
- package/dist/not-found.d.ts +9 -0
- package/dist/not-found.js +28 -0
- package/dist/rss-renderer.d.ts +14 -0
- package/dist/rss-renderer.js +30 -0
- package/dist/rss-utils.d.ts +27 -0
- package/dist/rss-utils.js +65 -0
- package/dist/schema.d.ts +32 -0
- package/dist/schema.js +25 -0
- package/dist/seo-utils.d.ts +74 -0
- package/dist/seo-utils.js +219 -0
- package/dist/showcase.d.ts +6 -0
- package/dist/showcase.js +5 -0
- package/dist/site-metadata.d.ts +38 -0
- package/dist/site-metadata.js +109 -0
- package/dist/themes.d.ts +43 -0
- package/dist/themes.js +156 -0
- package/dist/windows-download.d.ts +4 -0
- package/dist/windows-download.js +22 -0
- package/package.json +88 -0
- package/rss.[language].xml.ts +20 -0
- package/rss.xml.ts +15 -0
- package/themes.css +160 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
const workbenchAlt = 'HagiCode 工作台截图,会话看板分为待处理、进行中与已归档三列。';
|
|
2
|
+
export default {
|
|
3
|
+
title: 'HagiCode',
|
|
4
|
+
lead: 'HagiCode 是面向项目开发的 AI 编码工作台:丰富、便捷的界面交互让规划、Agent 执行与项目工作更容易上手和跟进,带来更投入的开发体验。',
|
|
5
|
+
subheadline: '丰富、便捷的界面交互,让规划、Agent 执行与项目工作更容易上手和跟进。',
|
|
6
|
+
imageAlt: workbenchAlt,
|
|
7
|
+
features: [
|
|
8
|
+
{ id: 'smart', label: '智能', description: 'OpenSpec 工作流把意图转化为从提案、设计、任务到交付的可执行路径。' },
|
|
9
|
+
{ id: 'efficient', label: '高效', description: '多 Agent 并行推进调研、实现与审阅,并支持多仓库变更和你熟悉的 Agent CLI。' },
|
|
10
|
+
{ id: 'fun', label: '有趣', description: '丰富、便捷的界面交互让规划、Agent 执行与项目工作更容易上手和跟进,带来更投入的开发体验。' },
|
|
11
|
+
],
|
|
12
|
+
visitLabel: '访问 HagiCode',
|
|
13
|
+
docsLabel: '阅读文档',
|
|
14
|
+
galleryHeading: '一览 HagiCode',
|
|
15
|
+
gallery: [
|
|
16
|
+
{
|
|
17
|
+
id: 'workbench',
|
|
18
|
+
caption: '工作台:所有会话汇集在同一块看板上。',
|
|
19
|
+
alt: workbenchAlt,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
id: 'proposal-workflow',
|
|
23
|
+
caption: '提案从创建、起草、审阅一路推进到执行与归档。',
|
|
24
|
+
alt: 'HagiCode 提案阶段条截图,从已创建到已归档,当前高亮“执行完成”阶段并带有归档计划按钮。',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
id: 'heroes',
|
|
28
|
+
caption: 'Hero Scenario:英雄推进工作,你随时查看进度、等级与剧情。',
|
|
29
|
+
alt: 'HagiCode Hero Scenario 面板截图,名为 Ember Keep,列出三位运行中的英雄及其等级、进度与剧情文字。',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
id: 'hero-avatar',
|
|
33
|
+
caption: '插图:HagiCode 英雄头像,是同一套头像中的一幅,每次访问会换一幅。',
|
|
34
|
+
alt: 'HagiCode 英雄头像插图,风格化的角色肖像。',
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
windowsLabel: '下载 Windows 版',
|
|
38
|
+
windowsStoreLabel: '从 Microsoft Store 获取',
|
|
39
|
+
windowsStoreAriaLabel: '在 Microsoft Store 中打开 HagiCode',
|
|
40
|
+
allDownloadsLabel: '全部下载',
|
|
41
|
+
shareLabel: '分享 HagiCode',
|
|
42
|
+
shareText: 'HagiCode 通过丰富、便捷的界面交互,让规划、Agent 执行与项目工作更容易上手和跟进:https://www.hagicode.com/',
|
|
43
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
title: string;
|
|
3
|
+
lead: string;
|
|
4
|
+
subheadline: string;
|
|
5
|
+
imageAlt: string;
|
|
6
|
+
features: ({
|
|
7
|
+
id: "smart";
|
|
8
|
+
label: string;
|
|
9
|
+
description: string;
|
|
10
|
+
} | {
|
|
11
|
+
id: "efficient";
|
|
12
|
+
label: string;
|
|
13
|
+
description: string;
|
|
14
|
+
} | {
|
|
15
|
+
id: "fun";
|
|
16
|
+
label: string;
|
|
17
|
+
description: string;
|
|
18
|
+
})[];
|
|
19
|
+
visitLabel: string;
|
|
20
|
+
docsLabel: string;
|
|
21
|
+
galleryHeading: string;
|
|
22
|
+
gallery: {
|
|
23
|
+
id: string;
|
|
24
|
+
caption: string;
|
|
25
|
+
alt: string;
|
|
26
|
+
}[];
|
|
27
|
+
windowsLabel: string;
|
|
28
|
+
windowsStoreLabel: string;
|
|
29
|
+
windowsStoreAriaLabel: string;
|
|
30
|
+
allDownloadsLabel: string;
|
|
31
|
+
shareLabel: string;
|
|
32
|
+
shareText: string;
|
|
33
|
+
};
|
|
34
|
+
export default _default;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
const workbenchAlt = 'HagiCode 工作台畫面,工作階段看板分為待處理、進行中與已封存三欄。';
|
|
2
|
+
export default {
|
|
3
|
+
title: 'HagiCode',
|
|
4
|
+
lead: 'HagiCode 是面向專案開發的 AI 編碼工作台:豐富、便利的介面互動讓規劃、Agent 執行與專案工作更容易上手和跟進,帶來更投入的開發體驗。',
|
|
5
|
+
subheadline: '透過豐富、便利的介面互動,讓規劃、Agent 執行與專案工作更容易上手和跟進。',
|
|
6
|
+
imageAlt: workbenchAlt,
|
|
7
|
+
features: [
|
|
8
|
+
{ id: 'smart', label: '智慧', description: 'OpenSpec 工作流程將意圖轉化為從提案、設計、任務到交付的可執行路徑。' },
|
|
9
|
+
{ id: 'efficient', label: '高效', description: '多 Agent 並行推進研究、實作與審查,並支援多儲存庫變更與你熟悉的 Agent CLI。' },
|
|
10
|
+
{ id: 'fun', label: '有趣', description: '豐富、便利的介面互動讓規劃、Agent 執行與專案工作更容易上手和跟進,帶來更投入的開發體驗。' },
|
|
11
|
+
],
|
|
12
|
+
visitLabel: '造訪 HagiCode',
|
|
13
|
+
docsLabel: '閱讀文件',
|
|
14
|
+
galleryHeading: '一覽 HagiCode',
|
|
15
|
+
gallery: [
|
|
16
|
+
{
|
|
17
|
+
id: 'workbench',
|
|
18
|
+
caption: '工作台:所有工作階段集中在同一塊看板上。',
|
|
19
|
+
alt: workbenchAlt,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
id: 'proposal-workflow',
|
|
23
|
+
caption: '提案從建立、起草、審查一路推進到執行與封存。',
|
|
24
|
+
alt: 'HagiCode 提案階段列畫面,從已建立到已封存,目前標示「執行完成」階段並附有封存計畫按鈕。',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
id: 'heroes',
|
|
28
|
+
caption: 'Hero Scenario:英雄推進工作,你隨時查看進度、等級與劇情。',
|
|
29
|
+
alt: 'HagiCode Hero Scenario 面板畫面,名為 Ember Keep,列出三位執行中的英雄及其等級、進度與劇情文字。',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
id: 'hero-avatar',
|
|
33
|
+
caption: '插圖:HagiCode 英雄頭像,是同一套頭像中的一幅,每次造訪會換一幅。',
|
|
34
|
+
alt: 'HagiCode 英雄頭像插圖,風格化的角色肖像。',
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
windowsLabel: '下載 Windows 版',
|
|
38
|
+
windowsStoreLabel: '從 Microsoft Store 取得',
|
|
39
|
+
windowsStoreAriaLabel: '在 Microsoft Store 開啟 HagiCode',
|
|
40
|
+
allDownloadsLabel: '所有下載',
|
|
41
|
+
shareLabel: '分享 HagiCode',
|
|
42
|
+
shareText: 'HagiCode 透過豐富、便利的介面互動,讓規劃、Agent 執行與專案工作更容易上手和跟進:https://www.hagicode.com/',
|
|
43
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { COPY } from './article-promotion-copy/index.js';
|
|
2
|
+
export interface ArticlePromotionFeature {
|
|
3
|
+
id: 'smart' | 'efficient' | 'fun';
|
|
4
|
+
/** Localized pillar word. */
|
|
5
|
+
label: string;
|
|
6
|
+
description: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ArticlePromotionGalleryItem {
|
|
9
|
+
/** Matches an entry in `assets/showcase/manifest.json`. */
|
|
10
|
+
id: string;
|
|
11
|
+
caption: string;
|
|
12
|
+
alt: string;
|
|
13
|
+
}
|
|
14
|
+
export interface ArticlePromotionCopy {
|
|
15
|
+
title: string;
|
|
16
|
+
lead: string;
|
|
17
|
+
subheadline: string;
|
|
18
|
+
/** Text alternative of the lead gallery image. */
|
|
19
|
+
imageAlt: string;
|
|
20
|
+
features: readonly ArticlePromotionFeature[];
|
|
21
|
+
visitLabel: string;
|
|
22
|
+
/** Secondary call to action. */
|
|
23
|
+
docsLabel: string;
|
|
24
|
+
galleryHeading: string;
|
|
25
|
+
gallery: readonly ArticlePromotionGalleryItem[];
|
|
26
|
+
/** Visible caption beside the Windows download button. */
|
|
27
|
+
windowsLabel: string;
|
|
28
|
+
/** Text of the static fallback link to the Microsoft Store listing. */
|
|
29
|
+
windowsStoreLabel: string;
|
|
30
|
+
/** Accessible name and tooltip for the Microsoft Store badge and its fallback link. */
|
|
31
|
+
windowsStoreAriaLabel: string;
|
|
32
|
+
/** Link to the all-platforms downloads page. */
|
|
33
|
+
allDownloadsLabel: string;
|
|
34
|
+
shareLabel: string;
|
|
35
|
+
/** One sentence ending with the website address. */
|
|
36
|
+
shareText: string;
|
|
37
|
+
}
|
|
38
|
+
export { COPY };
|
|
39
|
+
export declare function resolveArticlePromotion(frontmatterValue: unknown, siteDefault?: boolean): boolean;
|
|
40
|
+
export declare function getArticlePromotionCopy(lang: string | undefined): ArticlePromotionCopy;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { COPY } from './article-promotion-copy/index.js';
|
|
2
|
+
export { COPY };
|
|
3
|
+
export function resolveArticlePromotion(frontmatterValue, siteDefault = true) {
|
|
4
|
+
if (typeof siteDefault !== 'boolean') {
|
|
5
|
+
throw new TypeError('Hagilight hagicodePromotion enabled default must be a boolean.');
|
|
6
|
+
}
|
|
7
|
+
if (frontmatterValue !== undefined && typeof frontmatterValue !== 'boolean') {
|
|
8
|
+
throw new TypeError('Hagilight frontmatter hagicodePromotion must be a boolean.');
|
|
9
|
+
}
|
|
10
|
+
return frontmatterValue ?? siteDefault;
|
|
11
|
+
}
|
|
12
|
+
export function getArticlePromotionCopy(lang) {
|
|
13
|
+
return (lang === undefined ? undefined : COPY[lang]) ?? COPY['en-US'];
|
|
14
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const labels = {
|
|
2
|
+
'de-DE': { group: 'Inhaltsbreite', wide: 'Breit', narrow: 'Schmal' },
|
|
3
|
+
'en-US': { group: 'Content width', wide: 'Wide', narrow: 'Narrow' },
|
|
4
|
+
'es-ES': { group: 'Ancho del contenido', wide: 'Ancho', narrow: 'Estrecho' },
|
|
5
|
+
'fr-FR': { group: 'Largeur du contenu', wide: 'Large', narrow: 'Étroit' },
|
|
6
|
+
'ja-JP': { group: 'コンテンツ幅', wide: '広い', narrow: '狭い' },
|
|
7
|
+
'ko-KR': { group: '콘텐츠 너비', wide: '넓게', narrow: '좁게' },
|
|
8
|
+
'pt-BR': { group: 'Largura do conteúdo', wide: 'Ampla', narrow: 'Estreita' },
|
|
9
|
+
'ru-RU': { group: 'Ширина содержимого', wide: 'Широкая', narrow: 'Узкая' },
|
|
10
|
+
'zh-CN': { group: '内容宽度', wide: '宽', narrow: '窄' },
|
|
11
|
+
'zh-Hant': { group: '內容寬度', wide: '寬', narrow: '窄' },
|
|
12
|
+
};
|
|
13
|
+
export function getContentWidthLabels(lang) {
|
|
14
|
+
return (lang === undefined ? undefined : labels[lang]) ?? labels['en-US'];
|
|
15
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type ContentWidthMode = 'wide' | 'narrow';
|
|
2
|
+
export declare const STORAGE_KEY = "hagilight-content-width";
|
|
3
|
+
export declare function restoreContentWidth(root?: HTMLElement): ContentWidthMode;
|
|
4
|
+
export declare function setContentWidth(mode: ContentWidthMode, root?: HTMLElement): void;
|
|
5
|
+
export declare function synchronizeContentWidthFromStorage(event: Pick<StorageEvent, 'key' | 'newValue'>, root?: HTMLElement): void;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export const STORAGE_KEY = 'hagilight-content-width';
|
|
2
|
+
const VALID_MODES = new Set(['wide', 'narrow']);
|
|
3
|
+
function normalizeMode(value) {
|
|
4
|
+
return VALID_MODES.has(value) ? value : 'wide';
|
|
5
|
+
}
|
|
6
|
+
function synchronizeButtons(root, mode) {
|
|
7
|
+
root.querySelectorAll('[data-hagilight-content-width-choice]').forEach((button) => {
|
|
8
|
+
button.setAttribute('aria-pressed', String(button.dataset.hagilightContentWidthChoice === mode));
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
export function restoreContentWidth(root = document.documentElement) {
|
|
12
|
+
let mode = 'wide';
|
|
13
|
+
try {
|
|
14
|
+
mode = normalizeMode(globalThis.localStorage.getItem(STORAGE_KEY));
|
|
15
|
+
}
|
|
16
|
+
catch {
|
|
17
|
+
mode = 'wide';
|
|
18
|
+
}
|
|
19
|
+
root.dataset.hagilightContentWidth = mode;
|
|
20
|
+
synchronizeButtons(root, mode);
|
|
21
|
+
return mode;
|
|
22
|
+
}
|
|
23
|
+
export function setContentWidth(mode, root = document.documentElement) {
|
|
24
|
+
if (!VALID_MODES.has(mode)) {
|
|
25
|
+
throw new TypeError('Hagilight content width must be "wide" or "narrow".');
|
|
26
|
+
}
|
|
27
|
+
root.dataset.hagilightContentWidth = mode;
|
|
28
|
+
synchronizeButtons(root, mode);
|
|
29
|
+
try {
|
|
30
|
+
globalThis.localStorage.setItem(STORAGE_KEY, mode);
|
|
31
|
+
}
|
|
32
|
+
catch {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
export function synchronizeContentWidthFromStorage(event, root = document.documentElement) {
|
|
37
|
+
if (event.key !== STORAGE_KEY && event.key !== null)
|
|
38
|
+
return;
|
|
39
|
+
const mode = normalizeMode(event.newValue);
|
|
40
|
+
root.dataset.hagilightContentWidth = mode;
|
|
41
|
+
synchronizeButtons(root, mode);
|
|
42
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import type { StarlightPlugin } from '@astrojs/starlight/types';
|
|
2
|
+
import type { SiteLinksOptions } from '@hagicode/hagilight-core/links';
|
|
3
|
+
import type { AIDisclosureDefaults } from './ai-disclosures.js';
|
|
4
|
+
import { type RssContentOptions } from './rss-utils.js';
|
|
5
|
+
import { type SeoOrganization } from './seo-utils.js';
|
|
6
|
+
export interface HagilightToggleOptions {
|
|
7
|
+
enabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface HagilightPromotionOptions extends HagilightToggleOptions {
|
|
10
|
+
/** Swap the showcase illustration for one random pool entry per page view. Defaults to `true`. */
|
|
11
|
+
randomAvatar?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface HagilightFooterOptions {
|
|
14
|
+
/** Show the decorative avatar in the footer brand block. Defaults to `true`. */
|
|
15
|
+
avatar?: boolean;
|
|
16
|
+
/** Swap the footer avatar for one random pool entry per page view. Defaults to `true`. */
|
|
17
|
+
randomAvatar?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface HagilightGoogleAnalyticsOptions {
|
|
20
|
+
/** Defaults to `true` when the provider options are omitted, otherwise to whether `measurementId` is set. */
|
|
21
|
+
enabled?: boolean;
|
|
22
|
+
/** Google Analytics 4 measurement ID such as `G-ABC123`. */
|
|
23
|
+
measurementId?: `G-${string}`;
|
|
24
|
+
}
|
|
25
|
+
export interface HagilightFiftyOneLaOptions {
|
|
26
|
+
/** Defaults to `true` when the provider options are omitted, otherwise to whether `siteId` is set. */
|
|
27
|
+
enabled?: boolean;
|
|
28
|
+
siteId?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface HagilightAnalyticsOptions {
|
|
31
|
+
googleAnalytics?: HagilightGoogleAnalyticsOptions;
|
|
32
|
+
fiftyOneLa?: HagilightFiftyOneLaOptions;
|
|
33
|
+
posthog?: HagilightPostHogOptions;
|
|
34
|
+
}
|
|
35
|
+
export interface HagilightPostHogOptions {
|
|
36
|
+
/** Defaults to true when the provider options are omitted, otherwise to whether apiKey is set. */
|
|
37
|
+
enabled?: boolean;
|
|
38
|
+
apiKey?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface HagilightSeoOptions {
|
|
41
|
+
/** Replace Starlight's Head with Hagilight SEO metadata. Defaults to `true`; requires Astro `site`. */
|
|
42
|
+
enabled?: boolean;
|
|
43
|
+
title?: string;
|
|
44
|
+
description?: string;
|
|
45
|
+
/** Absolute HTTP(S) URL or site-root path of the default sharing image. */
|
|
46
|
+
image?: string;
|
|
47
|
+
organization?: SeoOrganization;
|
|
48
|
+
}
|
|
49
|
+
export interface HagilightRssOptions extends RssContentOptions {
|
|
50
|
+
/** Generate `/rss.xml` and localized feeds. Defaults to `true`; requires Astro `site`. */
|
|
51
|
+
enabled?: boolean;
|
|
52
|
+
}
|
|
53
|
+
export interface HagilightThemesOptions {
|
|
54
|
+
/**
|
|
55
|
+
* Replace Starlight's light/dark picker with the Hagilight theme picker: four themes
|
|
56
|
+
* (the default plus Ocean, Sakura, and Forest) in light and dark, plus a "default"
|
|
57
|
+
* choice that follows the system color scheme and renders the Forest theme, so
|
|
58
|
+
* first-visit users see Forest until they pick another theme.
|
|
59
|
+
* Defaults to `true`.
|
|
60
|
+
*/
|
|
61
|
+
enabled?: boolean;
|
|
62
|
+
}
|
|
63
|
+
export interface HagilightContentComponentsOptions {
|
|
64
|
+
pageTitle?: boolean;
|
|
65
|
+
markdownContent?: boolean;
|
|
66
|
+
}
|
|
67
|
+
export type HagilightAIDisclosureOptions = Partial<AIDisclosureDefaults>;
|
|
68
|
+
export interface HagilightMetadataOptions {
|
|
69
|
+
/** Defaults to `true`. */
|
|
70
|
+
enabled?: boolean;
|
|
71
|
+
/** Site name. Defaults to the Starlight `title` for the default locale, then the site hostname. */
|
|
72
|
+
name?: string;
|
|
73
|
+
/** Site description. Defaults to the Starlight `description` when the site sets one. */
|
|
74
|
+
description?: string;
|
|
75
|
+
}
|
|
76
|
+
export interface HagilightStarlightOptions {
|
|
77
|
+
/**
|
|
78
|
+
* Generate `/.well-known/hagilight.metadata.json` after the build. Defaults to `true`; `false`
|
|
79
|
+
* opts out, and an options object may set `name` and `description`. A site-provided file is
|
|
80
|
+
* never overwritten. When a plain-Astro `hagilight()` is also registered, this plugin writes
|
|
81
|
+
* the file and the plain-Astro integration defers to it.
|
|
82
|
+
*/
|
|
83
|
+
metadata?: boolean | HagilightMetadataOptions;
|
|
84
|
+
header?: HagilightToggleOptions;
|
|
85
|
+
notFoundPage?: HagilightToggleOptions;
|
|
86
|
+
rss?: HagilightRssOptions;
|
|
87
|
+
analytics?: HagilightAnalyticsOptions;
|
|
88
|
+
seo?: HagilightSeoOptions;
|
|
89
|
+
contentComponents?: HagilightContentComponentsOptions;
|
|
90
|
+
aiDisclosures?: HagilightAIDisclosureOptions;
|
|
91
|
+
/** Theme picker with three extra light/dark themes and a Forest first-visit default. */
|
|
92
|
+
themes?: HagilightThemesOptions;
|
|
93
|
+
/** Footer brand block options: the decorative avatar and its random pool. */
|
|
94
|
+
footer?: HagilightFooterOptions;
|
|
95
|
+
/** End-of-article HagiCode introduction. */
|
|
96
|
+
hagicodePromotion?: HagilightPromotionOptions;
|
|
97
|
+
/** Floating promotion banner rendered after the footer. */
|
|
98
|
+
promoto?: HagilightToggleOptions;
|
|
99
|
+
/** Body-image baseline (`loading`, `decoding`, marker class) for Markdown and MDX. Defaults to enabled. */
|
|
100
|
+
contentImages?: HagilightToggleOptions;
|
|
101
|
+
/** Header and footer link customization passed to `resolveSiteLinks`. */
|
|
102
|
+
links?: SiteLinksOptions;
|
|
103
|
+
}
|
|
104
|
+
/** Starlight plugin that applies HagiCode header, footer, content, SEO, RSS, and analytics customizations. */
|
|
105
|
+
export default function hagilight(options?: HagilightStarlightOptions): StarlightPlugin;
|