-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.xml
139 lines (94 loc) · 10.3 KB
/
index.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>pabl.me</title>
<link>http://pabl.me/</link>
<description>Recent content on pabl.me</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Sat, 19 Sep 2015 15:32:39 +0200</lastBuildDate>
<atom:link href="http://pabl.me/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Blogging with Hugo</title>
<link>http://pabl.me/post/hugo_blogging/</link>
<pubDate>Sat, 19 Sep 2015 15:32:39 +0200</pubDate>
<guid>http://pabl.me/post/hugo_blogging/</guid>
<description>
<p>So this is my first post, and this is the one that is serving me (have served) for testing. How did I come to write a blog is out of the question, this starts at the point when that decision was already taken.</p>
<p>This blog needs to conform to this requisites:</p>
<ul>
<li>Cheap</li>
<li>No ads</li>
<li>Custom domain</li>
<li>Allow visitors to drop a line</li>
<li>Customizable</li>
<li>Simple editing</li>
</ul>
<h1 id="requisites:5f8518b920f4ec1abd850944ff2e64f0">Requisites</h1>
<h2 id="cheap:5f8518b920f4ec1abd850944ff2e64f0">Cheap</h2>
<p>There are some well known places to host a blog for free, but they don&rsquo;t usually allow custom domain names and customizing. I don&rsquo;t think I&rsquo;ll want to use the server/service for other matters, so I&rsquo;m not willing to spend over 50€/year, including domain name.</p>
<h2 id="ads:5f8518b920f4ec1abd850944ff2e64f0">Ads</h2>
<p>Blogspot, Wordpress and the likes can be used without ads, and obviously if you pay for a service you are getting rid of them. Some other services like blog.com, include ads in your posts when using the free version.</p>
<h2 id="custom-domain:5f8518b920f4ec1abd850944ff2e64f0">Custom domain</h2>
<p>I&rsquo;m looking for a registrar that allows me to define alias to redirect to wherever my site is. Not all registrars sell every TLD, so chose an available domain and filtered companies that didn&rsquo;t offered &lsquo;.me&rsquo; domains (which is my surname prefix). &lsquo;.me&rsquo; domain&rsquo;s prices are lower than most of the other TLDs, and although pablo.me would have been better, pabl.me is ok for me.</p>
<h2 id="comments:5f8518b920f4ec1abd850944ff2e64f0">Comments</h2>
<p>I&rsquo;ve already used Wordpress and Joomla before, and although having an full featured solution for the blog (with comments, images, videos, logs &hellip;) seems right, there are some other products that can be integrated seamlessly into the blog post&rsquo;s.</p>
<h2 id="customization:5f8518b920f4ec1abd850944ff2e64f0">Customization</h2>
<p>I&rsquo;m far from being a web designer, so I can relax customization, as far as I can use some already made theme and tweak it a little bit. I don&rsquo;t like Blogspot appearance but probably anything beyond Blogspot is going to be OK for me.</p>
<h2 id="simple-editing:5f8518b920f4ec1abd850944ff2e64f0">Simple editing</h2>
<p>No HTML. I&rsquo;d like to use a simple editor that allows inserting external objects and custom formating for code. Wordpress have some amazing plugins for that.</p>
<h1 id="the-hosting:5f8518b920f4ec1abd850944ff2e64f0">The hosting</h1>
<p>Let&rsquo;s start looking at the three possible blog hosting families I&rsquo;m thinking of:</p>
<ul>
<li>Small cloud server: mmm &hellip; not price compliant with the requisites.</li>
<li>A web hosting service: if used this one before, and feel confortable.</li>
<li>A blog service: should be cheaper than the web hosting.</li>
</ul>
<p>So let&rsquo;s begin dropping the cloud server, using a go/node/ruby application and extending the server with some other applications is tempting, but I don&rsquo;t want to lose focus. I&rsquo;ll try the blog service solution, and if I find it doesn&rsquo;t suits me, I&rsquo;ll fall back to the web hosting service.</p>
<p>After some googling, my two main alternatives are</p>
<ul>
<li>Use AWS services, not EC2</li>
<li>Use Github pages</li>
</ul>
<p><a href="https://github.com/jaws-framework/JAWS">JAWS</a> framework have been around for a while. At this point in time it&rsquo;s about to release v1.0.0. JAWS is using mainly S3 for hosting and serving all static content, Lambda to serve requests that require processing, and as far as I know it uses dynamo to store &ldquo;alive&rdquo; data.</p>
<p>JAWS is great and cheap, If I were starting a business on a budget I would surely take this way, but for a blog seems huge. Once more I have to stay focused, I only need some static content, and S3 allows me to host that static content and also to <a href="http://docs.aws.amazon.com/AmazonS3/latest/dev/website-hosting-custom-domain-walkthrough.html">use my own domain</a>.</p>
<p>S3 price is low, way low, I can use whatever tool to generate static content, bring my domain, and pay only for storage and network usage, which will propably be under 1€ (I&rsquo;m not expecting many visitors). But &hellip; Github is free.</p>
<p>If you don&rsquo;t mind having all you files public, and I don&rsquo;t mind, <a href="https://pages.github.com/">Github can host our website</a>. After reading a bit I decided to get the Github way, so my only expense is going to be the domain and my own time.</p>
<h2 id="domain:5f8518b920f4ec1abd850944ff2e64f0">Domain</h2>
<p>After some googling for registrars, <a href="https://www.namecheap.com/">Namecheap</a> seemed to be good choice for me, so I looked for a discount coupon using Honey extension for Chrome, and purchased it. I also followed <a href="https://help.github.com/articles/tips-for-configuring-an-a-record-with-your-dns-provider/">Github Pages instructions</a> to configure the A record in Namecheap control panel.
In a few minutes I had a Hello World ugly page under my domain.</p>
<h1 id="the-blog:5f8518b920f4ec1abd850944ff2e64f0">The Blog</h1>
<p>I still need to read Github Pages documentation and whatever differences are there between static web generators, <a href="http://jekyllrb.com/">Jekyll</a>, <a href="https://gohugo.io/">Hugo</a>, <a href="http://octopress.org/">Octopress</a>, <a href="https://middlemanapp.com/">Middleman</a> to name a few.</p>
<p>I&rsquo;ll stick with Hugo because:</p>
<ol>
<li>It&rsquo;s written in Go, and I love Go.</li>
<li>One of my sons is called Hugo.</li>
<li>I don&rsquo;t think spending much time comparing static web generators will make a difference.</li>
</ol>
<p>I guess this three reasons sound a bit lazy, but hey, I wan&rsquo;t my blog now.</p>
<p>Si I downloaded Hugo, read (some of) the docs, and started to Lorem ipsum with it. I cloned all <a href="https://github.com/spf13/hugoThemes/">Hugo themes</a> and tested each one of them. I liked <a href="https://github.com/dplesca/purehugo">purehugo</a> as a starting point, it&rsquo;s very simple yet is integrated with Disqus for comments.</p>
<p>There are some little flaws that I&rsquo;m fixing, and a couple of features I&rsquo;d like to have that are missing. One of them is showing only the first few words of a post in listings, instead of showing the full post. That&rsquo;s suppported in Hugo using the &lsquo;Summary&rsquo; variable.</p>
<p>That one is going to serve me to test the source code rendering with Hugo. Let&rsquo;s see the theme&rsquo;s layouts/_default/lists.html file modified, replacing the content div with:</p>
<div class="highlight" style="background: #272822"><pre style="line-height: 125%"><span style="color: #f92672">&lt;div</span> <span style="color: #a6e22e">class=</span><span style="color: #e6db74">&quot;summary&quot;</span><span style="color: #f92672">&gt;</span>
{{ .Summary }}
<span style="color: #f92672">&lt;/div&gt;</span>
{{ if .Truncated }}
<span style="color: #f92672">&lt;div</span> <span style="color: #a6e22e">class=</span><span style="color: #e6db74">&quot;read-more-link&quot;</span><span style="color: #f92672">&gt;</span>
<span style="color: #f92672">&lt;a</span> <span style="color: #a6e22e">href=</span><span style="color: #e6db74">&quot;{{ .RelPermalink }}&quot;</span><span style="color: #f92672">&gt;</span>Read More…<span style="color: #f92672">&lt;/a&gt;</span>
<span style="color: #f92672">&lt;/div&gt;</span>
{{ end }}
</pre></div>
<h1 id="next:5f8518b920f4ec1abd850944ff2e64f0">Next</h1>
<p>Not bad &hellip; I can start blogging with this, but my TODO list isn&rsquo;t empty. I still have to</p>
<ul>
<li>Find a WYSIWYG tool that can write markdown.</li>
<li>Section listing now shows post summaries, but the index page is showing full posts. Need to fix that</li>
<li>Sidebar is too wide for my taste.</li>
<li>Social sharing buttons at the end of page don&rsquo;t look right.</li>
<li>Haven&rsquo;t tested images/videos</li>
</ul>
<p>But that will be another day.</p>
</description>
</item>
</channel>
</rss>