You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何为Quarto网站生成index.xml?配置后未生成问题求解

解决Quarto网站RSS订阅(index.xml)未生成的问题

问题出在你把RSS feed的配置放在了单个页面(index.qmd)的listing节点下,而Quarto的网站级RSS feed需要在_quarto.yml的website节点中配置。按照以下步骤修改即可生成index.xml:

1. 修改_quarto.yml,添加网站级feed配置

将feed相关配置移到website节点下,保留你原本的设置:

project:
  type: website

lang: es

website:
  title: "Diabb Zegpi"
  site-url: https://zegpi.com
  # 添加网站级RSS feed配置
  feed:
    items: 5
    type: partial
    language: es
    contents: posts/**/*.qmd
  navbar:
    logo: dyl-light.svg
    right:
      - icon: rss
        href: index.xml

2. 调整index.qmd的listing配置

删除index.qmd中listing下的feed节点,页面只负责控制列表展示即可:

---
title: "Datos y Leyendas"
listing:
  contents: posts/**/*.qmd
  sort: "date desc"
  type: default
  categories: true
  sort-ui: false
  filter-ui: false
  fields: [image, date, title, reading-time, description, categories]
page-layout: full
title-block-banner: false
comments: false
toc: false
---

3. 重新渲染网站

运行命令:

quarto render

或者在你的IDE中重新构建网站,Quarto会根据网站配置自动生成index.xml文件,此时RSS订阅功能即可正常使用。

补充说明

页面中的listing.feed是用来给特定列表页面生成独立RSS feed的(比如分类页面专属feed),而全站的RSS feed必须通过website.feed配置来触发生成。

内容的提问来源于stack exchange,提问作者dzegpi

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.20 23:00:09