JSPM

norite

0.2.1
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • 0
    • Score
      100M100P100Q1162F
    • License MIT

    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.

    Package Exports

    • norite
    • norite/jsx-runtime
    • norite/jsx-runtime-dev

    Readme

    Norite

    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.

    Features

    • Website layout and URLs are generated directly from the structure of the content directory.
    • All markdown (.md), index.md and index.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 and ts 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.

    Install

    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.

    Optional Typescript Support

    Norite includes type definitions, for JSX runtime support add the following in your tsconfig.json:

    {
      "compilerOptions": {
        /* ... other options */
        "jsx": "react-jsx",
        "jsxImportSource": "norite",
      },
    }

    Quick Start

    Refer to the quick start section in the documentation.

    Documentation

    Documentation for norite is here: documentation

    License

    MIT License: Copyright (c) Arsh
    License.txt