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:
@@ -19,6 +19,20 @@ export async function getDebugState(request: APIRequestContext) {
|
||||
return response.json()
|
||||
}
|
||||
|
||||
export async function patchAdminSiteSettings(
|
||||
request: APIRequestContext,
|
||||
payload: Record<string, unknown>,
|
||||
) {
|
||||
const response = await request.patch(`${MOCK_BASE_URL}/api/admin/site-settings`, {
|
||||
headers: {
|
||||
cookie: `${ADMIN_COOKIE.name}=${ADMIN_COOKIE.value}`,
|
||||
},
|
||||
data: payload,
|
||||
})
|
||||
expect(response.ok()).toBeTruthy()
|
||||
return response.json()
|
||||
}
|
||||
|
||||
export async function loginAdmin(page: Page) {
|
||||
await page.goto('/login')
|
||||
await page.getByLabel('用户名').fill('admin')
|
||||
|
||||
Reference in New Issue
Block a user