Opinionated static site generator.
npx --package=dante -- create-dante-site my-site cd my-site npm install dante dev
Simply create all file needed in the
build function in
src/build/index.ts. You can use any framework you want, the predefined one is React.
We strongly recommend to use the
createFile function exported from
dante to create file as it will take care of replacing
$hash in the file name with the actual file hash.
Also, in order to correctly apply production optimizations, call and await the provided
after callback after done building your site.
src/build/index.ts must export the following members:
build: A function that creates all website files.
createStylesheet: A function that converts a list of CSS classes in CSS code. Inside use of
createStylesheetfunction exported from
safelist: A list of CSS classes that you always to be present in any page and that will not be compressed.
Once you have done editing, you should execute
dante build. The website will be exported in the
This package only supports to be directly imported in a ESM context.
For informations on how to use it in a CommonJS context, please check this page.
Copyright (C) 2022 and above Shogun (firstname.lastname@example.org).
Licensed under the ISC license, which can be found at https://choosealicense.com/licenses/isc.