Blogger繼續閱讀 (適用精華區懶人包無法安裝的template) - 部落格

Table of Contents

試了一下發現精華區提供的兩個繼續閱讀語法..
結果都沒有辦法用在一些特定的template上面
特別是Blogcrowds http://0rz.tw/2b3ME這邊抓的template很多不能用

似乎是因為它們跟blogger的預設格式差異太大的關係
所以google了一下找到這篇教學 http://0rz.tw/653OV

當然它不像懶人包按一下就自動幫你安裝好
需要自己去改一些html語法, 但也不是太難而且彈性比較大
可以自訂每篇文章摘要要顯示幾行或是顯示全文

1. 先到版面配置 -> 修改HTML
找到]]></b:skin>這行, 並在它跟</head>之間加上下面這段

<!-- Style to implement "Read more on this Article" link in all the posts
(Start) -->
<style>
<b:if cond='data:blog.pageType == "item"'>
span.fullpost {display:inline;}
<b:else/>
span.fullpost {display:none;}
</b:if>
</style>
<!-- Style to implement "Read more on this Article" link in all the posts
(End) -->


2. 儲存 -> 點一下展開小裝置範本
在<data:post.body/>後面加上下面這段

<!-- Code to show "Read more on this article..." Link (Begin) -->
<b:if cond='data:blog.pageType != "item"'>
<span>
<a expr:href='data:post.url' style='color:#0000FF;
text-align:right; font-weight:bold; text-decoration:none' >Read more on this
article...</a>
</span>
</b:if>
<!-- Code to show "Read more on this article..." Link (End) -->

前製作業到這邊就完成了
因為預設是英文, 所以可以自己把上面的"Read more on this article..."
改成"繼續閱讀" 對字型顏色不滿意也是改上面<a expr:那串就可以了


3. 以後每次發文的時候如果只想要顯示前面五行字
就在第六行開始之前加上<span class="fullpost">並在文章結尾加上</span>


這是完成的效果, 我自己的blog
http://highcommu.blogspot.com

--

All Comments

George avatarGeorge2008-03-28
我也是用這種的繼續閱讀~ 不過缺點是繼續閱讀一定會跑出來
Ina avatarIna2008-03-28
就算把內容全打在<span class="fullpost">的前面
Jacob avatarJacob2008-03-29
為何我的會全部隱藏阿Orz..