tavern

Creator: coderz1093

Last updated:

0 purchases

TODO
Add to Cart

Description:

tavern

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
copied to clipboard
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
copied to clipboard
Edit index.md:

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

foo

copied to clipboard
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>
copied to clipboard
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
copied to clipboard
Run build_runner:
pub run build_runner serve
copied to clipboard
Releasing #
To build the static files for deployment, use the build command with the
--release flag:
pub run build_runner build --release --output build
copied to clipboard
Dart 1 #
See https://github.com/johnpryan/tavern-dart1 for the old Dart 1 compatible
version of this project

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.