tavern 3.2.1+1

  • Readme
  • Changelog
  • Installing
  • 51

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 Oct 11, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21


Detected platforms: other

Primary library: package:tavern/tavern.dart with components: io, build, mirrors.

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.

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.

Format lib/src/mustache.dart.

Run dartfmt to format lib/src/mustache.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.

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.0
glob ^1.1.0 1.1.7
markdown ^2.0.0 2.1.1
mustache ^1.0.0 1.1.1
path ^1.6.0 1.6.4
yaml ^2.1.0 2.2.0
Transitive dependencies
analyzer 0.38.5
args 1.5.2
async 2.4.0
charcode 1.1.2
collection 1.14.12
convert 2.1.1
crypto 2.1.3
csslib 0.16.1
front_end 0.1.27
html 0.14.0+3
kernel 0.3.27
logging 0.11.3+2
meta 1.1.7
package_config 1.1.0
pub_semver 1.4.2
source_span 1.5.5
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
watcher 0.9.7+12
Dev dependencies
pedantic ^1.0.0 1.8.0+1
test ^1.0.0