Skip to content

Commit

Permalink
add pagination info to page title for SEO
Browse files Browse the repository at this point in the history
  • Loading branch information
robbin committed Feb 28, 2013
1 parent 2268c59 commit fed399f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/views/blog/index.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<% @nav = 'blog' %>
<% @title = "最近博客文章" %>
<% @title << " | 第#{params[:page]}页" if params[:page] && params[:page].to_i > 1 %>

<% @description = '最近发表的博客文章列表' %>

<div class="left">
Expand Down
1 change: 1 addition & 0 deletions app/views/blog/note.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<% @nav = 'note' %>
<% @title = "最近更新笔记" %>
<% @title << " | 第#{params[:page]}页" if params[:page] && params[:page].to_i > 1 %>
<% @description = '最近更新的笔记文章列表' %>

<div class="left">
Expand Down
1 change: 1 addition & 0 deletions app/views/blog/tag.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<% @nav = 'tag' %>
<% @title = params[:name].force_encoding("UTF-8") + "分类文章" %>
<% @title << " | 第#{params[:page]}页" if params[:page] && params[:page].to_i > 1 %>
<% @description = params[:name].force_encoding("UTF-8") + "分类下所有文章列表" %>

<div class="left">
Expand Down
1 change: 1 addition & 0 deletions app/views/home/index.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<% @nav = 'home' %>
<% @title = "#{APP_CONFIG['site_title']} | 第#{params[:page]}页" if params[:page] && params[:page].to_i > 1 %>

<div class="left">
<%= partial 'blog/blog', :collection => @blogs %>
Expand Down

0 comments on commit fed399f

Please sign in to comment.