For AI agents: the complete documentation index is available at /next/zh/llms.txt, the full documentation bundle is available at /next/zh/llms-full.txt, and this page is available as Markdown at /next/zh/help/blog.md.
Lynx
  • 简体中文
  • 编写博客文章

    Lynx 网站拥有一个博客,用于分享更新、教程和公告。

    位置

    所有博客文章都位于 docs/en/blog/ 中。

    创建新文章

    1. docs/en/blog/ 中创建一个新的 .mdx 文件。文件名将成为 URL 的一部分。
    2. 添加必要的 Frontmatter。
    ---
    title: 我的新博客文章
    date: 2024-01-01
    author: 你的名字
    description: 文章的简短摘要。
    ---
    1. 使用标准 Markdown 和 MDX 组件编写内容。

    博客组件

    我们为博客列表和作者头像提供专门的组件。

    <BlogList>

    自动渲染博客文章列表。

    import { BlogList } from '@lynx';
    
    <BlogList limit={1} />;

    <BlogAvatar>

    渲染博客作者的头像。

    您可以在 src/components/blog-avatar/authors.json 中添加新作者。

    import { BlogAvatar } from '@lynx';
    
    <BlogAvatar list={['lynx']} />;
    Lynx 团队
    Lynx 团队lynxjs.org

    博客索引

    博客索引是自动生成的。确保您的 date 字段正确,以便文章按时间顺序排列。

    图片

    将图片放置在 public/ 目录中,或根据配置相对于博客文章放置。

    除非另有说明,本项目采用知识共享署名 4.0 国际许可协议进行许可,代码示例采用 Apache License 2.0 许可协议进行许可。