Add minutes to read

This commit is contained in:
cool-mist 2020-12-25 17:22:30 +00:00
parent 2309877344
commit 1e455bef0b
8 changed files with 59 additions and 17 deletions

View File

@ -1,8 +1,8 @@
# Setup
title: Bionic Beanie
tagline: 'Blog'
description: 'I would expect that I write about video games, music, chess and tech for the most part'
url: https://bionicbeanie.me
description: 'I would expect that I write about video games, music, chess and tech for the most part'
url: https://blog.bionicbeanie.me
baseurl: ''
paginate: 5
permalink: pretty
@ -18,7 +18,7 @@ plugins:
- jemoji
# Serving
host: bionicbeanie.me
host: blog.bionicbeanie.me
port: 4000
# Custom vars

View File

@ -0,0 +1,6 @@
{% capture words %}
{{ content | number_of_words | minus: 180 }}
{% endcapture %}
{% unless words contains '-' %}
{{ words | plus: 150 | divided_by: 150 | append: ' min read' }}
{% endunless %}

View File

@ -5,6 +5,9 @@ layout: default
<div class="post">
<h1 class="post-title">{{ page.title }}</h1>
<span class="post-date">{{ page.date | date_to_string }}</span>
<span class="post-meta-separator">.</span>
<span class="post-minutes">{% include minutes_to_read.html %}</span>
<br/>
{{ content }}
</div>

View File

@ -10,29 +10,29 @@ How did I setup this site ?
--------
### Domain Name
## Domain Name
[Bionic Beanie](https://theportalwiki.com/wiki/Bionic_Beanie) is a head wear from [Portal 2](https://en.wikipedia.org/wiki/Portal_2) co-op. Portal series is one of my favourite PC games and **Bionic Beanie Blog** sounded great in my head.
Bought it right away from [Go Daddy](https://in.godaddy.com/). The package included DNS hosting as well.
### Blog Tech
## Blog Tech
I wanted to use a static site generator as opposed to any CMS like Wordpress. They should be faster and easier to configure/manage. [Jekyll](https://jekyllrb.com/) is what I settled with - mainly because I [recognise the name from my childhood](https://en.wikipedia.org/wiki/Strange_Case_of_Dr_Jekyll_and_Mr_Hyde).
To fasttrack my site design, I decided to use [Lanyon](https://github.com/poole/lanyon#readme) which is an extension of [Poole](https://getpoole.com/) - which I also [recognize from my childhood](https://study.com/academy/lesson/mr-poole-in-dr-jekyll-mr-hyde.html).
### Hosting my blog
## Hosting my blog
Bought the cheapest VPS from [Vultr](https://www.vultr.com/) for $5 a month - 1GB RAM and a single core shared server. This is more than good enough for hosting my static files. I might end up using this instance for some of my other projects too.
### Working Setup
## Working Setup
[LetsEncrypt](https://letsencrypt.org/) helped issuing free ssl cert for my domain.
The server will run behind an [nginx](https://www.nginx.com/) instance serving static files from `_site` folder that are built as part of jekyll build process. Having set the config up [this way](https://gist.github.com/cool-mist/9663a14d0821211b34b7e5f970f6f4e4), I just have to clone and build the files to publish new changes. I will push the blog site data to a remote git repository to manage the articles.
### Logo
## Logo
The letters signify the first letter of the site's name. The color scheme is a reference to the two different portal colors in Portal.

View File

@ -24,6 +24,6 @@ My favourite part of the book comes towards the end where the author draws simil
There is a [video](https://www.youtube.com/watch?v=CePeCicTqCM) of [Neil De'grasse Tyson](https://en.wikipedia.org/wiki/Neil_deGrasse_Tyson) (the video is not related to this book) explaining the concepts in passages of the book. I do not want to give too much away from the book and would suggest to go through the book first before the video so that you do not spoil the satisfaction of learning this through the words of a professor from 1884!!
Apart from mathematics, the book is also filled with political commentary on the 2 dimensional universe - different levels of hierarchy in the society, power and control, education and even a revolution!! While reading some of the chapters, I was constantly drawing parallels with the 3 dimensional world we live in.
Apart from mathematics, the book is also filled with political commentary on the 2 dimensional universe - different levels of hierarchy in the society, power and control, education and even a revolution. It was an amusing exercise to draw parallels with the real world
The book is a small one and can be completed in a single sitting in less than two hours when reading at a leisurely pace. The English in the book was a bit difficult for me to follow as it is very different from the form of English that is spoken today. If you are intereseted in Physics, Mathematics, Dimensions and Time Travel like me, then this books is a must read. I read this book as a pre-cursor to the [Quantum Series](https://www.goodreads.com/series/237217-quantum) by [Douglas Philips](https://www.goodreads.com/author/show/7161775.Douglas_Phillips).

View File

@ -13,6 +13,8 @@ title: Home
</h1>
<span class="post-date">{{ post.date | date_to_string }}</span>
<span class="post-meta-separator">.</span>
<span class="post-minutes">{% capture content %}{{ post.content }}{% endcapture %}{% include minutes_to_read.html %}</span>
{{ post.excerpt }}
<p><a href="{{ post.url | absolute_url }}">Read more...</a></p>

View File

@ -320,10 +320,27 @@ a.sidebar-nav-item:focus {
/* Meta data line below post title */
.post-date {
display: block;
margin-top: -.5rem;
display: inline;
margin-top: -1rem;
margin-bottom: 1rem;
color: #9a9a9a;
color: #6d74a1;
font-weight: bold;
font-size: 0.8em;
}
.post-minutes {
display: inline;
margin-top: -1rem;
margin-bottom: 1rem;
color: #6d74a1;
font-weight: bold;
font-size: 0.8em;
}
.post-meta-separator {
display: inline;
margin-bottom: 5rem;
font-size: 1.8em;
}
/* Related posts */

View File

@ -105,8 +105,8 @@ h4, h5, h6 {
/* Body text */
p {
margin-top: 0;
margin-bottom: 1rem;
margin-top: 1.5rem;
margin-bottom: 1.5rem;
}
strong {
@ -343,13 +343,27 @@ tbody tr:nth-child(odd) th {
.post-title {
margin-top: 0;
}
/* Meta data line below post title */
.post-date {
display: block;
display: inline;
margin-top: -.5rem;
margin-bottom: 1rem;
color: #9a9a9a;
color: #91aabd;
font-size: 0.8em;
}
.post-minutes {
display: inline;
margin-top: -.5rem;
margin-bottom: 1rem;
color: #91aabd;
font-size: 0.8em;
}
.post-meta-separator {
display: inline;
margin-bottom: 5rem;
font-size: 1.8em;
}
/* Related posts */