aarshi documentation

aarshi creates a multilingual Next.js website for you, then helps you keep it in order.

What is aarshi?

A Next.js website is many files: pages, texts in several languages, components, a sitemap for search engines. aarshi writes the starting files and gives you short commands to add pages, sections, languages and icons, without copying files by hand.

You do not need to know Next.js to start. The other pages of this documentation are listed in the sidebar:

The aarshi.toml file
What the settings file of a project contains, and which values you can change.
Commands
Every command, with aarshi add explained step by step.
Example workflow
A tutorial that builds a page from start to finish, using almost every command.
Checking a project
aarshi status: what it reports, its exit codes and its options.
Troubleshooting
The messages you are most likely to meet, and what to do about them.

Before you start

Install aarshi

aarshi is written in Rust and is not published yet. For now, build it from the repository:

cargo install --path .

Then check that it answers:

aarshi --version

Create your first site

  1. Run aarshi setup my-site. aarshi asks about the languages, the default language, the site URL, the package manager, the UI components and the icons. Press Enter to keep the suggested answer.
  2. Go into the folder: cd my-site.
  3. Start the development server with your package manager, for example npm run dev.
  4. Open http://localhost:3000 in your browser. The site redirects you to its default language.
Tip. Add --yes to accept every default without answering questions: aarshi setup my-site --yes. The folder name is still required.

The words you will meet

Language and prefix
Each language of the site has a prefix in the address: /fr for French, /en for English. The default language is the one served at /.
Dictionary
A file that holds every text of the site in one language, for example lib/i18n/dictionaries/fr.ts. Every language has one, with the same keys, so a missing translation shows up.
View
What a page shows, written in views/<page>/. A view is assembled from sections.
Section
One block of a page, such as a hero, a list of projects or a footer. Each section is one file in views/<page>/sections/.
Route
The file that makes a page reachable at an address, for example app/[locale]/about/page.tsx for /about. A route displays a view.
Component
A reusable piece of interface, such as a button. Your own components go in components/custom/, converted icons in components/icons/.