The generator converts the meta-templates into mustache templates for all the sites you have declared, allowing you to maintain a single code base for all your sites..
To use the generator, the first thing you need to have is the folder structure expected by the generator.
You can see the usage of the command passing the help flag:
$ api2html generate -h
Generate the final api2html templates.
Usage:
api2html generate [flags]
Aliases:
generate, create, new
Examples:
api2html generate -i en_US -r partial
Flags:
-h, --help help for generate
-i, --iso string (comma-separated) iso code of the site to create (default "*")
-p, --path string Base path for the generation (default "/Users/artomb/git/go/src/github.com/devopsfaith/api2html")
-r, --reg string regex filtering the sources to move to the output folder (default "ignore")
To generate the output
directory with all the generated templates, you need to pass the ISO code of the site you want to create. If you want to generate them all at once, use the wildcard *
-
api2html generate --iso *
Now check the output
folder.
Continue to Mustache templates →
← Back to Generating multiple sites