首页 » 简单了解RSS

简单了解RSS

RSS指 Really Simple Syndication(简易信息聚合),RSS定义了方法来获取网站的标题以及内容,而且RSS可以被自动更新,RSS使用了XML进行编写(xml笔记:https://cjlio.com/archives/17.html

一个RSS例子:

<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
    <channel>
        <title>小陈的辣鸡屋</title>
        <link>https://cjlio.com/</link>
        <description>cjlio.com</description>
        <item>
            <title>简单了解设计模式</title>
            <link>https://cjlio.com/archives/121.html</link>
            <description><![CDATA[设计模式实质就是一套可以通用,复用的设计方案,设计模式是针对面向对象的,在面向对象出来之前,程序是面向过程的,设计模式就是软件设计的工具面向过程:逻辑化过程,以逻辑实现面向对象:思考有哪些对象,...]]></description>
            <content:encoded xml:lang="zh-CN">xxxxxxx</content:encoded>
        </item>
    </channel>
</rss>

可以看到是RSS频道的标题,<link>是该频道的超链接,<description>是该频道的描述,<item>是定义该频道的某篇文章的,其中<item>又有<title><link><description>,分别表示文章标题,文章的超链接,文章的描述,其中还有<content>表示文章的内容</p><p>RSS注释和HTML的注释一样,<!-- 这是RSS注释 --></p><p>注意:RSS是基于XML编写,所以全部元素都要有闭合标签,大小写敏感,属性值要带引号</p><p>channel元素除了上面那几个外,还有<category>,<copyright>,<language> ,<image>等等</p><p><item>元素还有<author>,<enclosure>,<comments>,<pubDate>等等</p><p>RSS阅读器可以更好读取RSSfeed</p> <div class="copyright"> 注意:本站未注明转载的文章均为原创,转载请注明来源 </div> </div> </div> <div class="change post-mains"> <div class="change-left">上一篇:<a href="https://cjlio.com/archives/123.html" title="简单使用vuex状态管理库">简单使用vuex状态管理库</a></div> <div class="change-right">下一篇:<a href="https://cjlio.com/archives/121.html" title="简单了解设计模式">简单了解设计模式</a></div> </div> <div class="post-mains"> <div class="form-comments"> <!--评论表单--> <!--检查能否进行评论--> <div id="respond-post-122" class="respond"> <h3 id="response">添加新评论</h3> <form method="post" action="https://cjlio.com/archives/122.html/comment" id="comment-form"> <!-- 若当前用户已经登录 --> <span> <textarea rows="3" name="text" id="textarea" class="textarea" placeholder="不评论一下吗???" required ></textarea> </span> <input type="hidden" name="_" value="ed9388730ed4551367dfa8e36785e2ce"> <!-- 要求输入名字、邮箱、网址 --> <div class="form-info-main"> <sapn class="form-info"> <input type="text" name="author" id="author" placeholder="称呼" class="text" value="" required /> </sapn> <sapn class="form-info"> <label for="mail" class="required"></label> <input type="email" name="mail" id="mail" class="text" placeholder="邮箱" value="" required /> </sapn> <span class="form-info"> <input type="url" name="url" id="url" class="text" placeholder="网站" value="" /> </span> </div> <div class="form-submit-main"> <button type="submit" class="submit form-submit">提交评论</button> </div> </form> </div> <!-- 若当前文章不允许进行评论 --> </div> <div class="post-comments"> <!--输出评论--> </div> </div> </div> </div> <aside id="aside" class="aside"> <section class="sidebar-main"> <form method="post" class="post-nav"> <input type="text" name="s" class="aside-control form-nav" placeholder="搜索一下"/> <input type="submit" class="aside-submit" value="搜索"> </form> </section> <section class="sidebar-main"> <h3>博客信息</h3> <ul> <li>文章总数:112篇</li> <li>评论总数:81条</li> <li> 运行天数:<span class="date">274天</span> </li> <li> 全站字数:539921字 </li> </ul> </section> <section class="sidebar-main"> <h3>最热文章</h3> <ul> <li><a href="https://cjlio.com/archives/99.html" title="简单了解CSRF攻击和XSS攻击">简单了解CSRF攻击和XSS攻击</a></li><li><a href="https://cjlio.com/archives/124.html" title="Pinia---vuejs的轻量级状态管理库">Pinia---vuejs的轻量级状态管理库</a></li><li><a href="https://cjlio.com/archives/58.html" title="TypeScript学习笔记">TypeScript学习笔记</a></li><li><a href="https://cjlio.com/archives/56.html" title="简单了解MVC,MVP和MVVM之间的不同与联系">简单了解MVC,MVP和MVVM之间的不同与联系</a></li><li><a href="https://cjlio.com/archives/101.html" title="Angular学习笔记">Angular学习笔记</a></li><li><a href="https://cjlio.com/archives/115.html" title="操作系统学习笔记">操作系统学习笔记</a></li><li><a href="https://cjlio.com/archives/119.html" title="简单使用Rollup模块打包工具">简单使用Rollup模块打包工具</a></li><li><a href="https://cjlio.com/archives/88.html" title="Markdown基础语法笔记">Markdown基础语法笔记</a></li><li><a href="https://cjlio.com/archives/84.html" title="SVN版本控制系统学习笔记">SVN版本控制系统学习笔记</a></li><li><a href="https://cjlio.com/archives/45.html" title="Grid布局学习笔记">Grid布局学习笔记</a></li> </ul> </section> <section class="sidebar-main"> <h3>文章分类</h3> <ul class="sidebar-class"><li class="category-level-0 category-parent"><a href="https://cjlio.com/category/default/">默认</a></li><li class="category-level-0 category-parent"><a href="https://cjlio.com/category/technology/">技术</a></li><li class="category-level-0 category-parent"><a href="https://cjlio.com/category/learning/">学习</a></li></ul> </section> <section class="sidebar-main"> <h3>友情链接</h3> <ul class="links"> <li><a href="https://paugram.com/" target="_blank" rel="noopener noreferrer">保罗的小宇宙</a></li> <li><a href="https://linxuan.fun" target="_blank" rel="noopener noreferrer">临轩</a></li> <li><a href="https://yujienb.cn/" target="_blank" rel="noopener noreferrer">狱杰的屋敷</a></li> <li><a href="https://www.kiwiape.cn/" target="_blank" rel="noopener noreferrer">猕猴の那年记忆</a></li> <li><a href="https://ghser.com" target="_blank" rel="noopener noreferrer">一叶三秋</a></li> <li><a href="https://www.acg19.top" target="_blank" rel="noopener noreferrer">新漫猫</a></li> <li><a href="https://www.timochan.cn" target="_blank" rel="noopener noreferrer">TimochanのBlog</a></li> <li><a href="https://zshmvp.com" target="_blank" rel="noopener noreferrer">zshMVP</a></li> <li><a href="https://www.abcio.cn/" target="_blank" rel="noopener noreferrer">清墨的橘</a></li> <li><a href="https://www.lx-blog.cn" target="_blank" rel="noopener noreferrer">流星Aday的博客</a></li> <li><a href="https://hq233.cn/" target="_blank" rel="noopener noreferrer">隔壁小胡的博客</a></li> <li><a href="https://www.citrons.cn/" target="_blank" rel="noopener noreferrer">Citrons博客</a></li> <li><a href="https://www.rz.sb" target="_blank" rel="noopener noreferrer">若志随笔</a></li> <li><a href="https://www.m78.co/" target="_blank" rel="noopener noreferrer">星云馆</a></li> <li><a href="https://jsun969.cn" target="_blank" rel="noopener noreferrer">螓首蛾眉</a></li> <li><a href="https://flypig.xyz" target="_blank" rel="noopener noreferrer">阅读・阅己</a></li> <li><a href="https://blog.beixibaobao.com" target="_blank" rel="noopener noreferrer">北熙宝宝</a></li> <li><a href="https://keymoe.com/" target="_blank" rel="noopener noreferrer">Sanakeyの小站</a></li> <li><a href="https://innei.ren/" target="_blank" rel="noopener noreferrer">静かな森</a></li> <li><a href="https://blog.meta-code.top/" target="_blank" rel="noopener noreferrer">百里飞洋の博客</a></li> <li><a href="https://dyfa.top" target="_blank" rel="noopener noreferrer">itsNekoDeng</a></li> </ul> </section> <section class="sidebar-main"> <h3>其它</h3> <ul> <li> <a href="https://cjlio.com/sitemap.xml">网站地图</a> </li> <li> <a href="https://cjlio.com/feed/">文章 RSS</a> <!-- 文章的RSS地址连接 --> </li> <li> <a href="https://cjlio.com/feed/comments/">评论 RSS</a> <!-- 评论的RSS地址连接 --> </li> </ul> </section> </aside> </article> <div class="go-top"> <a href="javascript:window.scrollTo(0,0)"> <svg t="1628425563723" class="icon go" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3790" width="32" height="32"><path d="M624.401067 601.463467L512 489.0624l-112.401067 112.401067-48.264533-48.264534L512 392.533333l160.6656 160.6656-48.264533 48.264534zM512 819.2a307.2 307.2 0 1 0 0-614.4 307.2 307.2 0 0 0 0 614.4z m0 68.266667C304.64 887.466667 136.533333 719.36 136.533333 512S304.64 136.533333 512 136.533333s375.466667 168.106667 375.466667 375.466667-168.106667 375.466667-375.466667 375.466667z" p-id="3791" fill="#1296db"></path></svg> </a> </div> </main> <footer id="footer"> <div class="footer-main container"> © 2022 <a href="https://cjlio.com/">小陈的辣鸡屋</a>. All Rights Reserved. 由<a href="https://typecho.org">Typecho</a> 强力驱动 Theme By <a href="https://github.com/chenjunlinabc/concise_orange">concise_orange</a> </div> </footer> <script charset="utf-8" src="https://cjlio.com/usr/themes/concise_orange/jquery.min.js" defer="defer"></script> <script charset="utf-8" src="https://cjlio.com/usr/themes/concise_orange/jquery.pjax.min.js" defer="defer"></script> <script charset="utf-8" src="https://cjlio.com/usr/themes/concise_orange/main.js" defer="defer"></script> </body> </html>