Roy Prins

Entrepreneur @snirp.nl and @juis.nl - Consultant, Real Estate specialist and Software developer.

Read this first

Flatfreeze intro and quick start

This chapter is the first part of a tutorial and it contains an introduction and a quick start guide:

  1. Flatfreeze intro and quick start (this chapter);
  2. Set up the Flatfreeze project;
  3. Flatfreeze static site generation;
  4. Add FlatPages to Flatfreeze;
  5. Doing more with Flatfreeze.

 Introduction

Flatfreeze is a tutorial project to quickly build a custom static website generator. It is nothing more than a Flask project using Frozen-Flask and Flask-FlatPages, hosted on Github Pages. When put together it gives you the advantage of:

  • Custom domain name;
  • Git revision control for both application and static site;
  • Jinja templating;
  • Free and excellent hosting on Github Pages;
  • Versatility: not tied to blogging, but you can easily make a blog;
  • Writing your articles in eye-pleasing Markdown;
  • Compactness: less than 60 lines of Python.

When I was looking to build a simple static website for my

Continue reading →


Set up the Flatfreeze project

This chapter is the second part of a tutorial and it will show you how to set up a repository for static site generation:

  1. Flatfreeze intro and quick start;
  2. Set up the Flatfreeze project (this chapter);
  3. Flatfreeze static site generation;
  4. Add FlatPages to Flatfreeze;
  5. Doing more with Flatfreeze.

 Github Pages: the good and the bad.

Github offers free and very reliable hosting through Github Pages, but it only supports static sites. No server-side scripting is allowed. Depending on your needs, it could be a very attractive, but often overlooked, option for company pages, blogs, personal webpages or event pages that hit very high traffic.

Static websites are making a bit of a comeback, notably with weblogs. This is mainly due to ‘static site generators’ which mitigate some of the traditional disadvantages of static sites by using dynamic frameworks and 'freezing’ the project into a

Continue reading →


Flatfreeze static sites generation

This chapter is the third part of a tutorial and it will show how to freeze a Flask app into a static site:

  1. Flatfreeze intro and quick start;
  2. Set up the Flatfreeze project;
  3. Flatfreeze static site generation (this chapter);
  4. Add FlatPages to Flatfreeze;
  5. Doing more with Flatfreeze.

 Install the dependencies

Flask is a Python framework, so let’s set up a virtualenv with the dependencies first. If you are not using virtualenv for your Python projects, you really should. Inside your project/root folder do:

$ virtualenv venv --distribute
...Installing pip........done
$ source venv/bin/activate
(venv)$ pip install frozen-flask
(venv)$ pip install flask-flatpages

These commands install everything we need. This is what the packages do:

  • Flask-flatpages takes Markdown files, renders them to HTML and parses the metadata of the first lines of the file.
  • Frozen-flask freezes a dynamic

Continue reading →


Add FlatPages to Flatfreeze

This chapter is the fourth part of our tutorial and it shows how to expand our static site generator to include a flatpages blog:

  1. Flatfreeze intro and quick start;
  2. Set up the Flatfreeze project;
  3. Flatfreeze static site generation;
  4. Add FlatPages to Flatfreeze (this chapter);
  5. Doing more with Flatfreeze.

 Requirements for a simple weblog

While the approach in the previous chapter is perfectly suited to mockup a homepage, it falls short when it comes to pushing content. Imagine you want to add blog postings, white papers, reviews, press releases or recipes to your site.

People (well geeks) seem to love Markdown to markup and publish content quickly. Several “static blogging engines” exist that render Markdown to HTML pages, notably Jekyll and Pelican. These are too much tied to a traditional blogging setup for my purposes.

Flask-Flatpages incorporates Markdown rendering and is more

Continue reading →


Doing more with Flatfreeze

This chapter is the final part of the tutorial. I am looking for input on what topic to cover here:

  1. Flatfreeze intro and quick start;
  2. Set up the Flatfreeze project;
  3. Flatfreeze static site generation;
  4. Add FlatPages to Flatfreeze;
  5. Doing more with Flatfreeze (this chapter).

 more to come…

Let me know what you want covered here…


find me on [Twitter](TODO) –:– discuss this on [Hacker News](TODO)

Continue reading →


A decision-making algorithm

 And allowing yourself to cheat in the process

Whenever you get into something new, be it a blog platform or a new phone, you face making a decision. There is a science behind decision-making and quite some helpful advice circulates on the web. Despite all that, it is a hard thing to do and I will share some of the experience that ultimately made decision making easier for me. This write-up will add some helpful advise and will not contribute to science at all.

 The problem with decisions

Some people argue that humans are not particularly good at making decisions. It is true that we tend be biased for various reasons: wikipedia lists 18 different biases we might have. As it stands, humans are still the best thing we have for making decisions. Although some stock-picking monkeys might beg to differ.

“When faced with two equally tough choices, most people choose the third choice: to not

Continue reading →

no