tavern 3.0.0 copy "tavern: ^3.0.0" to clipboard
tavern: ^3.0.0 copied to clipboard

outdated

A static site generator for blogs with Dart support

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: any
  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
4
likes
0
pub points
50%
popularity

Publisher

verified publisherjpryan.me

A static site generator for blogs with Dart support

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

build, glob, markdown, mustache, path, yaml

More

Packages that depend on tavern