📜 ⬆️ ⬇️

Choosing a static site generator

cloud storage

In recent years, among web developers and designers, interest in static sites has increased significantly. We also did not remain aloof from this trend and a few months ago published an article that told how our cloud storage can be used as a platform for hosting such sites. Quite unexpectedly, a very interesting discussion ensued around this article, and readers asked us to tell about static sites in more detail. Today we fulfill this request and begin a series of articles on static sites based on our repository.

The first publication in this series will be devoted to a comparative analysis of static site generators.
')

Comparison criteria


The static site generator is a software tool that turns text entries (with or without markup) into static HTML pages. All tools of this kind work in approximately the same way: the content is taken, glued to the template, and then sent to the hosting. The number of existing static site generators is in the hundreds, if not thousands.

How to choose a really worthy product from all this set? We decided to prepare our comparative review, which. we hope. will help someone from you to make a choice. For comparison, we selected generators, which, firstly, we can “make friends” with our cloud storage. Secondly, we also took into account the following criteria:


Generator overview


MiddleMan, Jekyll, Octopress


All three of these generators are written in Ruby and are very similar in their functions. That is why we decided to unite them in one group.

The installation procedure for all these products poses some difficulties: the version of Ruby included in the official repositories of Linux systems is most likely not enough - you have to update it to the latest. You will also need to install the RubyGems package manager and the Rbenv version manager.

We actively use MiddleMan in our own practice: it is the website of the cloud storage , as well as the site selectel.io . Its undoubted advantage is good and detailed documentation written in simple and understandable language. For Middleman there are a lot of extensions and plugins written, the list of which is constantly updated.

It is supported by the application using FTP, SFTP, rsync, git (on the official website you can find scripts to automate the deployment procedure; another extension is published on GitHub ). It is also possible to deploy on AWS and BitBalloon (there are corresponding plug-ins).

Jekyll (see also the article on Habré ) is known primarily for being used as a default engine for static sites based on GitHub Pages. Very often it is used for blogging. The undoubted advantage of Jekyll is support for Liquid markup: it allows you to create templates using constructions of a markup language only, and not a programming language.

There are quite a lot of extensions and plugins for Jekyll (see the information on the official website , as well as here and here ). The official plugins are “sharpened” mainly to work with GitHub Pages. The plugins published on GitHub are mostly intended to enhance blogging capabilities ( adding tag clouds , full-text blog search and even a specialized plugin for scientific and educational blogs ).

Supported by FTP, as well as using rsync and git.

Unlike the two previous products, Octopress is a specialized generator: it is essentially a superstructure over Jekyll with additional plugins and a responsive template that provide more convenient blogging.

Markdown is used as the default post layout, but plain HTML can be used. The undoubted advantage of Octopress is support for moving from other sites: for example, all entries from the blog on Wordpress can be transferred to a new static blog using a special script (although it is likely that after transferring, some of the texts can be broken and need to be edited manually). "Out of the box" is supported and work with the service Disqus, which simplifies the transfer of comments. Octopress-based blog can be integrated with social networks (Facebook, Twitter, Google Plus and others).

There are plugins that implement, for example, the insertion of calendars (similar to those that are sometimes found on Wordpress blogs), a list of similar posts, a tag cloud, and so on.

By default, it is supported by warmth using git (on GitHub Pages or Heroku) or rsync (on any hosting where you can set up SFTP or you can run rsync). You can also configure it via FTP (you can read about how to do this, for example, here ).

Hyde


This static site generator was originally conceived as a complete analog of Jekyll, only written in Python - hence the name referring to the famous RL story. Stevenson's “The Strange History of Dr. Jekyll and Mr. Hyde.”

It is necessary to distinguish between the old and the new version of Hyde. The old version is based on Django templates; its development is currently suspended (the latest commits in the repository on GitHub date back to 2009-2010). New Hyde (see also the repository on GitHub ) is currently in active development.

In terms of functionality, the new Hyde is no different from MiddleMan and Jekyll. We tested it a little bit and he made a very pleasant impression on us. Of the deficiencies found, we single out only one: the project, as already mentioned above, is under active development. That is why the documentation for it is presented so far in a very concise and concise form, and there are very few plug-ins and extensions (here is their small list on the official website).
Supported by warmth on GitHub Pages and Amazon S3.

Let's hope that in the future this tool will be further developed and become more convenient to use.

Pelican


Pelican is also written in Python. Compared to many static site generators, it has an exceptionally wide range of functions: work with drafts, integrate with social networks, add images, convert HTML pages to PDF, support multilingualism and much more. It is very well suited for blogging (there is a plugin for transferring blogs to Wordpress).

Posts can be written in Markdown, as well as in the formats reStructuredText and Asciidoc .

Installs Pelican through pip. During installation, the user will be asked a few questions: where to store the site files, what the site will be called to, where and how to deploy it. Many ways of deployment are supported: via FTP, via SSH, on Amazon S3, GitHub Pages, Dropbox and RackSpace Cloud Files.

Grow


Grow (see also the official repository on GitHub ) is a very interesting and promising tool that we discovered quite recently. It is written in Python. To install Grow, it is enough to download the script from the official site - all the necessary packages will be installed automatically.

Grow is based on the “configuration, not code” approach. What does it mean? To create a new project (in the Grow terminology, projects are called pods), you need to clone the theme that is a repository on GitHub to the local machine. The theme includes a set of configuration files with which the entire website architecture is described. There is no need to write any program code.

All project settings are stored in the configuration file podspec.yaml. It contains the following parameters:


How is content working done with Grow? All editable content (it can be presented both in Markdown format and in HTML) is stored in the / content directory. The page structure is described in configuration files in the YAML format (see the example here ). During the site build, Grow generates pages based on the specified settings.

Grow can automatically translate text fragments - this is done using the Goslate library , which works with Google Translate. To translate a website, simply execute the translate command.

As a platform for deployment, you can specify any web server. Supported deploy on Dropbox, Google Cloud Storage, Amazon S3, Dropbox, Google AppEngine.

Of course, within the framework of a brief overview, it is hardly possible to tell about all the features of working with Grow. We recommend to try - the tool is very promising.

Nanoblogger


This static site generator, which is focused on creating blogs, is notable for being written in bash. He uses the cat, grep, and sed command line utilities as basic tools for creating static HTML pages.

For all its simplicity, Nanoblogger, by its capabilities, is not inferior to many generators written in Python or Ruby. Among its useful features, you can highlight Atom / RSS support, the ability to create a calendar on the site, sort posts by category, create an archive of posts, and others.

Installing Nanoblogger is extremely simple: it is included in the official repositories of most popular Linux distributions and installed using the standard package manager.

With Nanoblogger it is convenient to work from the command line. All commands are described in detail in the documentation , their syntax is simple and straightforward.

The source code is also written very simply; if necessary, it can always be modified and tailored to the needs of a specific project (see, for example, a publication in which the author shares his own experience of configuring a blog based on Nanoblogger).

For nanoblogger, there are plugins and extensions. The official set of plugins (nanoblogger extras) is also included in the official repositories and installed in the standard way.

Unfortunately, in 2013, the work on the development and improvement of Nanoblogger was suspended for an indefinite period (see the information on the official website ).

Docpad


DocPad is written in CoffeeScript. To work with it, NodeJS must be installed on the client machine.

It is used by many for blogs, but the real possibilities of its use are much wider. This product does not represent a static site generator in its pure form: it can be used both as a generator, and as an engine, and as a template engine. DocPad is equipped with a fairly convenient API that allows you to use only those functions that are needed at the moment; the rest can always be implemented independently.

The undoubted advantage of DocPad is, of course, very detailed documentation. In addition, the official site published the so-called "skeletons" - blanks, based on which users can create their own sites.

For DocPad a lot of different plugins are written. Of the most interesting extensions, we point out WYSIWYG editors and web-based interfaces that facilitate the publication of posts on a static blog.

The official website published scripts that automate deploy to various sites: Heroku, Appfog, Windows Azure, Docker, GitHub Pages and others. There is also a specialized script for deploying to cloud storage - Amazon S3 and GoogleStorage.

Conclusion


The results of the review can be summarized in the following table:
GeneratorTongueLicenseInstallationSupportExtensionsDepla
Middleman
3.3.5
RubyMITRequires the latest version of Ruby, RubyGemsDetailed documentation is available, updates are released regularly.Many plugins and extensions, new ones regularly appearFTP, SFTP, rsync, Git, AWS, BitBalloon
Jekyll
2.3.0
RubyMITRequires the latest version of Ruby, RubyGems, RbenvDetailed documentation is available, updates are released regularly.Many plugins and extensionsGit, FTP. SFTP, rsync, Amazon S3, Heroku
Octopress
3.0
RubyMITRequires the latest version of Ruby, RubyGems, RbenvDetailed documentation is available, updates are released regularly.Many plugins and extensionsGitHub Pages, Heroku, FTP, SFTP, rsync
Hyde
0.8.8
PythonMITInstalled via pipMinimumVery few pluginsGitHub Pages, Amazon S3, SFTP
Pelican
3.4
PythonGNU GPLInstalled via pipDetailed documentation, actively developed and maintained.A large number of plugins for bloggingFTP, SSH, Dropbox, Amazon S3, Rackspace Cloudfiles
Grow sdk
0.0.31
PythonMITInstalled through the scriptDetailed documentation with videosNo plugins. Additional themes and templates are available.Dropbox, Google Cloud Storage, Amazon S3, Google AppEngine
Nanoblogger
3.5
BashGNU GPLInstalled via package managerDevelopment and support suspendedFew extensionsrsync, ftp
Docpad
6.69
CoffeeScriptMITInstallation requires NodeJS and NPMDetailed documentation is available, updates are released regularly.Many different extensions and pluginsHeroku, Appfog, Windows Azure, Docker, GitHub Pages
All of these generators are interesting and unique, but the most interesting project to date has seemed to us the Grow SDK.

For those who want to delve into the topic of a couple of useful links:



What experience of using static site generators do you have, Habrayuzer?

If you can not post comments here - welcome to our blog .

Source: https://habr.com/ru/post/236441/


All Articles