tavern 3.2.1+1

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 64

A static site generator for blogs with Dart support

Getting Started #

Start with an empty project and add the following files:

web/
  index.md
  templates/
    _index.mustache
pubspec.yaml

Add tavern as a dependency in pubspec.yaml:

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

Edit index.md:


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

foo

Edit web/templates/_index.mustache:

<html>
<head>
    <link rel="stylesheet" href="/style.css">
</head>
<body>
<div class="content">
    <h1>{{title}}</h1>
    <div id="content">
        {{{content}}}
    </div>
</div>
</body>
</html>

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:


dependencies:
  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';
  
Version Uploaded Documentation Archive
3.2.1+1 Feb 5, 2019 Go to the documentation of tavern 3.2.1+1 Download tavern 3.2.1+1 archive
3.2.1 Jan 9, 2019 Go to the documentation of tavern 3.2.1 Download tavern 3.2.1 archive
3.2.0 Jan 9, 2019 Go to the documentation of tavern 3.2.0 Download tavern 3.2.0 archive
3.1.0 Jan 9, 2019 Go to the documentation of tavern 3.1.0 Download tavern 3.1.0 archive
3.0.0 Jan 9, 2019 Go to the documentation of tavern 3.0.0 Download tavern 3.0.0 archive
2.0.2 Jan 5, 2017 Go to the documentation of tavern 2.0.2 Download tavern 2.0.2 archive
2.0.1 Jan 4, 2017 Go to the documentation of tavern 2.0.1 Download tavern 2.0.1 archive
2.0.0 Jan 1, 2017 Go to the documentation of tavern 2.0.0 Download tavern 2.0.0 archive
1.0.2 Oct 25, 2016 Go to the documentation of tavern 1.0.2 Download tavern 1.0.2 archive
1.0.1 Sep 15, 2016 Go to the documentation of tavern 1.0.1 Download tavern 1.0.1 archive

All 11 versions...

Popularity:
Describes how popular the package is relative to other packages. [more]
32
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
91
Overall:
Weighted score of the above. [more]
64
Learn more about scoring.

We analyzed this package on Apr 17, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.2.0
  • pana: 0.12.14

Platforms

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.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
build ^1.0.0 1.1.3
glob ^1.1.0 1.1.7
markdown ^2.0.0 2.0.3
mustache ^1.0.0 1.1.1
path ^1.6.0 1.6.2
yaml ^2.1.0 2.1.15
Transitive dependencies
analyzer 0.36.0
args 1.5.1
async 2.2.0
charcode 1.1.2
collection 1.14.11
convert 2.1.1
crypto 2.0.6
front_end 0.1.15
kernel 0.3.15
logging 0.11.3+2
meta 1.1.7
package_config 1.0.5
pub_semver 1.4.2
source_span 1.5.5
string_scanner 1.0.4
term_glyph 1.1.0
typed_data 1.1.6
watcher 0.9.7+10
Dev dependencies
pedantic ^1.0.0
test ^1.0.0