我对 RSS feed 有疑问

发布于 2024-10-31 03:27:20 字数 1886 浏览 1 评论 0原文

我被困在这个问题上。我的项目就是这样做。本周您将为一家网络开发公司创建一个主题。

* You can use http://www.1kbgrid.com/ for a base design.
* Come up with a color scheme that will match this logo.
* Decide what your top links should be.  Create an RSS feed for these top pages.
* Create a report that states the scope of the project (why you are doing it), the top level pages, why you picked the color scheme,etc.

好的,我已经完成了 RSS 的工作,这就是

<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0">
  <channel>
    <title>Web design software</title>
    <link></link>
    <description>Has different soft ware and prices.</description>
    <item>
      <title>Adobe Dreamweaver</title>
      <link>http://shopping.yahoo.com/search?p=web%20design</link>
      <description>This tells you how much it cost and what it is
      for.</description>
    </item>
    <item>
      <title>Frontpage 2003 upgrade</title>
      <link>
      http://www.softwaremedia.com/microsoft/frontpage/frontpage-
      2003-upgrade.html?ovchn=PGR&amp;ovcrn=39202323&amp;ovtac=CMP&amp;ovcpn=frontpage-2003---upgrade</link>
      <description>THis is to help build a better web
      site.</description>
    </item>
    <item>
      <title>WebPlus X4 Website Maker Mini Box</title>
      <link>
      http://accessories.us.dell.com/sna/productdetail.aspx?sku=A3310055&amp;cs=04&amp;c=us&amp;l=en&amp;dgc=SS&amp;cid=52102&amp;lid=1342490</link>
      <description>It helps you to make websites</description>
    </item>
  </channel>
</rss>

我所坚持的问题是如何决定我的顶级链接应该是什么。为这些首页创建一个 RSS 提要。好吧,问题是我是否应该链接 rss feed 或者是否可能。我对这个问题完全迷失了。谢谢你准备好这个。

I am stuck on this. My project is to do this..This week you will be creating a theme for a web development company.

* You can use http://www.1kbgrid.com/ for a base design.
* Come up with a color scheme that will match this logo.
* Decide what your top links should be.  Create an RSS feed for these top pages.
* Create a report that states the scope of the project (why you are doing it), the top level pages, why you picked the color scheme,etc.

ok I have done and rss thing and this is what it looks like

<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0">
  <channel>
    <title>Web design software</title>
    <link></link>
    <description>Has different soft ware and prices.</description>
    <item>
      <title>Adobe Dreamweaver</title>
      <link>http://shopping.yahoo.com/search?p=web%20design</link>
      <description>This tells you how much it cost and what it is
      for.</description>
    </item>
    <item>
      <title>Frontpage 2003 upgrade</title>
      <link>
      http://www.softwaremedia.com/microsoft/frontpage/frontpage-
      2003-upgrade.html?ovchn=PGR&ovcrn=39202323&ovtac=CMP&ovcpn=frontpage-2003---upgrade</link>
      <description>THis is to help build a better web
      site.</description>
    </item>
    <item>
      <title>WebPlus X4 Website Maker Mini Box</title>
      <link>
      http://accessories.us.dell.com/sna/productdetail.aspx?sku=A3310055&cs=04&c=us&l=en&dgc=SS&cid=52102&lid=1342490</link>
      <description>It helps you to make websites</description>
    </item>
  </channel>
</rss>

what i am stuck on is how to decide what my top link should be.Create an RSS feed for those top pages. Ok the question is am I suppose to link the rss feed or if that is even possible. I am totally lost on this question. Thank you for ready this.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

滥情哥ㄟ 2024-11-07 03:27:20

通常,您可以使用 标记从主站点链接到 RSS 文档。它应该看起来像这样:

<link rel="alternate" type="application/rss+xml" title="Top Web design software Feed" href="http://LINKTOMYRSSFILE" /> 

如果您的站点是动态站点,则需要将 LINKTOMYRSSFILE 替换为生成 RSS 的文件的链接。如果它是静态文件,只需将此文件保存在您的服务器中并将其指向该文件即可。

此外,您的主频道链接应指向显示所有这些内容的页面的链接。

编辑

首先,您应该使用 W3C 服务来验证您的 Feed。他们指出错误/最佳实践,并告诉您如何修复它们(使用错误旁边的帮助链接)

确保空的 标记包含 url到您的网站

回答您在评论中的问题

缺少原子:带有 rel="self" 的链接

根据 RSS 顾问委员会的说法
最佳实践概况,确定
feed 中 feed 的 URL 使得
更便携,独立,并且
更容易缓存。由于这些原因,一个
feed 应该包含一个atom:使用的链接
为此目的。

通过:http://validator.w3.org/feed/docs/warning/MissingAtomSelfLink.html

您可以通过将 标记更改为

<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">

并具有以下上述项目

<atom:link href="http://LINKTOFEED" rel="self" type="application/rss+xml"/>

来解决此问题

第 12 行第 2 列:项目应包含 guid 元素

建议您提供
guid,如果可能的话,将其设为
永久链接。这使得聚合器能够
不重复项目,即使有
正在编辑更改。

关于的常见问题
s 是他们如何比较
s。它们不是同一个东西吗?
是的,在某些内容系统中,而不是
在其他人中。在某些系统中,是
博客项目的永久链接。然而,
在其他系统中,每个都是一个
较长文章的摘要,
指向文章,并且是
博客条目的永久链接。

因此,在您的情况下,将以下内容添加到每个项目中即可修复该问题,请将

<guid isPermaLink="false">LINKTOSOFTWARE</guid>

LINKTOSOFTWARE 替换为 标记中的链接。

我纠正了你的错误,你的提要验证得很好。您只需要修复这些错误即可。

您可以按照本教程了解如何将 RSS 源添加到您的页面:https://developer.mozilla.org/en /RSS/Getting_Started/Syndicating

就像在页面中添加 HTML 标记一样简单。

You generally link to RSS documents from your main site by using the <link> tag. It should look something like this

<link rel="alternate" type="application/rss+xml" title="Top Web design software Feed" href="http://LINKTOMYRSSFILE" /> 

If you site is a dynamic site, you'll need to replace LINKTOMYRSSFILE with the link to the file that generates your RSS. If it's a static file, just save this file in your server and point it to that.

Also, your main channel link should point to the link of the page that displays all this content.

EDIT

First off, you should use the W3C service to validate your feed. They point out what's wrong/best practices and tells you how you can fix them (use the help link next to the error)

Make sure the empty <link></link> tag contains a url to your site

To answer your questions in the comments

Missing atom:link with rel="self"

According to the RSS Advisory Board's
Best Practices Profile, identifying a
feed's URL within the feed makes it
more portable, self-contained, and
easier to cache. For these reasons, a
feed should contain an atom:link used
for this purpose.

via : http://validator.w3.org/feed/docs/warning/MissingAtomSelfLink.html

You can fix this by changing your <rss> tag to

<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">

And having the following above items

<atom:link href="http://LINKTOFEED" rel="self" type="application/rss+xml"/>

Line 12, column 2: item should contain a guid element

It's recommended that you provide the
guid, and if possible make it a
permalink. This enables aggregators to
not repeat items, even if there have
been editing changes.

A frequently asked question about
s is how do they compare to
s. Aren't they the same thing?
Yes, in some content systems, and no
in others. In some systems, is
a permalink to a weblog item. However,
in other systems, each is a
synopsis of a longer article,
points to the article, and is
the permalink to the weblog entry.

So in your case adding the following to each of your items will fix it

<guid isPermaLink="false">LINKTOSOFTWARE</guid>

Replace LINKTOSOFTWARE with the links in your <link></link> tags.

I corrected your mistakes and your feed validates fine. You just need to fix these errors.

You can follow this tutorial on how to add RSS feeds to your pages : https://developer.mozilla.org/en/RSS/Getting_Started/Syndicating

It's as simple as adding an HTML tag into your page.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文