tavern 3.2.1+1

A static site generator for blogs with Dart support

Getting Started #

Start with an empty project and add the following files:


Add tavern as a dependency in pubspec.yaml:

name: my_awesome_blog
  tavern: ^3.0.0
  build: any
  build_runner: any
  build_web_compilers: any

Edit index.md:

title: Hello World!
category: Random
tags: ['code', 'dart']
template: web/templates/_index.mustache


Edit web/templates/_index.mustache:

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

The web/templates/_index.mustache file is the mustache template that will be applied to this page. Templates can use any metadata specified in the markdown file. For example:

Developing #

Fetch the projects dependencies:

pub get

Run build_runner:

pub run build_runner serve

Releasing #

To build the static files for deployment, use the build command with the --release flag:

pub run build_runner build --release --output build

Dart 1 #

See https://github.com/johnpryan/tavern-dart1 for the old Dart 1 compatible version of this project

1.0.0 #

  • Initial version, created by Stagehand

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  tavern: ^3.2.1+1

2. Install it

You can install packages from the command line:

with pub:

$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:tavern/tavern.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Feb 13, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.5

Health issues and suggestions

Document public APIs. (-1 points)

6 out of 6 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Fix lib/src/mustache.dart. (-1.49 points)

Analysis of lib/src/mustache.dart reported 3 hints:

line 21 col 20: Unnecessary new keyword.

line 24 col 27: Unnecessary new keyword.

line 38 col 27: Unnecessary new keyword.

Fix lib/src/metadata.dart. (-1 points)

Analysis of lib/src/metadata.dart reported 2 hints:

line 65 col 18: Unnecessary new keyword.

line 69 col 10: Unnecessary new keyword.

Fix lib/src/partial.dart. (-1 points)

Analysis of lib/src/partial.dart reported 2 hints:

line 7 col 29: Unnecessary new keyword.

line 21 col 34: Unnecessary new keyword.

Format lib/src/cleanup.dart.

Run dartfmt to format lib/src/cleanup.dart.

Format lib/src/extensions.dart.

Run dartfmt to format lib/src/extensions.dart.

Maintenance suggestions

The package description is too short. (-9 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Package is getting outdated. (-1.92 points)

The package was last published 53 weeks ago.

Maintain an example.

None of the files in the package's example/ directory matches known example patterns.

Common filename patterns include main.dart, example.dart, and tavern.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
build ^1.0.0 1.2.2
glob ^1.1.0 1.2.0
markdown ^2.0.0 2.1.3
mustache ^1.0.0 1.1.1
path ^1.6.0 1.6.4
yaml ^2.1.0 2.2.0
Transitive dependencies
_fe_analyzer_shared 1.0.3
analyzer 0.39.4
args 1.5.2
async 2.4.0
charcode 1.1.3
collection 1.14.12
convert 2.1.1
crypto 2.1.4
csslib 0.16.1
html 0.14.0+3
js 0.6.1+1
logging 0.11.4
meta 1.1.8
node_interop 1.0.3
node_io 1.0.1+2
package_config 1.1.0 2.0.0
pub_semver 1.4.3
source_span 1.6.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
watcher 0.9.7+13
Dev dependencies
pedantic ^1.0.0 1.9.0
test ^1.0.0