The CLI version of JSONsite.
npm i jsonsite -g
As of 1.2.0, The jsonsite package has been split into two commands: jsonsite-gen and jsonsite-local.
jsonsite-gen will give you a sample JSON site for you. Example:
Really, thats it, just answer the prompts. Configure your JSON file after the prompts are done and then host the output file on something like GitHub Gists, then look at CONTRIBUTING.md on how to add the JSON to the registry
jsonsite-local will generate the HTML file locally, but it does not come with stuff like the service workers, caching, etc.
jsonsite-local -i site.json -o output.html -t default.njk
-iflag the input JSON file. It is not a URL, rather a local file, unlike the regular version which uses a URL. Defaults to
-oflag is the output HTML file. JSONsite will save your SPA to the specified file. Defults to
-tflag is the template file. If the template file specified is
default.njk, then it will get the template from
http://jsonsite.github.io/templates/default.njk. You can submit a template here.
If you want to view this anytime, you can run