Erudit is a CMS for perfect community-driven educational sites:
- Content is written in JSX/TSX using custom DSL tags like
<P>,<Problem>,<Flex>and many more provided by@erudit-js/prosepackage and powered bytsprose. - Type-safe cross-references with automatic generation of tables of contents, search indexes, and content dependencies.
- Full TypeScript power: variables, functions, type-safe tag props, and more.
- Nuxt-powered fully static (no server required) site with adaptive design (looks good on both mobile and desktop).
Create empty folder, install erudit package and run preparation script:
npm install erudit
npx erudit prepareFor a smoother writing experience, I suggest building the project first:
npx erudit buildThis command needs to be run only once!
Run it again if you change erudit.config.ts or after updating the Erudit package.
That’s it!
Start writing content in the content folder.
You can further customize the project by editing erudit.config.ts.
To preview your content changes live, run:
npx erudit launchThis starts a local web server with a live preview of your content at http://localhost:3000.
To generate and preview a fully static site, run:
npx erudit generate
npx erudit previewpackages/core— Erudit types, schemas, toolspackages/cli— CLI for running, building and previewing Erudit projectspackages/prose— custom JSX DSL with collection of default and pluggable elementspackages/erudit— Erudit Nuxt Layer (watches content, builds it and serves site)
- Fork
erudit-js/eruditrepository to your GitHub account and then clone it to your local device - Install Bun if you don't have it already
- Run
bun installto install dependencies - Run
bun buildto build all packages (core,cli,prose, excepteruditas it is a Nuxt Layer)
Now the project is ready for your edits.
Try out your changes using the playground Erudit project in the playground directory.
Commands to control the playground Erudit project (run from the repository root):
bun play
bun play:prepare
bun play:build
bun play:launch
bun play:generate
bun play:preview