当产品真的存在用户价值的时候,用户就会拥抱产品。即便产品的用户路径会长一些,没有关系,这就是用户价值的神奇之处。

Here be a sample post with a custom background image. To utilize this “feature” just add the following YAML to a post’s front matter.

image:
  background: filename.png

This little bit of YAML makes the assumption that your background image asset is in the /images folder. If you place it somewhere else or are hotlinking from the web, just include the full http(s):// URL. Either way you should have a background image that is tiled.

If you want to set a background image for the entire site just add background: filename.png to your _config.yml and BOOM — background images on every page!

Background images from Subtle Patterns (Subtle Patterns) / CC BY-SA 3.0

前些日子去听了500 Startups的宣讲会,是朋友带着我去的。会上其实都是些粉丝听众,我可能连粉丝都算不上。那些不着边际的问题,让来讲的大中华负责人捉急啊。她今年的花红估计在这群人里是没着落了。估计还得多看看香港、台湾、东南亚的项目。

不过她放出来的位于12层办公场地的找片,高大上自不必说,那一览湾区的落地窗着实令人兴奋。听说那边有Google还有LinkedIn,连Facebook也在不远的隔壁。好希望有机会能够去湾区仰慕一下改变了这个时代的工程师们,也算不枉我加入互联网这一个神奇的行业。

要真说有什么放不下的,只是我手头的项目还没有一个交代,我有些不甘心。

期待一场说走就走的旅行。

Syntax highlighting is a feature that displays source code, in different colors and fonts according to the category of terms. This feature facilitates writing in a structured language such as a programming language or a markup language as both structures and syntax errors are visually distinct. Highlighting does not affect the meaning of the text itself; it is intended only for human readers.

Pygments Code Blocks

To modify styling and highlight colors edit /assets/less/pygments.less and compile main.less with your favorite preprocessor. Or edit main.css if that’s your thing, the classes you want to modify all begin with .highlight.

#container {
    float: left;
    margin: 0 -240px 0 0;
    width: 100%;
}

Line numbering enabled:

1 <nav class="pagination" role="navigation">
2     {% if page.previous %}
3         <a href="{{ site.url }}{{ page.previous.url }}" class="btn" title="{{ page.previous.title }}">Previous article</a>
4     {% endif %}
5     {% if page.next %}
6         <a href="{{ site.url }}{{ page.next.url }}" class="btn" title="{{ page.next.title }}">Next article</a>
7     {% endif %}
8 </nav><!-- /.pagination -->
module Jekyll
  class TagIndex < Page
    def initialize(site, base, dir, tag)
      @site = site
      @base = base
      @dir = dir
      @name = 'index.html'
      self.process(@name)
      self.read_yaml(File.join(base, '_layouts'), 'tag_index.html')
      self.data['tag'] = tag
      tag_title_prefix = site.config['tag_title_prefix'] || 'Tagged: '
      tag_title_suffix = site.config['tag_title_suffix'] || '&#8211;'
      self.data['title'] = "#{tag_title_prefix}#{tag}"
      self.data['description'] = "An archive of posts tagged #{tag}."
    end
  end
end

Standard Code Block

<nav class="pagination" role="navigation">
    {% if page.previous %}
        <a href="{{ site.url }}{{ page.previous.url }}" class="btn" title="{{ page.previous.title }}">Previous article</a>
    {% endif %}
    {% if page.next %}
        <a href="{{ site.url }}{{ page.next.url }}" class="btn" title="{{ page.next.title }}">Next article</a>
    {% endif %}
</nav><!-- /.pagination -->

Fenced Code Blocks

To modify styling and highlight colors edit /assets/less/coderay.less and compile main.less with your favorite preprocessor. Or edit main.css if that’s your thing, the classes you want to modify all begin with .coderay. Line numbers and a few other things can be modified in _config.yml under coderay.

#container {
    float: left;
    margin: 0 -240px 0 0;
    width: 100%;
}
<nav class="pagination" role="navigation">
    {% if page.previous %}
        <a href="{{ site.url }}{{ page.previous.url }}" class="btn" title="{{ page.previous.title }}">Previous article</a>
    {% endif %}
    {% if page.next %}
        <a href="{{ site.url }}{{ page.next.url }}" class="btn" title="{{ page.next.title }}">Next article</a>
    {% endif %}
</nav><!-- /.pagination -->
module Jekyll
  class TagIndex < Page
    def initialize(site, base, dir, tag)
      @site = site
      @base = base
      @dir = dir
      @name = 'index.html'
      self.process(@name)
      self.read_yaml(File.join(base, '_layouts'), 'tag_index.html')
      self.data['tag'] = tag
      tag_title_prefix = site.config['tag_title_prefix'] || 'Tagged: '
      tag_title_suffix = site.config['tag_title_suffix'] || '&#8211;'
      self.data['title'] = "#{tag_title_prefix}#{tag}"
      self.data['description'] = "An archive of posts tagged #{tag}."
    end
  end
end

背景:买阿里云服务,安装了LNMP0.9,把wordpress安置在了默认的目录/home/wwwroot里。希望在同一台机器上部署一个飞飞影视CMS的程序,一直安装不成功。

过程:后来要在这台服务器上部署飞飞影视CMS,折腾了半天先弄清楚了nginx的工作原理,配好了之后可以访问到intall.php这个页面,虽然提示了安装成功,但是到要进入管理后台的时候,就频繁遇到登录失败的情况。首先解决了一个mysql.sock文件所在位置的问题,因为菲菲项目中写死了默认位置是在/var/lib/…中的,而LNMP又放在了/tmp/..目录下。解决了这个问题后,又遇到问题。后来找高人查看发现是因为飞飞所在文件夹的所属用户组不正确。nginx的第一行就设置了用户名称和密码,而网站所属用户组应该是这个用户名称下的,不然没有修改这个文件夹中内容的权限。

所以以后遇到权限的问题要查看:

  1. nginx配置
  2. 项目文件夹权限
  3. 数据库权限
  4. 数据库连接