Yuki Kimoto


Giblog - Blog builder for git generation


Giblog is Blog builder written by Perl language.

You can create your onw website and blog easily.

All created files is static HTML, so you can manage them using git.

Giblog is in beta test before 1.0 release. Note that features is changed without warnings.


  # New empty web site
  giblog new mysite

  # New web site
  giblog new_website mysite

  # New blog
  giblog new_blog mysite
  # Change directory
  cd mysite
  # Add new entry
  giblog add

  # Build web site
  giblog build
  # Serve web site(need Mojolicious)
  morbo serve.pl

  # Add new entry with home directory
  giblog add --home /home/kimoto/mysite
  # Build web site with home directory
  giblog build --home /home/kimoto/mysite


Giblog have the following features.

  • Build both website and blog.

  • Linux, Mac OS, Windows Support. (In Windows, recommend installation of msys2)

  • Default CSS for smart phone site

  • Content is wrapped by top section, bottom section, header, footer, HTML head, and side var.

  • Add p tag automatically. Escape <, > automatically in pre tag

  • Set title tag automatically from text of first h1-h6 tag.

  • Set meta description tag automatically from text of first p tag.

  • You can use above all features or choice some of them, and can add more advanced features.

  • In advanced features, you can customize list of entries page, use markdown syntax, and add twitter card, etc.

  • Build 645 pages by 0.78 seconds in my starndard linux environment.

  • Use JavaScript. Display the ad

  • You can manage files by git easily, and deploy them to rental server.

  • If you use Github Pages, you can create https web site for free.

  • Giblog is used to build Perl Zemi web site.


Create web site

You can create web site from 3 prototype.

1. Empty website

"new" command create empty website. "mysite" is a exapmle name of your web site.

  giblog new mysite

If you want to create empty site, choice this prototype.

Templates and CSS is empty and provide minimal build process.

2. Website

"new_website" command create empty website.

  giblog new_website mysite

If you want to create simple website, choice this prototype.

Template of top page "templates/index.html" is created. CSS is designed to match smart phone site and provide basic build process.

3. Blog

"new_blog" command create empty website.

  giblog new_blog mysite

If you want to create blog, choice this prototype.

Have page "templates/index.html" which show 7 days entry.

Have page "templates/list.html" which show all page links.

CSS is designed to match smart phone site and provide basic build process.

Add entry page

"add" command add blog entry page.

  giblog add

You need to change directory to "mysite" before run "add" command.

  cd mysite

If you use "--home" option, you don't need to change directory

  giblog add --home /home/kimoto/mysite

Created file name is, for example,


This file name contains current date and time.

Build web site

"build" command build web site.

  giblog build

You need to change directory to "mysite" before run "build" command.

  cd mysite

If you use "--home" option, you don't need to change directory.

  giblog build --home /home/kimoto/mysite

What is build process?

Build process is writen in "run" method of "lib/Giblog/Command/build.pm".

Main part of build process is combination of Giblog::API.

  # "lib/Giblog/Command/build.pm" in web site created by "new_blog" command
  package Giblog::Command::build;

  use base 'Giblog::Command';

  use strict;
  use warnings;

  use File::Basename 'basename';

  sub run {
    my ($self, @args) = @_;
    # API
    my $api = $self->api;
    # Read config
    my $config = $api->read_config;
    # Copy static files to public

    # Get files in templates directory
    my $files = $api->get_templates_files;
    for my $file (@$files) {
      # Data
      my $data = {file => $file};
      # Get content from file in templates directory

      # Parse Giblog syntax

      # Parse title

      # Add page link
      $api->add_page_link_to_first_h_tag($data, {root => 'index.html'});

      # Parse description

      # Read common templates
      # Add meta title

      # Add meta description

      # Build entry html
      # Build whole html
      # Write to public file
    # Create index page
    # Create list page

"run" method read all template files in "templates" directory, and edit them, and wrtie output to file in "public" directory.

You can edit this build process by yourself if you need.

If you need to understand APIs in run method, see Giblog::API.

Serve web site

If you have Mojolicious, you can build and serve web site.

   morbo serve.pl

You see the following message.

   Server available at
   Server start

If files in "templates" directory is updated, web site is build and this server is reloaded automatically.


These methods is internally methods.

Don't need to know these methods except for Giblog developer.

See Giblog::API to manipulate HTML contents.


  my $api = Giblog->new(%params);

Create Giblog object.


  • home_dir - home directory

  • config - config



Run command system.


  my $config = $giblog->config;

Get Giblog config.


  my $home_dir = $giblog->home_dir;

Get home directory.


Yuki Kimoto, <kimoto.yuki at gmail.com>


Copyright 2018 Yuki Kimoto.

This program is free software; you can redistribute it and/or modify it under the terms of the the Artistic License (2.0). You may obtain a copy of the full license at:


1 POD Error

The following errors were encountered while parsing the POD:

Around line 158:

Unknown directive: =imte