A static site generator for blogs, written in Dart.

License: BSD-3-Clause

Language: Dart

Build Status

A static site generator for blogs, written in Dart.


  • Markdown and Mustache templating
  • Support for tags and a tag index page.
  • Compatibility with dart2js
  • Compatibility with other Dart transformers (e.g. Polymer, SASS)
  • Support for including a tag list in any page
  • Base URL configuration (similar to how it works in Jekyll)
  • Site, post, and template generation tool
  • Support for configuring post metadata in a separate YAML file
  • Support for sitemap.xml and rss/atom
  • Support for multiple languages
  • Support for archived posts


See the examples folder.

Getting Started

Start with a normal dart project with the following structure:


and in your pubspec:

name: my_awesome_blog
  browser: any
  tavern: any
- tavern

In, add some metadata and markdown:

title: Hello World!
category: Random
tags: ['code', 'dart']
template: index


the templates/index.html will be associated your page. Templates use Mustache bindings and can use any metadata specified in the markdown file. For example:

    <link rel="stylesheet" href="/style.css">
<div class="content">
    <div id="content">

Running and Building

Tavern uses Pub; simply use pub serve and pub build to test and deploy your blog.


Tavern supports tagging articles and viewing articles associated with that tag:

For an index of tags, add a tag_index.html template and use the tags metadata in your template:

        <li><a href="{{url}}">{{name}}</a></li>

For "tag pages" (To list all pages associated with a tag) add a tag_page.html template and use the posts metadata:

        <li><a href="{{url}}">{{name}}</a></li>

Other Transformers (e.g. Polymer)

Tavern leverages Dart's asset transformer, and can be used with other transformers. It is recommended that other transformers be run after Tavern:

- tavern
- polymer:
      - web/index.html

Relative Paths / baseurl

Tavern desn't yet have support for configuring and updating the base url. For now it is recommended to use relative and absolute paths:

<a href="/tags/index.html"</a>
<a href="../../styles.css"</a>

Any templates that should assume they are at their final position when referencing CSS, Dart, JS. For example, web/templates/index.html should assume it has been already moved to the location of the markdown file using it (e.g. web/

Project Statistics

Sourcerank 4
Repository Size 60.5 KB
Stars 17
Forks 3
Watchers 2
Open issues 8
Dependencies 16
Contributors 3
Tags 4
Last updated
Last pushed

Top Contributors See all

John Ryan István Soós Robert Åkerblom-Andersson

Recent Tags See all

2.0.2 January 05, 2017
2.0.1 January 04, 2017
2.0.0 January 01, 2017
1.0.2 October 25, 2016

Something wrong with this page? Make a suggestion

Last synced: 2019-01-09 20:19:29 UTC

Login to resync this repository