如何在 Nuxt.js 中创建 Google 新闻提要 (xml)?

问题描述

在 Google Docs 中显示我的供稿需要如下所示:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"       
        xmlns:news="http://www.google.com/schemas/sitemap-news/0.9">
  <url>
    <loc>http://www.example.org/business/article55.html</loc>
    <news:news>
    <news:publication>
      <news:name>The Example Times</news:name>
      <news:language>en</news:language>
    </news:publication>
    <news:publication_date>2008-12-23</news:publication_date>
      <news:title>Companies A,B in Merger Talks</news:title>
    </news:news>
  </url>
</urlset>

我已经尝试过 nuxt/feednuxt/sitemap 模块。在提要模块中,我没有 <news:news> 或其他标签。我也不能设置 urlset 标签。

在站点地图模块中,我可以设置一些 urlsets 但不是全部。 (参见:https://support.google.com/news/publisher-center/answer/9607107?hl=en&ref_topic=9606468)这个模块也没有我需要的标签支持。

我认为没有专门用于此目的的模块,我应该为此编写自己的模块。所以我想知道如何为 Google 新闻想要的类型创建我的 xml 提要?

编辑: 我知道意识到有一个这样的模块:https://github.com/ekalinin/sitemap.js

所以这个问题可以更新,比如我可以在 Nuxt.js 中使用它吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)