websitegenerator is a library that lets you generate static HTML and CSS files using Nim code.
See here for in-depth code documentation.
Generating static sites is the primary focus of websitegenerator, especially if you have repetitive layouts with only the inserted data changing across them.
You can use procs to template a HTML page or element and respond to HTTP requests with an HTTP-server. For example TheDictionary, my attempt at an urban-dictionary webserver clone, uses websitegenerator to send back data with very little client-side javascript.
Some basic examples are located in the examples directory, so you can quickly know, if you want to use this or not.
List of projects/sites using websitegenerator:
- my homepage (source)
- HzgShowAround (source)
- TheDictionary (source)
If you use this software to create a project/website: feel free to create a PR with the edited
README.md
or message me somewhere, so you project can be included here.
nimble install websitegenerator
This projects codebase is distributed under the GPL-3.0 licence. However you may use any output from your project (generated HTML and CSS files) according to the MIT licence - basically without any limitations on source distribution.