<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

  <title><![CDATA[Wzrong's Blog]]></title>
  <link href="http://wzrong.me/atom.xml" rel="self"/>
  <link href="http://wzrong.me/"/>
  <updated>2013-10-18T11:56:30+08:00</updated>
  <id>http://wzrong.me/</id>
  <author>
    <name><![CDATA[卫志荣]]></name>
    
  </author>
  <generator uri="http://octopress.org/">Octopress</generator>

  
  <entry>
    <title type="html"><![CDATA[典型的五种广告形式：CPC、CPM、CPA、CPS、CPT ]]></title>
    <link href="http://wzrong.me/blog/2013/10/16/dian-xing-de-wu-zhong-guang-gao-xing-shi/"/>
    <updated>2013-10-16T16:59:00+08:00</updated>
    <id>http://wzrong.me/blog/2013/10/16/dian-xing-de-wu-zhong-guang-gao-xing-shi</id>
    <content type="html"><![CDATA[<blockquote><p>今天扫一下忙，了解一下网络广告术语</p></blockquote>

<h2>CPC（按点击付费）</h2>

<p>CPC—英文全称Cost Per Click；Cost Per Thousand Click-Through。CPC是一种点击付费广告，根据广告被点击的次数收费。如关键词广告一般采用这种定价模式，比较典型的有Google广告联盟的AdSense for Content和百度联盟的百度竞价广告。</p>

<h2>CPM（按展示付费）</h2>

<p>CPM—英文全称Cost Per ThousandImpression。CPM是一种展示付费广告，只要展示了广告主的广告内容，广告主就为此付费。这种广告的效果不是很好，但是却能给有一定流量的网站、博客带来稳定的收入。只做CPM广告的联盟不是很多，像太极联盟就有CPM广告。</p>

<h2>CPA（按行为付费）</h2>

<p>CPA—英文全称Cost PerAction。CPA是一种按广告投放实际效果计价方式的广告，即按回应的有效问卷或定单来计费，而不限广告投放量。CPA的计价方式对于网站而言有一定的风险，但若广告投放成功，其收益也比CPM的计 价方式要大得多。国内最好的CPA广告联盟当属CHANet成果网。</p>

<h2>CPS（按销售付费）</h2>

<p>CPS—英文全称Cost Per Sales。CPS是一种以实际销售产品数量来计算广告费用的广告，这种广告更多的适合购物类、导购类、网址导航类的网站，需要精准的流量才能带来转化。卓越网站联盟、当当网站联盟当属这种广告形式的典型代表。</p>

<h2>CPT（按时长付费）</h2>

<p>CPT—英文全称Cost Per Time。 CPT是一种以时间来计费的广告，国内很多的网站都是按照“一个月多少钱”这种固定收费模式来收费的，这种广告形式很粗糙，无法保障客户的利益。但是CPT的确是一种很省心的广告，能给你的网站、博客带来稳定的收入。阿里妈妈的按周计费广告和门户网站的包月广告都属于这种CPT广告。</p>

<p>广告形式的变化体现了互联网广告发展的趋势，即：广告永远朝着广告主利益和效果最大化的方向发展。作为站长，我们要做的只是做好自己的站，选择最好的广告联盟而已！</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Happy Birthday]]></title>
    <link href="http://wzrong.me/blog/2013/09/12/happy-birthday/"/>
    <updated>2013-09-12T08:30:00+08:00</updated>
    <id>http://wzrong.me/blog/2013/09/12/happy-birthday</id>
    <content type="html"><![CDATA[<p>祝自己生日快乐！ Happy Birthday！</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Octopress Blog]]></title>
    <link href="http://wzrong.me/blog/2013/09/10/octopress-blog/"/>
    <updated>2013-09-10T08:30:00+08:00</updated>
    <id>http://wzrong.me/blog/2013/09/10/octopress-blog</id>
    <content type="html"><![CDATA[<p>  折腾了一天，blog终于搞定了，写点文字，纪念一下这该死的过程！
搭建过程有点不顺利，主要是由于ruby版本不一致以及蜗牛一样的网速（还经常断掉）导致的。</p>

<h2>搭建环境</h2>

<blockquote><p>工欲善其事，必先利其器</p></blockquote>

<p>1、安装 GitHub <br/>
下载地址：<a href="https://help.github.com/articles/set-up-git">https://help.github.com/articles/set-up-git</a>，下载后直接安装就OK了。 <br/>
2、安装 Ruby  <br/>
我的Mac自带的是ruby 1.8.7(终端查看ruby版本：<code>ruby --version</code>)，按照官网要求安装ruby 1.9.3。  <br/>
安装方法：<a href="http://octopress.org/docs/setup/rvm/">http://octopress.org/docs/setup/rvm/</a>
先安装RVM(Ruby Version Manager):</p>

<pre><code>curl -L https://get.rvm.io | bash -s stable --ruby
</code></pre>

<p>在安装Ruby 1.9.3</p>

<pre><code>rvm install 1.9.3   #安装1.9.3版本的ruby
rvm use 1.9.3 #如果有多个版本的ruby，使用1.9.3版本的
rvm rubygems latest
</code></pre>

<p>3、Mou <br/>
Markdown编辑软件，用于编辑文章，我现在就在用该软件编写了，很棒的，所见即所得。  下载地址：<a href="http://mouapp.com">http://mouapp.com</a></p>

<h2>安装Octopress</h2>

<blockquote><p>一切按照官方的文档安装就OK了，官方文档地址：<a href="http://octopress.org/docs/setup/">http://octopress.org/docs/setup/</a></p></blockquote>

<p>在终端输入git命令，安装Octopress，安装完成后跳转到 Octopress 所在目录中。</p>

<pre><code>git clone git://github.com/imathis/octopress.git  octopress
cd octopress #跳转到 octopress 目录
</code></pre>

<p>安装依赖项</p>

<pre><code>gem install bundler #
bundle install #会安装很多，这个地方最有可能失败了，没关系，多按几次就OK了。
</code></pre>

<p>如果之前你的ruby环境安装成功，那么此处会有绿色的字体提示。接下来安装默认主题：</p>

<pre><code>rake install
</code></pre>

<h2>在Github上创建一个新的Repositories</h2>

<p>登录Github，创建一个新的存储库，命名为：<code>username.github.com</code>，只有这种格式的命名才能在运行命令 <code>rake setup_github_pages</code> 之后自动创建 <strong>master</strong>和<strong>source</strong>分支，否则为作为普通仓库生成 <strong>gh-pages</strong>分支。 <br/>
打开客户端软件Github，点击底部的 + &ndash;> Creat New Repositories…，填写 <br/>
Name: username.github.com <br/>
Description: blog <br/>
Local Path: 指定到磁盘的某一位置 <br/>
然后创建即可。</p>

<p> <!-- more --></p>

<h2>发布Octopress到Github</h2>

<p>在终端输入如下命令：</p>

<pre><code>rake setup_github_pages
</code></pre>

<p>1、按照提示输入刚才新建的仓库地址，类似：<a href="https://github.com/username/username.github.com.git">https://github.com/username/username.github.com.git</a>  <br/>
2、接着输入以下命令：</p>

<pre><code>rake generate #生成静态页面
rake preview #用来本地浏览，按Control+C终止。 
</code></pre>

<p>本地浏览默认网站为：<a href="http://localhost:4000">http://localhost:4000</a>
3、输入以下命令，发布blog到Github上：</p>

<pre><code>rake deploy
</code></pre>

<p>这样blog生成的内容会自动发布到master分支，并且可以使用 <a href="http://username.github.com">http://username.github.com</a>访问啦。
4、把所有源文件发布到source分支下：</p>

<pre><code>git add .
git commit -m "message"
git push origin source
</code></pre>

<p>到目前为止，blog以发布完成。可能有部分同学不会成功，没关系，回头再检查一遍上边的步骤，看看是不是有些地方设置有误。    <br/>
接下来对blog进行设置。</p>

<h2>Ocotpress博客配置</h2>

<h3>1、blog的基本设置</h3>

<p>blog的基本设置是在Octopress根目录的主配置文件<code>_config.yml</code>中，所以我们需要修改配置文件<code>_config.yml</code>。</p>

<h3>需要特别说明的是: yml格式默认是：参数 + : + 空格，如果不加空格，编译会报错。</h3>

<pre><code>url: http://wzrong.me   # 博客地址
title: Wzrong's Blog        # 博客标题
subtitle: 感受生活，感悟工作，感触心灵.   # 博客副标题
author: 卫志荣   # 作者
simple_search: http://google.com/search     # 搜索引擎
description: 记录并沉淀自己的学习点滴。        # 关于博客的描述
subscribe_rss: /atom.xml        # Rss订阅地址，默认为 /atom.xml
email: wzrong@me.com    # Rss订阅的Email地址
root: /     # 博客路径，默认为 "/"，如果你的blog在子目录中，需要修改这个路径
permalink: /blog/:year/:month/:day/:title/   # 文章的固定连接形式
</code></pre>

<h3>2、更换主题</h3>

<p>暂时不换了，换的时候再考虑吧。</p>

<h3>3、添加多说评论</h3>

<p>在 <code>_config.yml</code> 中添加</p>

<pre><code># duoshuo comments
duoshuo_comments: true
duoshuo_short_name: yourname
</code></pre>

<p>替换 <code>source/_layouts/post.html</code> 中的 <code>disqus</code> 代码</p>

<pre><code>{ % if site.disqus_short_name and page.comments == true % }
    &lt;section&gt;
        &lt;h1&gt;Comments&lt;/h1&gt;
        &lt;div id="disqus_thread" aria-live="polite"&gt;{ % include post/disqus_thread.html % }&lt;/div&gt;
    &lt;/section&gt;
{ % endif % }
</code></pre>

<p>为下方的 <code>多说评论</code> 模块</p>

<pre><code>{ % if site.duoshuo_short_name and site.duoshuo_comments == true and page.comments == true % }
    &lt;section&gt;
        &lt;div id="comments" aria-live="polite"&gt;{ % include post/duoshuo.html % }&lt;/div&gt;
    &lt;/section&gt;
{ % endif % }
</code></pre>

<p>在路径 <code>source/_includes/post/</code> 下创建一个 <code>duoshuo.html</code> 页面，并加入以下代码：</p>

<pre><code>&lt;!-- Duoshuo Comment BEGIN --&gt;
{ % if site.duoshuo_short_name % }        
&lt;div class="ds-thread" data-title="{ % if site . title case % }{ % else % }{ % end if % }"&gt;&lt;/div&gt;
&lt;script type="text/javascript"&gt;
    var duoshuoQuery = {short_name:"wzrong"};
    (function() {
        var ds = document.createElement('script');
        ds.type = 'text/javascript';ds.async = true;
        ds.src = 'http://static.duoshuo.com/embed.js';
        ds.charset = 'UTF-8';
        (document.getElementsByTagName('head')[0] 
        || document.getElementsByTagName('body')[0]).appendChild(ds);
    })();
&lt;/script&gt;    
{ % endif % }
&lt;!-- Duoshuo Comment END --&gt;    
</code></pre>

<p>然后再修改 <code>source/_layouts/post.html</code> 文件，在标签 <code>&lt;/article&gt;</code> 下边添加以下<code>多说评论</code>代码：</p>

<pre><code>&lt;!-- Duoshuo Comment BEGIN --&gt;
{ % if site.duoshuo_short_name and page.comments == true % }
    &lt;section id="comment"&gt;
        { % include post/duoshuo.html % }
    &lt;/section&gt;
{ % endif % }   
&lt;!-- Duoshuo Comment END --&gt;
</code></pre>

<p>到此 <code>多说评论</code> 在 Octopress 中已经设置完成，接下来去<a href="http://duoshuo.com">多说网</a>注册一个账号，添加站点，获取 <code>duoshuo_short_name</code>。</p>

<h3>4、添加版权声明</h3>

<p>这里所说的版权声明是指添加在每篇文章后面的版权信息。  <br/>
首先在 <code>source/_includes/post</code>目录中添加 <code>license.html</code> 文件，内容如下：</p>

<pre><code>&lt;!-- Copyright Info BEGIN --&gt;
{ % if site.post_license % }
&lt; p class="post-footer"&gt;
    原文地址：&lt; a href="http://wzrong.me/blog/2013/09/10/octopress-blog/"&gt; http://wzrong.me/blog/2013/09/10/octopress-blog/ &lt;/a &gt;
    &lt;br /&gt;
    &lt;a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/deed.zh" &gt;&lt;/a&gt;版权声明：自由转载-非商用-非衍生-保持署名 | &lt;a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/deed.zh" &gt;Creative Commons BY-NC-ND 3.0 &lt;/a&gt; | &lt;img alt="知识共享许可协议" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-nd/3.0/80x15.png" /&gt;
&lt;/p&gt;
{ % endif % }
&lt;!-- Copyright Info END --&gt;
</code></pre>

<p>在 <code>sass/custom/</code> 中的 <code>_style.css</code> 文件中添加以下样式来设置版权信息的样式</p>

<pre><code>.post-footer{
    background: #ccc;
}
</code></pre>

<p>修改文件 <code>source/_layouts/post.html</code>，在 <code>{ % include article.html %}</code> 下边添加 <code>{ % include post/license.html % }</code>  <br/>
在 <code>_config.yml</code> 添加配置项来控制是否显示页面的版权信息</p>

<pre><code># Post License
post_license: true
</code></pre>

<p>至此版权信息添加完成，效果与本blog一致。</p>

<blockquote><p>特别说明：文中有遇到 <code>{ %</code> 与 <code>% }</code> 的情况时，请自行把<code>{</code>和<code>%</code>之间的空格去掉。由于编写时候有编译错误，故加了空格，抱歉。</p></blockquote>
]]></content>
  </entry>
  
</feed>
