-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
232 lines (155 loc) · 11.8 KB
/
index.html
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pabl.me · pabl.me</title>
<meta name="description" content="catching up">
<meta name="generator" content="Hugo 0.15-DEV" />
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="pabl.me · pabl.me">
<meta name="twitter:description" content="catching up">
<meta property="og:type" content="article">
<meta property="og:title" content="pabl.me · pabl.me">
<meta property="og:description" content="catching up">
<link href='//fonts.googleapis.com/css?family=Source+Sans+Pro:400,700|Oxygen:400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.6.0/pure-min.css">
<!--[if lte IE 8]>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.6.0/grids-responsive-old-ie-min.css">
<![endif]-->
<!--[if gt IE 8]><!-->
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.6.0/grids-responsive-min.css">
<!--<![endif]-->
<link rel="stylesheet" href="http://pabl.me//css/all.min.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet">
<link rel="alternate" type="application/rss+xml" title="pabl.me" href="http://pabl.me//index.xml" />
</head>
<body>
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4">
<div class="header">
<hgroup>
<h1 class="brand-title"><a href="http://pabl.me/">pabl.me</a></h1>
<h2 class="brand-tagline"> catching up </h2>
</hgroup>
<nav class="nav">
<ul class="nav-list">
<li class="nav-item">
<a class="pure-button" href="https://twitter.com/pablme"><i class="fa fa-twitter"></i> Twitter</a>
</li>
<li class="nav-item">
<a class="pure-button" href="https://github.com/odacremolbap "><i class="fa fa-github-alt"></i> github</a>
</li>
<li class="nav-item">
<a class="pure-button" href="http://pabl.me//index.xml"><i class="fa fa-anchor on fa-square-o"></i> rss</a>
</li>
</ul>
</nav>
</div>
</div>
<div class="content pure-u-1 pure-u-md-3-4">
<div>
<div class="posts">
<h1 class="content-subhead">19 Sep 2015, 15:32</h1>
<section class="post">
<header class="post-header">
<a href="http://pabl.me/post/hugo_blogging/" class="post-title">Blogging with Hugo</a>
<p class="post-meta">
</p>
</header>
<div class="post-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’t usually allow custom domain names and customizing. I don’t think I’ll want to use the server/service for other matters, so I’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’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’t offered ‘.me’ domains (which is my surname prefix). ‘.me’ domain’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’ve already used Wordpress and Joomla before, and although having an full featured solution for the blog (with comments, images, videos, logs …) seems right, there are some other products that can be integrated seamlessly into the blog post’s.</p>
<h2 id="customization:5f8518b920f4ec1abd850944ff2e64f0">Customization</h2>
<p>I’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’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’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’s start looking at the three possible blog hosting families I’m thinking of:</p>
<ul>
<li>Small cloud server: mmm … 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’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’t want to lose focus. I’ll try the blog service solution, and if I find it doesn’t suits me, I’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’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 “alive” 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’m not expecting many visitors). But … Github is free.</p>
<p>If you don’t mind having all you files public, and I don’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’ll stick with Hugo because:</p>
<ol>
<li>It’s written in Go, and I love Go.</li>
<li>One of my sons is called Hugo.</li>
<li>I don’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’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’s very simple yet is integrated with Disqus for comments.</p>
<p>There are some little flaws that I’m fixing, and a couple of features I’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’s suppported in Hugo using the ‘Summary’ variable.</p>
<p>That one is going to serve me to test the source code rendering with Hugo. Let’s see the theme’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"><div</span> <span style="color: #a6e22e">class=</span><span style="color: #e6db74">"summary"</span><span style="color: #f92672">></span>
{{ .Summary }}
<span style="color: #f92672"></div></span>
{{ if .Truncated }}
<span style="color: #f92672"><div</span> <span style="color: #a6e22e">class=</span><span style="color: #e6db74">"read-more-link"</span><span style="color: #f92672">></span>
<span style="color: #f92672"><a</span> <span style="color: #a6e22e">href=</span><span style="color: #e6db74">"{{ .RelPermalink }}"</span><span style="color: #f92672">></span>Read More…<span style="color: #f92672"></a></span>
<span style="color: #f92672"></div></span>
{{ end }}
</pre></div>
<h1 id="next:5f8518b920f4ec1abd850944ff2e64f0">Next</h1>
<p>Not bad … I can start blogging with this, but my TODO list isn’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’t look right.</li>
<li>Haven’t tested images/videos</li>
</ul>
<p>But that will be another day.</p>
</div>
</section>
</div>
<div class="footer">
<div class="pure-menu pure-menu-horizontal pure-menu-open">
</div>
</div>
<script src="http://pabl.me//js/all.min.js"></script>
</div>
</div>
</div>
<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-23065685-2', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>