Dart Gh-Pages Generator

This project allows to create/update the gh-pages branch based on examples, dartdoc, docs, web and/or custom files.

Basically a new commit is done in the gh-pages branch with updated files generated. Then you only need to push this branch on github.

Usage

  1. Add a dev_dependency in your pubspec.yaml to ghpages_generator.
  2. Create a Dart script to define how is built you ghpages.

create dartdoc

Here's how is generated gh-pages for this package :

import 'package:ghpages_generator/ghpages_generator.dart' as gh;

main() {
  new gh.Generator()
      ..setDartDoc(['lib/ghpages_generator.dart'], includeSdk: false,
          excludedLibs: ['path'], startPage: 'ghpages_generator')
      ..generate(doCustomTask: gh.moveDartDocAtRoot);
}

publish web build

If you simply want to update the gh-pages with the result of pub build web you can run the following program :

import 'package:ghpages_generator/ghpages_generator.dart' as gh;

main() {
  gh.updateWithWebOnly();
}

Actions

Here's the available actions :

  • generate the dartdoc with setDartDoc
  • compile and deploy the examples with setExamples
  • add the docs directory with withDocs
  • add static files with templateDir : all files in the template directory are pasted to the gh-pages branch

License

Apache 2.0

Libraries

ghpages_generator