Current section
Files
Jump to
Current section
Files
html/Getting Started.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="eeb v0.2.0-dev">
<title>eeb – eeb v0.2.0-dev</title>
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="stylesheet" type="text/css" href="http://oss.maxcdn.com/semantic-ui/2.1.6/semantic.min.css">
<link rel="stylesheet" type="text/css" href="http://oss.maxcdn.com/highlight.js/9.1.0/styles/solarized-dark.min.css">
<link rel="stylesheet" type="text/css" href="assets/base.css">
</head>
<body>
<div class="ui text container" style="margin-top: 25px;">
<div class="author-info">
<div class="ui stackable two column grid container">
<div class="column">
<a href="index.html">
<img class="ui avatar image" src="http://upload.jianshu.io/users/upload_avatars/297930/02d576b98e6a.png?imageMogr/thumbnail/90x90/quality/100">
</a>
</div>
<div class="column" style="margin-left: -300px">
<div class="content">
<div class="header" style="margin-bottom: 5px">
<span class="mini ui red basic label">作者</span>
<a class="author-name blue-link" href="index.html">
<span>aborn</span>
</a>
<span class="popup" data-content="最后编辑于 2016-04-18 04:57" data-variation="inverted">2016-01-31 02:58*</span>
</div>
<span>写了397字</span>,<span>被49人访问</span>,<span id="span-like">获得0个喜欢</span>,<span id="span-comments">0条评论.</span>
</div>
</div>
</div>
</div>
<h1 class="ui header">eeb</h1>
<p>Elixir Extendable Blog, <a href="http://eeb.popkit.org/">http://eeb.popkit.org/</a><br/><a href="https://travis-ci.org/aborn/eeb"><img src="https://travis-ci.org/aborn/eeb.svg" alt="Build Status"/></a>
<a href="https://hex.pm/packages/eeb"><img src="http://img.shields.io/hexpm/v/eeb.svg?style=flat" alt="Hex.pm Version"/></a>
<a href="http://inch-ci.org/github/aborn/eeb"><img src="http://inch-ci.org/github/aborn/eeb.svg" alt="Inline docs"/></a>
<a href="https://coveralls.io/github/aborn/eeb?branch=master"><img src="https://coveralls.io/repos/aborn/eeb/badge.svg?branch=master&service=github" alt="Coverage Status"/></a><br/>Eeb is a blog platform, which write in elixir language.
And it includes two parst: </p>
<ol>
<li>static blog generator;
</li>
<li>webserver.
</li>
</ol>
<h2>Installation</h2>
<p>Install and deploy eeb needs elixir env. (version 1.2+). Install elixir env, pls. ref <a href="http://elixir-lang.org/install.html">elixir installation</a>。
We provide the following two methods to install eeb after elixir env ready.</p>
<h3>using hex package source</h3>
<p><strong>1.</strong> create a new empty project </p>
<pre><code class="elixir">mix new eeb_blog
cd eeb_blog</code></pre>
<p><strong>2.</strong> modify mix.exs, add eeb dependency, and using eeb module </p>
<pre><code class="elixir">def application do
[applications: [:logger,:eeb]]
end
defp deps do
[{:eeb, "~> 0.1.3"}]
end</code></pre>
<p><strong>3.</strong> install dependency, finally, deploy it </p>
<pre><code class="elixir">mix deps.get
mix eeb.deploy</code></pre>
<p>after deployment success, it shows following message </p>
<pre><code class="elixir">eeb running in http://localhost:4000/</code></pre>
<p>So, you can visit eeb blog using web browser<a href="http://localhost:4000/"><a href="http://localhost:4000/">http://localhost:4000/</a></a></p>
<h3>using eeb_new installation kit</h3>
<p><strong>1.</strong> install eeb_new kit as following </p>
<pre><code class="elixir">mix archive.install https://github.com/aborn/eeb/raw/master/installer/archives/eeb_new.ez</code></pre>
<p><strong>2.</strong> create a new eeb blog </p>
<pre><code class="elixir">mix eeb.new eeb_blog
cd eeb_blog</code></pre>
<p><strong>3.</strong> install dependency, finally, deploy it </p>
<pre><code class="elixir">mix deps.get
mix eeb.deploy</code></pre>
<h2>daemon running</h2>
<p>In linux platform, you can use screen to daemon eeb </p>
<pre><code class="shell">screen mix eeb.deploy # C-a d
# screen -ls
# screen -r id</code></pre>
<h2>Github Webhooks</h2>
<p>When your blog in github another repo. This function is very usefully. For example,
when you create or update an blog, you want eeb to update your blog immediately.
What’s should you do? Just config a webhooks on your blog repo, and add following
payload URL: </p>
<pre><code class="elixir">http://your-blog-domain.com/github.json?token=xxx</code></pre>
<p>Here, the value of token parameter xxx should configured as following: </p>
<pre><code class="elixir">mix eeb.config webhook_token xxx</code></pre>
<h2>Hints</h2>
<p><strong>1.</strong> default markdown format blog directory is posts/
You can configure by mix eeb.config blog_path “path/to/your/markdown/file/dir”, for example: </p>
<pre><code class="elixir">mix eeb.config blog_path "/Users/aborn/github/technotebook"</code></pre>
<p><strong>2.</strong> the static <em>.html files directory is html/
<strong>3.</strong> the images in html/images
<em>*4.</em></em> the blog with file name starting with “_” will be regarded as draft, and won’t be converted.</p>
<h2>The tasks command</h2>
<pre><code class="mix">mix eeb # Show the help command info.
mix eeb.blog # Generate static blogs from markdown files (in posts/ directory).
mix eeb.config # Reads or update eeb config.
mix eeb.deploy # Starts the eeb application.
mix eeb.index # Generate/Regenerate blog index.html file.</code></pre>
<h2>Configuration</h2>
<p>mix eeb.config key [value], the keys show as following: </p>
<pre><code class="elixir">blog_path - blog file path
blog_name - blog name config
blog_slogan - blog slogan config
blog_avatar - blog avatar image config
webhook_token - use as token verify when github webhook request
blog_port - blog http listening port number</code></pre>
<h2>Http listen port</h2>
<p>eeb use cowboy default http port 4000
Using one of folling method to change the http port: </p>
<h3>BLOG_PORT environment variable</h3>
<p>following is an example: </p>
<pre><code class="shell">export BLOG_PORT=4001</code></pre>
<h3>mix eeb.config</h3>
<p>following is an example: </p>
<pre><code class="elixir">mix eeb.config blog_port 4002</code></pre>
<p>But, the first one will be work if you use both method.</p>
<h2>Update date</h2>
<p>2016-01-31</p>
<!-- 多说评论框 start -->
<div class="ds-thread" short-name="eeb" data-thread-key="Getting Started.html" data-title="eeb" data-url="Getting Started.html"></div>
<!-- 多说评论框 end -->
<!-- 多说公共JS代码 start (一个网页只需插入一次) -->
<script type="text/javascript">
var duoshuoQuery = {short_name:"eeb"};
(function() {
var ds = document.createElement('script');
ds.type = 'text/javascript';ds.async = true;
ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
ds.charset = 'UTF-8';
(document.getElementsByTagName('head')[0]
|| document.getElementsByTagName('body')[0]).appendChild(ds);
})();
</script>
<!-- 多说公共JS代码 end --> <footer class="footer">
<p>
<span class="line">
Powered by
<a href="https://github.com/aborn/eeb" title="eeb" rel="help" target="_blank">eeb</a> (v0.2.0-dev).
</span>
</p>
</footer>
</div>
<script src="http://oss.maxcdn.com/jquery/2.1.4/jquery.min.js"></script>
<script src="http://oss.maxcdn.com/semantic-ui/2.1.6/semantic.min.js"></script>
<script src="http://www.dpfile.com/sc/static/highlight/9.1.0/highlight.pack.js"></script>
<script src="assets/app.js"></script>
<script src="assets/duoshuo.js"></script>
</body>
</html>