Skip to content

chore: sync upstream#1

Open
github-actions[bot] wants to merge 15 commits into
mainfrom
sync-upstream
Open

chore: sync upstream#1
github-actions[bot] wants to merge 15 commits into
mainfrom
sync-upstream

Conversation

@github-actions
Copy link
Copy Markdown

Automated changes by create-pull-request GitHub action

yusixian and others added 7 commits March 22, 2026 02:19
* feat: add ICP filing number config for footer (cosZone#142)

* chore: update version to 3.1.1
* feat: add bangumi media tracking page (cosZone#144)

* feat: add bangumi media tracking page

Integrate Bangumi API to display anime/book/music/game collections
with category tabs, status filters, pagination, and skeleton loading.
Configurable via `bangumi` section in site.yaml — comment out to disable.

* feat(bangumi): improve UI details and i18n completeness

- Replace text arrows with Iconify icon components in pagination
- Add missing i18n keys (bangumi.noImage, nav.bangumi)
- Change default icon to ri:bilibili-fill
- Remove unused fetchUserCollections export
- Pass URL object directly to fetch instead of toString()

* chore: update version to 3.2.0
* fix: limit link preview image height on mobile breakpoint

Add md:aspect-auto and md:max-h-48 to prevent OG images from taking
excessive vertical space in link preview cards on smaller screens.

* style(markdown): 调整图片容器的水平外边距为自动居中 (cosZone#149)

* fix(comment): 移除冗余的事件监听器,避免重复初始化 (cosZone#148)

避免重复初始化出现 Node.insertBefore 错误: Node.insertBefore: The parent element is not a document element

* chore: update version to 3.2.1

---------

Co-authored-by: Kissablecho <god_2077@outlook.com>
…ut (cosZone#152)

* feat(markdown): add image captions, portrait centering, and proportional row layout

Generate figcaption from alt text in rehype plugin with CLS-safe visibility
toggle. Center standalone portrait images and distribute row width by aspect
ratio so grouped portraits share the same rendered height. Switch default
placeholder aspect ratio from 16:9 to 4:3 for better landscape/portrait balance.
Also unwrap invalid <p><figure> nesting that broke portrait grouping.

* chore: update version to 3.2.2
…#154)

* fix: debounce portrait image grouping for lazy-loaded images

* chore: bump version to 3.2.4
yusixian and others added 3 commits March 30, 2026 22:39
* fix: use theme-aware colors for mobile language switcher (cosZone#156)

Replace hardcoded white text/background colors with theme-aware
Tailwind classes so the language switcher is visible in light mode.

* chore: bump version to 3.2.6
* fix: post cover component not translated (cosZone#158)

* fix: improve translation handling in post cover component

* fix: limit pagefind index to article content and fix cover syntax error

Add data-pagefind-body to post and page layouts to prevent indexing
nav, sidebar, footer and comments. Fix extra closing brace in Cover.astro
that broke the build.

* chore: bump version to 3.2.7

---------

Co-authored-by: EndermanbugZJFC <175898536+Ezjfc@users.noreply.github.com>
Updated GitHub funding configuration to include a sponsor.
yusixian and others added 3 commits April 7, 2026 20:56
* docs: 更新文档以包含对 Twikoo 评论系统 (cosZone#162)

* docs: 在README.md中添加Ksable的博客链接 (cosZone#167)

* docs: 在README.md中添加Ksable的博客链接

* 更新 README.md

* feat: 为页脚随机文章与相关推荐模块添加国际化支持 (cosZone#163)

* refactor(国际化): 将分类名称翻译功能提取到单独模块

* feat: 为页脚随机文章与相关推荐模块添加国际化支持

* fix: make Meting API endpoint configurable (cosZone#170)

* feat: extract Meting API URL to site config

Move hardcoded Meting API endpoint into `bgm.metingApi` in
`config/site.yaml`, defaulting to `https://163.hyc.moe/`.

* docs: add Meting API configuration guide and BGM section

* fix: use URL constructor for Meting API endpoint to handle trailing slash

* fix: improve mobile header heading detection & add react-grab dev tool (cosZone#169)

* feat: 移动端页面滑至顶部 / 底部时,header 显示 logo (cosZone#161)

* feat: add react-grab for development context copying

* refactor: simplify heading detection logic by removing article visibility observer and optimizing Intersection Observer setup

* fix: add rAF race guard and remove redundant id check in useCurrentHeading

* refactor: extract shared heading lookup, add rAF dedup guard, remove redundant type casts

---------

Co-authored-by: Kissablecho <god_2077@outlook.com>

* chore: bump version to v3.3.0

---------

Co-authored-by: Kissablecho <god_2077@outlook.com>
* fix: prevent TOC heading flickering during programmatic scroll

Add a heading scroll lock mechanism that temporarily locks the active
heading ID when a TOC item is clicked, preventing IntersectionObserver
callbacks from causing rapid highlight switching during smooth scroll.

* fix: enhance heading detection logic in useCurrentHeading hook

* refactor: simplify Docker build and improve deployment scripts (cosZone#172)

* feat: update docker scripts and docs

* refactor: remove docker build-time env vars and clean up scripts

Migrate REMARK/UMAMI configuration from Docker build ARGs to site.yaml.
Simplify Dockerfile, translate shell messages to English, and update
.env.example with BLOG_PORT and REACT_GRAB entries.

* chore: bump version to v3.3.1
* style: enhance layout responsiveness and scrollbar width

* Update translate v3.2.0 (cosZone#174)

Added Japanese translations for Bangumi features including titles, descriptions, and statuses.

* fix: 修复对关键词支持,原代码似乎没有支持关键词 (cosZone#166)

* fix(seo): 修复对关键词支持,原主题似乎没有支持关键词(都没看到相关代码)
* docs: 添加关键词示例文档
* docs: 更新文章(自定义关键词示例)日期为2026-04-05
* feat: 更新关键词相关文档和实现

- 规范博客文章中的关键词格式,移除测试内容
- 修复关键词合并逻辑,避免重复并支持数组类型
- 修正布局文件中关于关键词的注释说明

* refactor(slug): replace pinyin-pro with transliteration, add feature flag (cosZone#177)

* feat: 将文章的中文、日文 URL 转换为拼音 / 罗马字母 (cosZone#165)

* feat: 将文章的中文、日文 URL 转换为拼音 / 罗马字母

* feat(slug): 添加配置开关控制是否启用 slug 转换功能

在 site.yaml 配置文件中添加 enableSlugTransliteration 选项,用于控制是否将含有中文/日语等字符的 slug 转换为拼音/罗马字母。同时在类型定义和配置常量中添加相应字段,并在 locale.ts 中实现根据配置决定是否进行转换的逻辑。

* Delete todo.md

* feat: 添加保留旧链接功能脚本

添加 preserve-old-links 脚本用于在启用 slug 转换功能时保留旧链接
更新 site.yaml 配置说明
新增脚本文件用于自动处理文章链接

* refactor(scripts): 优化旧链接保留脚本的逻辑和结构

- 简化语言前缀处理逻辑
- 重构文章解析和元数据处理
- 改进代码组织和变量命名
- 移除冗余代码和注释
- 添加批量处理进度显示

* refactor(locale): 移除遗漏的调试代码

---------

Co-authored-by: cos <i@cosine.ren>

* refactor(slug): 重构 transliteration 实现,恢复类型安全与架构一致性

- 删除 PostRefWithSlugLinkAndDataLink 类型(含 [key: string]: any)
- 提取 transliterateSlug 纯函数至 src/lib/slug.ts,内置 config 开关
- getPostSlug 恢复只接受 BlogPost,transforms slug extractor 统一调用 getPostSlug
- React 组件恢复 post.link ?? post.slug,移除对 getPostSlug 的不当依赖
- routeBuilder 使用 'collection' in param 安全判别 BlogPost vs PostRef
- 用 gray-matter 重写 preserve-old-links.ts,添加 --dry-run 支持
- 替换 pinyin-pro 为 transliteration(覆盖中文拼音+日文罗马音)

* fix(slug): use English comments, avoid frontmatter reformat, remove unrelated .gitattributes

- Convert Chinese comments to English in config/site.yaml, types.ts, preserve-old-links.ts
- Replace matter.stringify with direct string insertion to preserve original frontmatter formatting
- Remove .gitattributes (unrelated to transliteration refactor)

* fix(slug): add YAML quoting, type guard, and clarify CLI transliteration intent

- Add yamlQuote() in preserve-old-links to escape YAML-special chars in slug values
- Replace `as BlogPost` assertion with proper isBlogPost() type guard in routeBuilder
- Translate Chinese comments to English in route.ts
- Document that CLI generateSlug always transliterates for filesystem safety

* fix(cache): restore accidentally trimmed OG metadata entries

* fix(slug): sync CMS slug library to transliteration, restore og-data cache

- Replace pinyin-pro with transliteration in cms/src/lib/slug.ts to match
  main project and CLI behavior (fixes Japanese kana handling divergence)
- Clarify route.ts comment: PostRef.link (raw frontmatter) takes precedence
  over transliterated slug
- Restore .cache/og-data.json to dev version to avoid cache data loss

* feat(seo): add keywords support for blog posts

Add optional `keywords` field to blog schema for per-post SEO keywords.
Generate `<meta name="keywords">` tag in Layout, merge post keywords
with site-level keywords in JSON-LD structured data.

* refactor(slug): rename preserve-old-links script to save-slugs

---------

Co-authored-by: Kissablecho <god_2077@outlook.com>

* feat(analytics): add Umami pageview stats display (cosZone#176)

* feat(analytics): 添加 Umami 统计显示功能 (cosZone#168)

- 在页脚添加全站访问量统计显示
- 支持文章详情页访问量显示
- 新增 Umami 统计相关类型定义和工具函数
- 更新多语言翻译支持统计显示

* refactor(analytics): improve Umami stats security, types, and DRY

- Remove classic Bearer token support, only allow shared tokens
- Fix double encodeURI bug and error response parsing
- Deduplicate AnalyticsConfig type, simplify UmamiSessionStats with UmamiValue helper
- Pre-compute umami configs in site-config.ts (umamiSiteStatsConfig, createArticleStatsConfig)
- Add inflight request deduplication to prevent duplicate fetches
- Rename i18n key footer.pageviews → stats.pageviews
- Rewrite UmamiPVSpan with idiomatic useState pattern

* feat(analytics): enable Umami analytics tracking

* fix(analytics): improve Umami stats robustness and error handling

- Check response.ok before parsing JSON to handle non-JSON errors
- Add 5-min TTL cache for pageview results across ViewTransitions
- Normalize paths by stripping trailing slashes for consistent matching
- Use undefined/null/number state instead of string literal 'N/A'
- Change <p> to <span> for inline pageview stats in PostItemCard

* fix(analytics): gate Umami stats on token presence and stabilize useEffect deps

Comment out statistics_display in site.yaml by default so stats are opt-in.
Add token presence check to gating conditions — no token means no stats.
Destructure statsConfig into primitives for stable useEffect dependencies.
Add dev-mode actionable error logging and intent comment for startAt=0.

* fix(analytics): enhance error handling in UmamiPVSpan and normalize API path

* fix: review fixes for umami stats and pre-existing TS error

- Cover.astro: client:load → client:idle for non-critical PV span
- umami-stats.ts: createUmamiStatsConfig returns null when token missing
  instead of silently producing a broken config with empty shareToken
- umami-stats.ts types: trim UmamiSessionStats to only consumed fields
- useCurrentHeading.ts: forEach → for...of to fix TS control-flow
  narrowing (closestElement was narrowed to never inside closure)

---------

Co-authored-by: Kissablecho <god_2077@outlook.com>

* feat(post-card): add ScrollableRow component and improve Umami stats display

Replace plain overflow divs with ScrollableRow in PostItemCard for better
horizontal scroll UX with fade masks and hover arrows. Add JWT token
resolution for Umami share API and compact number formatting for pageviews.

* feat(analytics): enhance Umami share token integration and documentation

* chore: bump version to 4.0.0

BREAKING CHANGE: config/site.yaml schema changed (new analytics.umami.statistics_display and site.enableSlugTransliteration fields), pinyin-pro replaced with transliteration.

---------

Co-authored-by: Re*Index. (ot_inc) <32851879+reindex-ot@users.noreply.github.com>
Co-authored-by: Kissablecho <god_2077@outlook.com>
yusixian and others added 2 commits May 16, 2026 23:15
* docs: 基于 README.md 同步英文与日文翻译文档 (cosZone#179)

* fix: prevent react-grab from loading unconditionally in production (cosZone#184)

* 删除 Layout.astro 中无用的预连接第三方域名资源提示 (cosZone#182)

* feat(LinkEmbed): 修复 LinkEmbed 配置不生效问题、以及其它相关的若干问题 (cosZone#180)

* feat(LinkEmbed): 修复 LinkEmbed 配置不生效问题、以及其它相关的若干问题

- 修复 enableLinkEmbed、previewCacheTime 配置不生效
- 添加 CodePen 嵌入
- more

* docs(config): 将预览信息缓存时间单位从秒改为天

* refactor(ReactGrab): update ReactGrabInit component and adjust cache TTL handling

* chore: bump version to v4.1.0

* refactor(dev): replace ReactGrabInit component with is:inline script via esm.sh

- Drop standalone React component used solely for side-effect import.
- Use is:inline + CDN to skip Astro/Vite bundling entirely.
- Remove react-grab devDependency since import now resolves at runtime.

* chore(dev): remove react-grab integration entirely

CDN-based is:inline approach added new failure modes (Astro template
interpolation quirks inside <script>). The dev tool's value didn't justify
the integration complexity. Drop the layout block, env flag, and related
comments. .env.example REACT_GRAB line should be removed manually.

---------

Co-authored-by: Kissablecho <god_2077@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant