ARTICLE DETAIL

资讯详情

深耕商务建站与企业官网运营的一线实战洞察。

1.2.0 (2026-07-24)

1.2.0 (2026-07-24) 1.2.0 (2026-07-24)【免费下载链接】scalarScalar is an open-source API platform: Modern REST API Client Beautiful API References ✨ 1st-Class OpenAPI/Swagger Support项目地址: https://gitcode.com/GitHub_Trending/sc/scalarAdded a dark mode toggle to the header.1.1.0 (2026-07-10)Introduced page actions: copy as Markdown, open in editor, and report an issue.标题成为条目标题其下方内容成为条目描述。**只有最上层带日期的标题层级**会开启条目更深层的标题会折叠进它所属的发布中——即使它碰巧也包含日期。因此你可以把 ### Fixes 之类的子标题嵌套在某个发布内部而不会将其拆散。 如果标题看起来带日期但日期并不真实如 ## 2.0.0 (2026-13-01)该发布会被排除在源之外并且构建过程会给出警告——因为唯一走到这一步的原因就是拼写错误。 ### 多产品 Changelog 拆分到多个页面的 Changelog 同样适用位于 path 及其之下的所有页面都会贡献各自的条目源会把它们按最新优先合并/changelog - 索引页列出各产品 /changelog/api-client - 条目 /changelog/api-reference - 条目一个没有带日期标题的索引页本身不贡献任何条目——当它只负责链接到各产品时这正是你想要的行为。 被隐藏的页面会被跳过一个既不在侧边栏、也不在 sitemap 中出现的页面同样不会出现在源中。 ### 每页一个条目pages 模式适合博客 对博客这类“每篇文章是独立页面”的场景将 entries 设为 pages json // scalar.config.json { $schema: https://registry.scalar.com/scalar/schemas/config, scalar: 2.0.0, siteConfig: { rss: { path: /blog, title: Scalar Blog, entries: pages } } }此时path下每一个 frontmatter 带date的页面都成为一个源条目按最新优先排序--- date: 2026-07-24 --- # Our new dark mode A short introduction to the post.页面标题成为条目标题描述成为条目描述frontmatter 中的date决定发布日期。没有date的页面——索引页、草稿——会被排除因此不会有任何内容被意外地分发出去。源的可发现性Discovery站点上的每个页面都会在head中声明该源Feed 阅读器和浏览器扩展可以从任意 URL 发现它link relalternate typeapplication/rssxml hrefhttps://example.com/changelog/rss.xml位于path及其之下的页面还会在页头Copy Page 旁边显示订阅按钮页面属于几个源就显示几个。仓库自身的 scalar.config.json 就是一个真实例子rss.path指向/resources/changelog并附带title与description与仓库内 documentation/changelog/index.md 所在的 Changelog 结构对应。十、RoutingURL 重定向与路径模式routing属性为文档配置 URL 重定向和路径模式。重定向用重定向处理 URL 变更或别名// scalar.config.json { $schema: https://registry.scalar.com/scalar/schemas/config, scalar: 2.0.0, siteConfig: { routing: { redirects: [ { from: /old-path, to: /new-path }, { from: /docs/v1, to: /docs/latest } ] } } }重定向对象属性属性类型必填说明fromstring是要匹配的源路径tostring是目标路径路径模式自定义指南页和 API 参考页的 URL 结构routing: { guidePathPattern: /docs/:slug, referencePathPattern: /api/:slug }【免费下载链接】scalarScalar is an open-source API platform: Modern REST API Client Beautiful API References ✨ 1st-Class OpenAPI/Swagger Support项目地址: https://gitcode.com/GitHub_Trending/sc/scalar创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考
返回列表
PREV
查看更多资讯
NEXT
返回资讯列表