Norite is an experimental static website builder. It transforms a directory of content and it's structure into a static website, using templates written in plain javascript or JSX.
- Website layout and URLs are generated directly from the structure of the content directory.
- All markdown (
.md
),index.md
andindex.json
files are processed as content and generate HTML; all other files are treated as assets. - Templates are written as plain Javascript/Typescript functions or JSX/TSX components with no special syntax. They execute at build time and can use any custom logic to generate HTML, use npm libraries, fetch data from databases/CMS/APIs etc.
css
,js
andts
files imported and included in a template are automatically processed, transpiled and bundled.- Markdown is parsed by unified.js ecosystem with support for custom remark/rehype plugins. Default plugins include - smartypants, github flavored markdown and syntax highlighting with prismjs.
- CSS supports PostCSS and it's plugins like autoprefixer, preset-env, tailwind etc.
- Support for Custom non-html files (eg.
rss.xml
,sitemap.xml
,data.txt
etc.) via[filename.ext].json
files that use the same template system. - Development server with auto-reload support.
Note: norite is in experimental beta state currently.
Install from npm:
npm install --save-dev norite
Create a config file named norite.config.js
to define the project's root directory and optionally modify norite's behavior. It can be left empty if no custom config is needed.
echo 'export default {}' > norite.config.js
Norite supports the following commands:
norite dev
: start the dev server. It will watch the content and template directories for changes and auto-reload.norite build
: generate the static website for production.
Use norite --help
for details on more CLI options.
Norite includes type definitions, for JSX runtime support add the following in your tsconfig.json
:
Refer to the quick start section in the documentation.
Documentation for norite is here: documentation
MIT License: Copyright (c) Arsh
License.txt