Opinionated static site generator.
npx --package=dante -- create-dante-site my-site cd my-site npm install dante dev
Creating pages and files
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
Adding commands to dante
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.
Contributing to dante
- Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
- Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
- Fork the project.
- Start a feature/bugfix branch.
- Commit and push until you are happy with your contribution.
- Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
Copyright (C) 2022 and above Shogun (email@example.com).
Licensed under the ISC license, which can be found at https://choosealicense.com/licenses/isc.