Repository navigation
v0.2.3
v0.2.3
日期:2026-10-15
这是 v0.2.2 之后的店面和安装回滚版。设备码、授权范围、买家注册、买入开关、支付成功条件、店面缓存、文本压缩范围和 Caddy 匹配都没有改。没有新的数据库迁移。compose.yaml 与 v0.2.2 相同。
没有激活商家店面时,访客看到的是这家店已经发布的名称、简介和商品货架,页脚用一行小字标明平台。商品页上的目录字段和规格轴,在商家已经写过中文名称时显示名称。公开 JSON、商品 Markdown 和支付判断仍用原来的机器字段。
一键安装在 .env 进入安装目录之前取消或失败,不留下这次的配置。升级没有完成时,把 compose.yaml 和版本号还原。已经换成新镜像的容器不会自动退回。生产应用镜像是 docker.io/<用户名>/merclink:0.2.3。正式版同时推送 0.2.3 和 latest。
中文
这一版能做什么
- 商品列表、商品页、找不到商品的页面和接口文档,导航上的店名是已发布的展示名,并链回首页。没有已发布店名时,这里仍是 MercLink。首页没有这行导航,主标题仍是店名槽位;店还没发布时,主标题是空的,不会改成 MercLink。
- 首页顺序是店名和简介、商品货架、客服与执照、使用说明、页脚。货架标题是「商品货架」。每行两张 4:5 的图,图下是名称、价格和「有货」或「缺货」。整张卡片链到商品页。窄屏一行一张,并露出下一张的边。货架下面仍是「查看更多」。没有左右切换按钮。
- 客服二维码显示宽度不超过 180px。执照图不超过 280px。两组事实都没有时,这块不出现。首页 HTML 不再写「商家自行填写,本系统未核验。」
/index.md和/llms.txt仍带这句。 - 页脚在口号下面增加
Powered by MercLink。商品 Markdown、三份 Skill,以及「如何使用 MercLink」这段说明,仍写 MercLink。 - 商品页右侧、规格下面的目录字段标题是「商品信息」。有字段显示名时给人看显示名,否则仍是字段 key。没有公开字段时这一节不出现。商品 Markdown 的标题仍是「公开字段」,并保留字段 key。
- 规格轴已经有名称时,内置商品页写成「名称 取值」,多项用中文逗号隔开。例如轴名是「珠径」时显示「珠径 11-12mm」。没有名称时仍是
key=value。没有规格组合时仍是「默认规格」。缺货仍是红色,有货仍是灰色。 - 已经激活的店面仍用商家上传的 HTML。服务端填
variant.options和product.variants时使用同一套轴名。新增槽位store.nav_name:有已发布店名时是店名,否则是 MercLink。店面 Skill 写明不要拿它当页面主标题。旧发布里没有这个槽位的页面不会因此改掉导航。 - 公开
GET /api/v1/products和单件 JSON 不增加轴名字段,规格仍是option_values。本地预览读的是这份 JSON,所以预览里的规格文字仍是key=value。这一版不补写历史轴名,也不改声明规格轴的接口。 - 第一次安装先把
compose.yaml和.env写在临时目录,再移入安装目录。.env移动成功才算提交。提交前按 Ctrl+C 或失败,删掉这次写下的部署文件;目录是这次新建并且已经空了,也删掉目录。提交之后再取消,保留.env、compose.yaml和数据卷,并提示不要删除.env。 - 升级开始前复制现有
compose.yaml,以及.env里的MERCLINK_IMAGE和MERCLINK_RELEASE_TAG。这份副本权限是700,不含密码和其他配置。下载、替换、拉取或启动没有完成,包括中途 Ctrl+C,都会还原这三项,并删掉半成品compose.yaml.next。不执行compose down,也不自动用旧镜像重建容器。提示里会要求再执行docker compose up -d,容器才会和还原后的文件一致。
这一版不做
- 不改设备码流程、scope、买家注册或支付成功条件。只有订单状态
paid表示支付成功。 - 不改店面 HTML 的
no-store,也不改 CSS、JS 的 10 分钟新鲜期和之后最多 24 小时的后台校验。 - 不改公开图片按 id 缓存一年的规则。缺失图片仍是
404。 - 不改 Caddy 的五行
Content-Type匹配,也不改镜像标签。仍是caddy:2.11.7-alpine。 - 不改一键安装询问的字段,不安装系统包,也不默认打开买入。
- 不在提交
.env之后删除密码或数据卷。不增加卸载命令。 - 不把已经运行的新容器自动换回旧镜像。
latest仍不是版本回滚点。 - 不把 Docker Hub 用户名、令牌、域名或证书写进仓库。升级不打印已保存的密码。
升级注意
页面变化在应用镜像里。安装回滚在这一版的 install.sh 里。compose.yaml 与 v0.2.2 相同;还停在 v0.2.1 那份单行匹配上的机器,仍要换成能通过校验的 Compose,否则 Caddy 起不来。不要删 .env,也不要删 caddy_data。
一键安装过的机器,等这个正式版发布后执行:
curl -fsSL -o /tmp/merclink-install.sh https://github.com/ptonlix/MercLink/releases/latest/download/install.sh && bash /tmp/merclink-install.sh upgradeupgrade 会下载这个 tag 的 compose.yaml,保留已有密钥和后来手工打开的买入配置,然后 pull。它不打印已保存的密码。这次升级如果没有完成,部署文件和版本号会回到升级前;已经换上的容器要再执行 docker compose up -d 才和文件一致。
手工部署的机器不要再跑一键安装。已经在用 v0.2.2 的 Compose 时,把 MERCLINK_IMAGE 改为 docker.io/<用户名>/merclink:0.2.3,然后执行:
docker compose pull && docker compose up -d不要加 --build。只换镜像可以得到新的公开页,但旧的 install.sh 没有这次的回滚。
回滚页面时,把应用镜像改回带版本号的标签,再 pull。不要把 latest 当作回滚点。latest 会在这个正式版发布时移到 0.2.3。退回 v0.2.1 的 Compose 会再次让 Caddy 退出。要退回旧代理配置,换回那一版能通过校验的 compose.yaml。
English
Date: 2026-10-15
This is the storefront and install-rollback release after v0.2.2. The device-code flow, authorization scopes, buyer registration, purchase switch, the rule that only paid means payment success, storefront caching, the set of compressed types, and the Caddy matchers are unchanged. There is no new database migration. compose.yaml is the same file as v0.2.2.
When no merchant storefront is active, visitors see the published store name, summary, and product shelf. The footer credits the platform in one short line. Catalog fields and variant axes use the merchant's Chinese names on the human product page when those names already exist. Public JSON, product Markdown, and the payment-success rule keep the existing machine fields.
A one-click install that is cancelled or fails before .env is in the install directory leaves no configuration from that attempt. An upgrade that does not finish restores compose.yaml and the version pin. Containers already recreated from the new image are not rolled back automatically. The production image is docker.io/<namespace>/merclink:0.2.3. The stable release also publishes latest.
What this version does
- The product list, product page, missing-product page, and interface docs use the published display name in the nav, linking back to the home page. With no published name, that word is still MercLink. The home page has no nav row. Its title remains the store-name slot. An unpublished store leaves that title empty. It does not become MercLink.
- The home page order is the store name and summary, the product shelf, contact and license facts, the usage guide, then the footer. The shelf heading is 商品货架. Each row shows two 4:5 photos, with the name, price, and 有货 or 缺货 under the photo. The whole card links to the product. A narrow screen shows one photo and a peek of the next. 查看更多 stays under the shelf. There are no previous or next buttons.
- A contact QR is shown no wider than 180px. A license image is shown no wider than 280px. The block is omitted when both fact groups are empty. Home-page HTML no longer includes 商家自行填写,本系统未核验。
/index.mdand/llms.txtstill include that sentence. - The footer adds
Powered by MercLinkunder the slogan. Product Markdown, the three skills, and the “如何使用 MercLink” guide still say MercLink. - Catalog fields on the product page sit under the variants. The heading is 商品信息. A person sees the display label when one exists, and the field key otherwise. The section is omitted when the product has no public fields. Product Markdown still uses the heading 公开字段 and keeps the field key.
- When a variant axis already has a name, the built-in product page shows
name value, joined with a Chinese comma. An axis named 珠径 is shown as珠径 11-12mm. An axis with no name stayskey=value. A variant with no options stays 默认规格. Out-of-stock text stays red. In-stock text stays gray. - An active storefront still serves the merchant's uploaded HTML. The server uses the same axis names when it fills
variant.optionsandproduct.variants. The new slot isstore.nav_name: the published store name, or MercLink when none is published. The storefront skill says not to use it as the page title. A release that does not contain this slot does not change its nav. - Public
GET /api/v1/productsand the single-product JSON do not gain an axis-name field. Variants remainoption_values. Local preview reads that JSON, so previewed option text stayskey=value. This version does not backfill old axis names and does not change the axis-declaration API. - A fresh install writes
compose.yamland.envin a temporary directory, then moves them into the install directory. The attempt is committed only when.envhas been moved. Cancelling with Ctrl+C or failing before that removes the deploy files written by the attempt. A directory created by the attempt is removed when it is empty. After the commit, cancelling keeps.env,compose.yaml, and the data volumes, and tells the operator not to delete.env. - Before changing an existing install, upgrade copies
compose.yamland theMERCLINK_IMAGEandMERCLINK_RELEASE_TAGvalues. The copy is mode700and does not contain passwords or other settings. If download, replacement, pull, or startup does not finish, including on Ctrl+C, those three values are restored and a partialcompose.yaml.nextis removed. Upgrade does not runcompose downand does not recreate containers from the old image. The message tells the operator to rundocker compose up -dbefore the containers match the restored files.
What this version does not do
- It does not change the device-code flow, scopes, buyer registration, or the payment-success rule. Only order status
paidmeans payment succeeded. - It does not change
no-storeon storefront HTML, or the 10-minute freshness window and later 24-hour background revalidation for CSS and JS. - It does not change the one-year cache for a public image id. A missing image is still
404. - It does not change Caddy's five
Content-Typelines or the image tag. It remainscaddy:2.11.7-alpine. - It does not change what one-click install asks for, it does not install system packages, and it does not turn purchase on by default.
- It does not delete passwords or data volumes after
.envis committed. It does not add an uninstall command. - It does not automatically move a running new container back to the old image.
latestis still not a rollback point. - It does not store a Docker Hub username, token, domain, or certificate in the repository. Upgrade does not print stored passwords.
Upgrade note
The page change is in the application image. Install rollback is in this version of install.sh. compose.yaml matches v0.2.2. A host still using the v0.2.1 one-line matcher must replace it with a Compose file that validates, or Caddy will not start. Do not delete .env or caddy_data.
After this stable release is published, a host installed by the script should run:
curl -fsSL -o /tmp/merclink-install.sh https://github.com/ptonlix/MercLink/releases/latest/download/install.sh && bash /tmp/merclink-install.sh upgradeupgrade downloads compose.yaml for this tag, keeps generated secrets and any later purchase settings, then pulls. It does not print stored passwords. If this upgrade does not finish, the deploy files and version pin return to their previous values. Containers already recreated from the new image match those files only after another docker compose up -d.
Do not run a fresh one-click install over a deployment that was created by hand. On a host that already uses the v0.2.2 Compose file, set MERCLINK_IMAGE to docker.io/<namespace>/merclink:0.2.3, then run:
docker compose pull && docker compose up -dDo not add --build. Pulling the image alone updates the public pages. An older install.sh does not include this rollback.
To roll the pages back, set the application image to a versioned tag and pull again. Do not use latest as the rollback point. latest moves to 0.2.3 when this stable release is published. Restoring the v0.2.1 Compose file makes Caddy exit again. To restore an older proxy config, also restore a compose.yaml from a version that validates.