Writer.

Viktor Bengtsson

New Website... Again

20 March, 2017 • Viktor Bengtsson • 2 minutes to read

This started with a vacation, an urge to tinker, and an idea to visualize my reading progress online.

Last year I switched this website from Wordpress to the Jekyll static website generator. I also learned to code Python for a client project. I ended up building and deploying a Django framework webapp and so became quite comfortable with Python.

I've been very happy with Jekyll and with running a static website. It has done exactly what I need and no more. But I have felt a bit constrained in tinkering with and extending the functionality of Jekyll. I don't know Ruby, and having learnt one programming language last year was quite enough.

So I started looking around for the best way to integrate Python code on my Jekyll website and then I stumbled across Pelican.

Pelican is a simple static website generator written in Python. It uses the python markup library to parse markup to html and generates html with templates written in Jinja (which is very similar to Django's template language).

This was simply too good an opportunity, so I set about migrating from Jekyll to Pelican.

As my content was already in Markdown this was very simple, too simple to satisfy my urge to tinker. Luckily I wasn't happy with the template for my old site, and with Pelican's template language so similar to Django's, I set about building a template based on the Tufte css.

Tufte css worked pretty much out of the box for me. It is not written to support an entire website so I had to add some additional css to make my templates work the way I wanted. I also did some overrides on the tufte design logic where I felt that was needed.

The main issue was to find a simple way of generating the html patterns that tufte.css uses to produce side-notes, margin-notes etc. I ended up writing a small extension to the python markup library. I plan to release this on github as soon as I have tidied up the code. With this extension I can use simple Markup patterns to write Tufte-ready html.

So there you have it. The site is now fully migrated. My next project is to learn d3js to visualize my reading. It's horribly overkill I know, but I plan to use it in some bigger projects so this is a great opportunity to learn.


Other articles

52 for 52

11 March, 2017 • Viktor Bengtsson • 1 minute to read

I feel good about 2017, so this year I'm setting a reading goal which I've never broken before: 52 books, or 1 book per week.

Read more...

Wearebridget.com: Secure internet connection with VPN (swedish)

Wearebridget.com: Secure internet connection with VPN (swedish)

10 June, 2016 • Viktor Bengtsson • 1 minute to read

This is the second in a series of posts where I examine how to improve online security in your work and private life (repost from wearebridget.com)

Read more...

For the love of a bad book

26 May, 2016 • Viktor Bengtsson • 2 minutes to read

I love bad books. They are an unavoidable aspect of reading a lot, but for all their obvious flaws I have found that they help me as a writer.

Read more...

Switching to jekyll: design decisions

19 May, 2016 • Viktor Bengtsson • 3 minutes to read

Switching from Wordpress to a static website generated with Jekyll allowed me to think more deeply about design and what kind of web we want.

Read more...

Wearebridget.com: Secure alternatives for cloud storage (swedish)

Wearebridget.com: Secure alternatives for cloud storage (swedish)

13 May, 2016 • Viktor Bengtsson • 1 minute to read

This is the first in a series of posts where I examine how to improve online security in your work and private life (repost from wearebridget.com)

Read more...

Wearebridget.com: What makes good content? (Swedish)

Wearebridget.com: What makes good content? (Swedish)

27 April, 2016 • Viktor Bengtsson • 1 minute to read

What are some of the general characteristics of good content for inbound marketing? We review some general guidelines (repost from wearebridget.com)

Read more...

Org-mode for writers

09 March, 2016 • Viktor Bengtsson • 8 minutes to read

"Org-mode (and emacs) is a great free tool for writers inclined to scale the steep learning curve. Organize your work and write in a distraction-free environment."

Read more...

Informed Dissent: Website obesity, the future of online advertising, and the future of my website(s)

06 March, 2016 • Viktor Bengtsson • 1 minute to read

The web has become morbidly obese. We have stuffed so much heavy imagery, scripting and redundant content into our sites that they can hardly load anymore. The web needs a diet.

Read more...

Recently read: The Cairo Affair, by Olen Steinhauer

Recently read: The Cairo Affair, by Olen Steinhauer

21 August, 2015 • Viktor Bengtsson • 1 minute to read

Olen Steinhauer is one of the best authors currently writing in the spy fiction genre. The Cairo Affair is a tight piece of fiction in a modern setting.

Read more...

Page 1 / 3 »