feat: add SharePanel component for social sharing with QR code support
- Implemented SharePanel component in `SharePanel.astro` for sharing content on social media platforms. - Integrated QR code generation for WeChat sharing using the `qrcode` library. - Added localization support for English and Chinese languages. - Created utility functions in `seo.ts` for building article summaries and FAQs. - Introduced API routes for serving IndexNow key and generating full LLM catalog and summaries. - Enhanced SEO capabilities with structured data for articles and pages.
This commit is contained in:
@@ -824,6 +824,7 @@ function createSiteSettings() {
|
||||
media_r2_secret_access_key: 'mock-secret',
|
||||
seo_default_og_image: `${MOCK_ORIGIN}/media-files/default-og.svg`,
|
||||
seo_default_twitter_handle: '@initcool',
|
||||
seo_wechat_share_qr_enabled: false,
|
||||
notification_webhook_url: 'https://notify.mock.invalid/termi',
|
||||
notification_channel_type: 'webhook',
|
||||
notification_comment_enabled: true,
|
||||
@@ -2528,8 +2529,19 @@ const server = createServer(async (req, res) => {
|
||||
recent_events: [],
|
||||
providers_last_7d: [{ provider: 'mock-openai', count: 18 }],
|
||||
top_referrers: [{ referrer: 'homepage', count: 44 }],
|
||||
ai_referrers_last_7d: [
|
||||
{ referrer: 'chatgpt-search', count: 21 },
|
||||
{ referrer: 'perplexity', count: 9 },
|
||||
{ referrer: 'copilot-bing', count: 6 },
|
||||
],
|
||||
ai_discovery_page_views_last_7d: 36,
|
||||
popular_posts: getHomePayload().popular_posts,
|
||||
daily_activity: [{ date: '2026-04-01', searches: 9, ai_questions: 5 }],
|
||||
daily_activity: [
|
||||
{ date: '2026-03-29', searches: 6, ai_questions: 3 },
|
||||
{ date: '2026-03-30', searches: 7, ai_questions: 4 },
|
||||
{ date: '2026-03-31', searches: 11, ai_questions: 6 },
|
||||
{ date: '2026-04-01', searches: 9, ai_questions: 5 },
|
||||
],
|
||||
})
|
||||
return
|
||||
}
|
||||
@@ -2707,6 +2719,7 @@ const server = createServer(async (req, res) => {
|
||||
mediaR2SecretAccessKey: 'media_r2_secret_access_key',
|
||||
seoDefaultOgImage: 'seo_default_og_image',
|
||||
seoDefaultTwitterHandle: 'seo_default_twitter_handle',
|
||||
seoWechatShareQrEnabled: 'seo_wechat_share_qr_enabled',
|
||||
notificationWebhookUrl: 'notification_webhook_url',
|
||||
notificationChannelType: 'notification_channel_type',
|
||||
notificationCommentEnabled: 'notification_comment_enabled',
|
||||
|
||||
Reference in New Issue
Block a user