Skip to content

Repository files navigation

Laya Case

CI Live Preview License: MIT

A curated collection of the best Laya articles and open-source cases — searchable, filterable, runnable 收集优秀的 Laya 相关文章与开源案例 —— 可搜索、可筛选、可复制运行

Laya Case case wall preview

English · 简体中文

Unofficial community project, not affiliated with Convai Innovations / Laya. Models, snippets, accounts and trademarks belong to their original authors and platforms.

Laya Case collects the best Laya-related articles and open-source cases from across the web — including many hands-on Laya vs Jev comparisons — into one searchable wall.

Features

Description
Every source GitHub repos, HuggingFace models and spaces, Reddit threads, blog posts, in one wall
Search & filters Full-text search, source and tag filters, hot / new / stars / code-first sorting
Bilingual UI Chinese-first interface; English cases carry a Chinese reference
Runnable code Snippets on every detail page, one click to copy
Real covers Each case uses its platform's own art: repo social card, model card, article image, post preview
Fresh data Every Monday the pipeline re-collects and merges; one failing source never blocks the run
Static Astro output with canonical / Open Graph / JSON-LD; desktop and mobile layouts

Tech Stack

Layer Choice
Static site Astro
Interactive components React
Styling Plain CSS
Data pipeline Node.js collection and merge scripts
Testing Playwright smoke tests, desktop + mobile

Getting Started

npm install
npm run dev

The dev server runs at http://localhost:4321/laya-case/, the exact same /laya-case/ subpath as production.

npm run check   # type check
npm run build   # static build → dist/

Pushing to main builds and deploys via GitHub Actions to the Live Preview. The base is pinned to /laya-case/ (see astro.config.mjs), so local, tests and production share the identical subpath and produce byte-identical output.

Data

npm run data:fetch     # collect GitHub / HuggingFace / Reddit / blogs (covers backfilled at the end)
npm run data:fetch -- --only=github   # collect a subset of sources
npm run data:covers    # backfill missing covers and repair dead ones
npm run data:build     # merge auto + manual → src/data/cases.json
  • Collection output: src/data/auto/*.json; hand-picked entries: src/data/manual/*.json (X, Zhihu and other sources without a public API — manual wins on the same URL)
  • src/data/cases.json is generated by the merge script — never edit it by hand
  • Cover strategy: GitHub repo social cards, HuggingFace official thumbnails, og:image and preview images for articles and posts; Zhihu and Juejin are skipped as they block collectors
  • Without GITHUB_TOKEN, GitHub search is limited to 10 requests per minute; configure one to raise the quota
  • English sources default to translation.status: "pending"; Chinese references are added manually or by a later translation pass
  • refresh-data.yml re-collects and merges every Monday 03:00 UTC (manual trigger supported); below 60 cases aborts the publish; only when data actually changed does github-actions[bot] commit and trigger a deploy

Case Schema

schemaVersion: 1. Each case carries:

  • sourceType: github / huggingface / reddit / x / threads / blog / video / official
  • title, excerpt, author, canonicalUrl, createdAt, lang
  • translation: Chinese reference (ready / pending)
  • code: runnable snippet (language + source)
  • metrics: stars / forks / upvotes / comments / likes / views (per source)
  • tags: purpose tags; variants: Laya variants or runtimes used
  • links, imageUrl, curatedAt, curatedBy

Site Origin

The public origin is injected at build time through an environment variable, used for canonical URLs and share metadata; the /laya-case/ subpath is pinned to base in astro.config.mjs. CI injects it automatically; the local equivalent:

PUBLIC_SITE_URL=<your-origin> npm run build

Test

npm run test:smoke                            # local (dev server running)
TEST_ORIGIN=<live-origin> npm run test:smoke  # same suite against production

Tests use the local Chrome by default.

Credits & License

  • Structure based on Jev-Case (MIT) — thanks Hiwoniu
  • Laya models and weights belong to Convai Innovations (Apache 2.0)
  • Code licensed under the MIT License; content rights remain with the original authors and platforms

简体中文

🌐 在线预览 · English

Laya Case 收集全网优秀的 Laya 相关文章与开源案例——含大量 Laya vs Jev 对比实测——汇成一面静态案例墙,保留来源链接、作者、数据指标、可运行代码与外链。

非官方社区项目,与 Convai Innovations / Laya 无隶属关系;模型、代码片段、账号信息与商标权利归原作者及原平台所有。

特性

说明
全来源收录 GitHub 仓库、HuggingFace 模型与 Space、Reddit 讨论、博客文章,一墙尽览
搜索与筛选 关键词搜索,来源与用途标签筛选,支持热门 / 最新 / Star / 代码优先排序
中英双语 界面中文优先,英文案例附中文参考,详情页原文对照
可运行代码 详情页内嵌代码片段,一键复制
真实封面 每条案例使用各平台官方画面:仓库社交卡、模型卡缩略图、文章配图、帖子预览
定时保鲜 每周一自动采集合并;单来源失败不阻断,空结果不覆盖
纯静态 Astro 静态生成,canonical / Open Graph / JSON-LD 齐全,适配桌面与移动端

技术栈

层 选型
静态站点 Astro
交互组件 React
样式 原生 CSS
数据管道 Node.js 采集与合并脚本
测试 Playwright 桌面 + 移动端冒烟测试

快速开始

npm install
npm run dev

开发服务器运行在 http://localhost:4321/laya-case/,与线上使用完全相同的 /laya-case/ 子路径。

npm run check   # 类型检查
npm run build   # 静态构建 → dist/

推送到 main 后由 GitHub Actions 自动检查、构建并发布到 在线预览。base 固定为 /laya-case/(见 astro.config.mjs),本地、测试与线上运行在完全相同的子路径,产物逐字节一致。

数据

npm run data:fetch                    # 采集 GitHub / HuggingFace / Reddit / 博客,末尾自动补封面
npm run data:fetch -- --only=github   # 只采集部分来源
npm run data:covers                   # 单独补齐缺失封面并修复死图
npm run data:build                    # 合并 auto + manual → src/data/cases.json
  • 自动采集输出到 src/data/auto/*.json;手动精选放在 src/data/manual/*.json(X、知乎等无公开 API 的来源),同 URL 时 manual 覆盖 auto
  • src/data/cases.json 由合并脚本生成,请勿手改
  • 封面策略:GitHub 取仓库社交卡、HuggingFace 取官方缩略图、文章与帖子取 og:image 与预览图;知乎与掘金因反爬跳过
  • 无 GITHUB_TOKEN 时 GitHub 搜索限 10 次/分,配置后配额提升
  • 英文来源默认 translation.status: "pending",中文参考由人工或后续翻译流程补充
  • refresh-data.yml 每周一 03:00 UTC 定时采集合并,支持手动触发;案例数低于 60 条时中止发布;数据有变化才由 github-actions[bot] 提交并触发部署

案例结构

schemaVersion: 1,每条案例包含:

  • sourceType:github / huggingface / reddit / x / threads / blog / video / official
  • title、excerpt、author、canonicalUrl、createdAt、lang
  • translation:中文参考(ready / pending)
  • code:可运行代码片段(语言 + 源码)
  • metrics:stars / forks / upvotes / comments / likes / views(按来源取用)
  • tags:用途标签;variants:用到的 Laya 变体或运行时
  • links、imageUrl、curatedAt、curatedBy

站点域名

构建时通过环境变量注入公开 origin,用于 canonical 与分享元数据;/laya-case/ 子路径固定在 astro.config.mjs 的 base。CI 自动注入,本地等效命令:

PUBLIC_SITE_URL=<站点域名> npm run build

测试

npm run test:smoke                          # 本地(需 dev server 运行中)
TEST_ORIGIN=<线上域名> npm run test:smoke    # 对线上部署执行同一套测试

测试默认使用本机 Chrome。

致谢与许可

  • 代码结构基于 Jev-Case(MIT License),感谢 Hiwoniu
  • Laya 模型与权重归 Convai Innovations 所有(Apache 2.0)
  • 代码使用 MIT License(继承自 Jev-Case);推文、文章、代码片段、账号信息与商标权利归原作者及原平台所有

About

Curated wall of Laya-related articles & open-source cases — Laya vs Jev, System 1 decision models. 收集优秀的 Laya 相关文章与开源案例

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages