rssmacros.vm

来自「这个weblogging 设计得比较精巧」· VM 代码 · 共 40 行

VM
40
字号
#**
 * RSS feed links and badges.
 * @author  Lance Lavandowska (conversion to Velocimacros)
 *#

#**
 * Show links to category feeds for categories that are immediate children
 * of the specified category.
 *#
#macro( showRSSLinksForCategory $category )
    <a href="$ctxPath/rss/$userName">$text.get("macro.rss.all")</a>
    [<a href="$ctxPath/rss/$userName?excerpts=true">$text.get("macro.rss.excerpts")</a>]<br />
    #set( $categories = $pageModel.getWeblogCategories($category) )
    #foreach( $cat in $categories )
        <a href="$ctxPath/rss/$userName?catname=$cat.path">$cat.path</a>
        [<a href="$ctxPath/rss/$userName?catname=$cat.path&amp;excerpts=true">$text.get("macro.rss.excerpts")</a>]<br />
    #end
#end

#**
 * Show links to all available RSS feeds for your weblog.
 *#
#macro( showRSSLinks )#showRSSLinksForCategory("nil")#end

#**
 * Show RSS Autodiscovery link for your weblog.
 *#
#macro( showRSSAutodiscoveryLink )
    <link rel="alternate" type="application/rss+xml"
        title="RSS" href="$absBaseURL/rss/$userName" />
#end

#**
 * Show RSS badge with link to your weblog's main RSS feed.
 *#
#macro( showRSSBadge )
    <a href="$ctxPath/rss/$userName"><img class="rssbadge"
        src="$ctxPath/images/rssbadge.gif" alt="XML" /></a>
#end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?