对搜索引擎更友好的BLOG博客代码

网络赚钱 host2cn 191次浏览 0个评论
最后修改:2016-12-22 10:47

上次在 BLOG博客的搜索引擎优化 一文中提到对模板代码的修改以使其对搜索引擎更友好一些。为方便大家使用,特将全部代码放在下面,大家稍做修改后即可直接拿过去用了。注意:这些代码只适用于BLOG的传统模板。

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>

<html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”en” lang=”en” dir=”<$BlogLanguageDirection$>”>

<head>
<$BlogMetaData$>
<title><MainPage><$BlogTitle$></MainPage><ArchivePage><$BlogPageTitle$></ArchivePage>
<MainPage><meta name=”description” content=”<$BlogDescription$>” /></MainPage><ArchivePage><meta name=”description”content=”<$BlogPageTitle$> Archive, <$BlogDescription$>” /></ArchivePage><ItemPage><meta name=”description” content=”<Blogger><$BlogItemTitle$></Blogger> – <$BlogTitle$>” /></ItemPage>

<style type=”text/css”>
/*
———————————————–
Blogger Template Style
Name: Rounders 3
Designer: Douglas Bowman
URL: www.stopdesign.com
Date: 27 Feb 2004
———————————————– */
#navbar-iframe{opacity:0.0;filter:alpha(Opacity=0)}
#navbar-iframe:hover{opacity:1.0;filter:alpha(Opacity=100, FinishedOpacity=100)}

body {
background:#123;
margin:0;
padding:20px 10px;
text-align:center;
font:x-small/1.5em “Trebuchet MS”,Verdana,Arial,Sans-serif;
color:#ccc;
font-size/* */:/**/small;
font-size: /**/small;
}
/* Page Structure
———————————————– */
/* The images which help create rounded corners depend on the
following widths and measurements. If you want to change
these measurements, the images will also need to change.
*/
@media all {
#content {
width:740px;
margin:0 auto;
text-align:left;
}
#main {
width:485px;
float:left;
background:#eec url(“http://www.blogblog.com/rounders3/corners_main_bot.gif”) no-repeat left bottom;
margin:15px 0 0;
padding:0 0 10px;
color:#333;
font-size:97%;
line-height:1.5em;
}
#main2 {
float:left;
width:100%;
background:url(“http://www.blogblog.com/rounders3/corners_main_top.gif”) no-repeat left top;
padding:10px 0 0;
}
#sidebar {
width:240px;
float:right;
margin:15px 0 0;
font-size:97%;
line-height:1.5em;
}
}
@media handheld {
#content {
width:90%;
}
#main {
width:100%;
float:none;
background:#eec;
}
#main2 {
float:none;
width:100%;
background:none;
}
#sidebar {
width:100%;
float:none;
}
}
/* Links
———————————————– */
a:link {
color:#9db;
}
a:visited {
color:#798;
}
a:hover {
color:#fff;
}
a img {
border-width:0;
}
#main a:link {
color:#347;
}
#main a:visited {
color:#666;
}
#main a:hover {
color:#68a
}
/* Blog Header
———————————————– */
@media all {
#header {
background:#357 url(“http://www.blogblog.com/rounders3/corners_cap_bot.gif”) no-repeat left bottom;
margin:0 0 0;
padding:0 0 8px;
color:#fff;
}
#header div {
background:url(“http://www.blogblog.com/rounders3/corners_cap_top.gif”) no-repeat left top;
padding:8px 15px 0;
}
}
@media handheld {
#header {
background:#357;
}
#header div {
background:none;
}
}
#blog-title {
margin:0;
padding:10px 30px 5px;
font-size:200%;
line-height:1.2em;
}
#blog-title a {
text-decoration:none;
color:#fff;
}
#description {
margin:0;
padding:5px 30px 10px;
font-size:94%;
line-height:1.5em;
color:#abc;
}
/* Posts
———————————————– */
.date-header {
margin:0 28px 0 43px;
font-size:85%;
line-height:2em;
text-transform:uppercase;
letter-spacing:.2em;
color:#586;
}
.post {
margin:.3em 0 25px;
padding:0 13px;
border:1px dotted #bb9;
border-width:1px 0;
}
.post-title {
margin:0;
font-size:135%;
line-height:1.5em;
background:url(“http://www.blogblog.com/rounders3/icon_arrow.gif”) no-repeat 10px .5em;
display:block;
border:1px dotted #bb9;
border-width:0 1px 1px;
padding:2px 14px 2px 29px;
color:#333;
}
#main a.title-link, .post-title strong {
text-decoration:none;
display:block;
}
#main a.title-link:hover {
background-color:#fff;
color:#000;
}
.post-body {
border:1px dotted #bb9;
border-width:0 1px 1px;
border-bottom-color:#eec;
padding:10px 14px 1px 29px;
}
html>body .post-body {
border-bottom-width:0;
}
.post p {
margin:0 0 .75em;
}
p.post-footer {
background:#fff;
margin:0;
padding:2px 14px 2px 29px;
border:1px dotted #bb9;
border-bottom:1px solid #eee;
font-size:100%;
line-height:1.5em;
color:#666;
text-align:right;
}
html>body p.post-footer {
border-bottom-color:transparent;
}
p.post-footer em {
display:block;
float:left;
text-align:left;
font-style:normal;
}
a.comment-link {
/* IE5.0/Win doesn’t apply padding to inline elements,
so we hide these two declarations from it */
background/* */:/**/url(“http://www.blogblog.com/rounders3/icon_comment.gif”) no-repeat 0 45%;
padding-left:14px;
}
html>body a.comment-link {
/* Respecified, for IE5/Mac’s benefit */
background:url(“http://www.blogblog.com/rounders3/icon_comment.gif”) no-repeat 0 45%;
padding-left:14px;
}
.post img {
margin:0 0 5px 0;
padding:4px;
border:1px solid #586;
}
blockquote {
margin:.75em 0;
border:1px dotted #596;
border-width:1px 0;
padding:5px 15px;
}
.post blockquote p {
margin:.5em 0;
}
/* Comments
———————————————– */
#comments {
margin:-25px 13px 0;
border:1px dotted #6a7;
border-width:0 1px 1px;
padding:20px 0 15px 0;
}
#comments h4 {
margin:0 0 10px;
padding:0 14px 2px 29px;
border-bottom:1px dotted #6a7;
font-size:120%;
line-height:1.4em;
color:#333;
}
#comments-block {
margin:0 15px 0 9px;
}
.comment-data {
background:url(“http://www.blogblog.com/rounders3/icon_comment.gif”) no-repeat 2px .3em;
margin:.5em 0;
padding:0 0 0 20px;
color:#666;
}
.comment-poster {
font-weight:bold;
}
.comment-body {
margin:0 0 1.25em;
padding:0 0 0 20px;
}
.comment-body p {
margin:0 0 .5em;
}
.comment-timestamp {
margin:0 0 .5em;
padding:0 0 .75em 20px;
color:#fff;
}
.comment-timestamp a:link {
color:#fff;
}
.deleted-comment {
font-style:italic;
color:gray;
}
.paging-control-container {
float: right;
margin: 0px 6px 0px 0px;
font-size: 80%;
}
.unneeded-paging-control {
visibility: hidden;
}
/* Profile
———————————————– */
@media all {
#profile-container {
background:#586 url(“http://www.blogblog.com/rounders3/corners_prof_bot.gif”) no-repeat left bottom;
margin:0 0 15px;
padding:0 0 10px;
color:#fff;
}
#profile-container h2 {
background:url(“http://www.blogblog.com/rounders3/corners_prof_top.gif”) no-repeat left top;
padding:10px 15px .2em;
margin:0;
border-width:0;
font-size:115%;
line-height:1.5em;
color:#fff;
}
}
@media handheld {
#profile-container {
background:#586;
}
#profile-container h2 {
background:none;
}
}

.profile-datablock {
margin:0 15px .5em;
border-top:1px dotted #7a8;
padding-top:8px;
}
.profile-img {display:inline;}
.profile-img img {
float:left;
margin:0 10px 5px 0;
border:4px solid #bec;
}
.profile-data strong {
display:block;
}
#profile-container p {
margin:0 15px .5em;
}
#profile-container .profile-textblock {
clear:left;
}
#profile-container a {
color:#fff;
}
.profile-link a {
background:url(“http://www.blogblog.com/rounders3/icon_profile.gif”) no-repeat 0 .1em;
padding-left:15px;
font-weight:bold;
}
ul.profile-datablock {
list-style-type:none;
}
/* Sidebar Boxes

———————————————– */
@media all {
.box {
background:#234 url(“http://www.blogblog.com/rounders3/corners_side_top.gif”) no-repeat left top;
margin:0 0 15px;
padding:10px 0 0;
color:#abc;
}
.box2 {
background:url(“http://www.blogblog.com/rounders3/corners_side_bot.gif”) no-repeat left bottom;
padding:0 13px 8px;
}
}
@media handheld {
.box {
background:#234;
}
.box2 {
background:none;
}
}
.sidebar-title {
margin:0;
padding:0 0 .2em;
border-bottom:1px dotted #456;
font-size:115%;
line-height:1.5em;
color:#abc;
}
.box ul {
margin:.5em 0 1.25em;
padding:0 0px;
list-style:none;
}
.box ul li {
background:url(“http://www.blogblog.com/rounders3/icon_arrow_sm.gif”) no-repeat 2px .25em;
margin:0;
padding:0 0 3px 16px;
margin-bottom:3px;
border-bottom:1px dotted #345;
line-height:1.4em;
}
.box p {
margin:0 0 .6em;
}
/* Footer
———————————————– */
#footer {
clear:both;
margin:0;
padding:15px 0 0;
}
@media all {
#footer div {
background:#357 url(“http://www.blogblog.com/rounders3/corners_cap_top.gif”) no-repeat left top;
padding:8px 0 0;
color:#fff;
}
#footer div div {
background:url(“http://www.blogblog.com/rounders3/corners_cap_bot.gif”) no-repeat left bottom;
padding:0 15px 8px;
}
}
@media handheld {
#footer div {
background:#357;
}
#footer div div {
background:none;
}
}
#footer hr {display:none;}
#footer p {margin:0;}
#footer a {color:#fff;}
/* Feeds
———————————————– */
#blogfeeds {
}
#postfeeds {
padding:0 15px 0;
}
</style>
</head>

 

<body>

 

<!– Begin #content – Centers all content and provides edges for floated columns –>

<div id=”content”>

 

<!– Blog Header –>

<div id=”header”><div>

<h1 id=”blog-title”>
<ItemPage><a href=”<$BlogURL$>”></ItemPage>
<$BlogTitle$>
<ItemPage></a></ItemPage>
</h1>
<p id=”description”><$BlogDescription$></p>

</div></div>
<br /><center>
<a href=”http://www.tkqlhce.com/click-2735644-10497542″ target=”_top”>
<img src=”http://www.ftjcfx.com/image-2735644-10497542″ width=”728″ height=”90″ alt=”Go Daddy $1.99 Domains” border=”0″/></a>
</center>
<!– Begin #main – Contains main-column blog content –>

<div id=”main”><div id=”main2″><div id=”main3″>

<Blogger>

<BlogDateHeader>
<h2 class=”date-header”><$BlogDateHeaderDate$></h2>
</BlogDateHeader>
<!– Begin .post –>

<div class=”post”><a name=”<$BlogItemNumber$>”></a>

<BlogItemTitle>
<h3 class=”post-title”>

<a href=”<$BlogItemPermalinkURL$>”><$BlogItemTitle$></a>

</h3>

</BlogItemTitle>

<div class=”post-body”>

<p>
<$BlogItemBody$>
</p>

</div>

<p class=”post-footer”>
<em><$I18NPostedByAuthorNickname$> @ <a href=”<$BlogItemPermalinkUrl$>” title=”permanent link”><$BlogItemDateTime$></a></em> &nbsp;
<BlogItemCommentsEnabled>
<a class=”comment-link” href=”<$BlogItemCommentCreate$>”<$BlogItemCommentFormOnclick$>><span style=”text-transform:lowercase”><$I18NNumComments$></span></a>
</BlogItemCommentsEnabled><BlogItemBacklinksEnabled>
<a class=”comment-link” href=”<$BlogItemPermalinkUrl$>#links”><span style=”text-transform:lowercase”><$I18NLinksToThisPost$></span></a>
</BlogItemBacklinksEnabled>
<$BlogItemControl$>
</p>

</div>

<!– End .post –>

<!– Begin #comments –>
<ItemPage>

<div id=”comments”>

<BlogItemCommentsEnabled><a name=”comments”></a>

<h4><$I18NNumComments$>:</h4>

<dl id=”comments-block”>
<$CommentPager$>
<BlogItemComments>
<dt class=”comment-data” id=”<$BlogCommentAnchorName$>”><a name=”<$BlogCommentAnchorName$>”></a>
<$I18NAtCommentTimeWithPermalink$>,
<$I18NCommentAuthorSaid$>
</dt>
<dd class=”comment-body”>
<p><$BlogCommentBody$></p>
<$BlogCommentDeleteIcon$>
</dd>
</BlogItemComments>
<$CommentPager$>
</dl>

<p class=”comment-timestamp”>
<$BlogItemCreate$>
</p>
<p id=”postfeeds”><$BlogItemFeedLinks$></p>
</BlogItemCommentsEnabled>
<BlogItemBacklinksEnabled>
<a name=”links”></a><h4><$I18NLinksToThisPost$>:</h4>
<dl id=”comments-block”>
<BlogItemBacklinks>
<dt class=”comment-title”>
<$BlogBacklinkControl$>
<a href=”<$BlogBacklinkURL$>” rel=”nofollow”><$BlogBacklinkTitle$></a> <$BlogBacklinkDeleteIcon$>
</dt>
<dd class=”comment-body”><$BlogBacklinkSnippet$>
<br />
<span class=”comment-poster”>
<em><$I18NPostedByBacklinkAuthor$> @ <$BlogBacklinkDateTime$></em>
</span>
</dd>
</BlogItemBacklinks>
</dl>
<p class=”comment-timestamp”><$BlogItemBacklinkCreate$></p>
</BlogItemBacklinksEnabled>

<p style=”padding-left:20px;”>
<a href=”<$BlogURL$>”>&lt;&lt; <$I18NHome$></a>
</p>
</div>

</ItemPage>

<!– End #comments –>

</Blogger>

</div></div></div>

<!– End #main –>

<!– Begin #sidebar –>

<div id=”sidebar”>

 

<!– Begin #profile-container –>

<$BlogMemberProfile$>

<!– End #profile –>

 

 

<!– Begin .box –>

<div class=”box”><div class=”box2″><div class=”box3″>

<MainOrArchivePage>
<h2 class=”sidebar-title”>Sponsor</h2>
广告代码 200×200
</MainOrArchivePage>
<MainOrArchivePage>
<h2 class=”sidebar-title”><$I18NPreviousPosts$></h2>

<ul id=”recently”>
<BloggerPreviousItems>
<li><a href=”<$BlogItemPermalinkURL$>”><$BlogPreviousItemTitle$></a></li>
</BloggerPreviousItems>
</ul>

 

</MainOrArchivePage>
<MainOrArchivePage>
<h2 class=”sidebar-title”><$I18NArchives$></h2>

<ul class=”archive-list”>
<BloggerArchives>
<li><a href=”<$BlogArchiveURL$>”><$BlogArchiveName$></a></li>
</BloggerArchives>
<ArchivePage><li><a href=”<$BlogURL$>”><$I18NCurrentPosts$></a></li></ArchivePage>
</ul>
</MainOrArchivePage>

<h2 class=”sidebar-title”>Related Links</h2>

<ul id=”recently”>
<li><a href=”http://cngodaddy.blogspot.com” title=”Godaddy 使用说明”>美国主机 Godaddy 中文指南</a></li>
<li><a href=”http://cncpanel.blogspot.com” title=”CPANEL控制面板中文使用说明”>CPANEL控制面板中文使用说明</a></li>
</ul>

<h2 class=”sidebar-title”>Advertise</h2>

在此加入你的200×200广告代码
<p id=”powered-by”><a href=”http://www.blogger.com”><img src=”http://buttons.blogger.com/bloggerbutton1.gif” alt=”Powered by Blogger” /></a></p>
<p id=”blogfeeds”><$BlogFeedsVertical$></p>

<!–

<p>This is a paragraph of text that could go in the sidebar.</p>

–>

</div></div></div>

<!– End .box –>

</div>

<!– End #sidebar –>

<!– Begin #footer –>

<div id=”footer”><div><div><hr />

<p>Back to <ItemPage><a href=”<$BlogURL$>”></ItemPage>
<$BlogTitle$>
<ItemPage></a></ItemPage></p>
<p>此处可以放一段话,最好要包含与博客主题有关的关键词。</p>
<p>Copyright &copy; <$BlogTitle$> 2007-2009 . All Rights Reserved</p>

</div></div></div>

<!– End #footer –>

</div>

<!– End #content –>

</body>

</html>


Host2cn.com版权所有丨转载请注明来自host2cn.com,本文链接:对搜索引擎更友好的BLOG博客代码

喜欢 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址