Browse Source

changes & new post

master
sipp11 10 years ago
parent
commit
be3aa495d9
  1. 2
      _config.yml
  2. 18
      _layouts/default.html
  3. 10
      _layouts/page.html
  4. 10
      _layouts/post.html
  5. 14
      _posts/2014-12-08-migrate-to-jekyll.md
  6. 15
      index.html
  7. 11
      sync_to_prod.sh

2
_config.yml

@ -9,7 +9,7 @@ url: "http://blog.10ninox.com/" # the base hostname & protocol for your site
twitter_username: sipp11
github_username: sipp11
permalink: /:year/:month/:day/:title/
permalink: /:year/:month/:title/
paginate: 8
paginate_path: "post/page/:num/"

18
_layouts/default.html

@ -17,17 +17,13 @@
{% include footer.html %}
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = '10ninox'; // required: replace example with your forum shortname
/* * * DON'T EDIT BELOW THIS LINE * * */
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-3189083-1', 'auto');
ga('send', 'pageview');
</script>
</body>

10
_layouts/page.html

@ -11,4 +11,14 @@ layout: default
{{ content }}
</article>
<div id="disqus_thread"></div>
<script>
var disqus_shortname = '10ninox';
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
</div>

10
_layouts/post.html

@ -12,4 +12,14 @@ layout: default
{{ content }}
</article>
<div id="disqus_thread"></div>
<script>
var disqus_shortname = '10ninox';
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
</div>

14
_posts/2014-12-08-migrate-to-jekyll.md

@ -0,0 +1,14 @@
---
layout: post
title: Jekyll it is
created: 1417988938
author:
display_name: sipp11
categories:
- talk
---
The change arrived. __10ninox blog__ now has turned into pretty minimal web pages. It is a bit harder on user's side since there is nothing such as tag link, month page, search, and so on, but posts remain the same: URL, content.
10ninox's blog was started by using WordPress, but over the past years, I haven't been actively blogging and I'm doing a lot more on coding side. Consequently, I figured out that I should have just turned the blog into an easier and cheaper process on my part. Nowadays, I prefered doing anything in text file; working in terminal; pushing stuffs from there to logging in to WordPress--previewing and publishing from there. [Jekyll](http://jekyllrb.com/) was one of the obvious choices as far as Google's results are concerned. Don't ask me why I pick Jekyll over anything since I do not know if there is anything better. I did try to find Jekyll alternative in Python, but have yet to find anything better. Jekyll is okay with markdown and I'm comfortable with it. Since I do not code in Ruby, I am seemingly blind to configure in any way, but basic. Hopefully, one day, I get around to work on that, but so far, this works with only nginx and cheap VM. I couldn't be happier.
Thanks to [Jekyll](http://jekyllrb.com/), [Disqus](http://disqus.com), [git](http://www.git-scm.com/), and [nginx](http://nginx.org/) to make this possible.

15
index.html

@ -11,7 +11,7 @@ layout: default
<ul class="post-list">
{% for post in paginator.posts %}
<li>
<span class="post-meta">{{ post.date | date: "%b %-d, %Y" }} • <small>{{ post.categories | array_to_sentence_string }}</small></span>
<span class="post-meta">{{ post.date | date: "%b %-d, %Y" }} • <small>{{ post.categories | array_to_sentence_string }}<a href="{{ post.url | prepend: site.baseurl }}#disqus_thread">comments</a></small></span>
<h2><a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a></h2>
</li>
{% endfor %}
@ -19,3 +19,16 @@ layout: default
{% include paginator.html %}
</div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = '10ninox'; // required: replace example with your forum shortname
/* * * DON'T EDIT BELOW THIS LINE * * */
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>

11
sync_to_prod.sh

@ -0,0 +1,11 @@
#!/bin/sh
RUSER=sipp11
RHOST=do3
PORT=22
RPATH=/opt/www/10ninox_blog
LPATH=./_site/
rsync -avu -e "ssh -p $PORT" $LPATH $RUSER@$RHOST:$RPATH \
--exclude=.DS_Store --exclude=sync_ec2.sh --exclude=*.pyc \
--exclude=migrations --exclude=scripts
Loading…
Cancel
Save