Introduction

Quick introduction to the project.

About the project

Stellar is documentation theme for Astro.js.

The main purpose of this project is to give framework and library creators and maintainers a docs template they can use so they can focus more on writing the docs (markdown files), rather than setting up the whole docs project.

Features

  • Astro v4
  • Dark mode
  • I18n (type safe)
  • MD & MDX support
  • Search powered by fuse.js
  • Tailwind styling
  • View transitions API
  • Responsive & SEO-friendly
  • Shiki code syntax styling
  • Custom import path

Project structure

├── public
├── src
│ ├── components
│ ├── i18n
│ │ ├── sidebar.ts
│ │ ├── ui.ts
│ ├── layouts
│ ├── pages
│ ├── styling
│ ├── config.ts
│ ├── types.ts
├── .eslintrc.cjs
├── .prettierignore
├── .prettierrc.cjs
├── astro.config.mjs
├── tailwind.config.mjs
├── tsconfig.json
  • public/ - Static assets that will not be processed by Astro

  • components/ - All components used in project
  • i18n/sidebar.ts - Inside this file is defined SIDEBAR object which is used for displaying sidebar links inside src/components/sidebar/SidebarLinks.astro

  • i18n/ui.ts - Used for defining all languages which docs should be translated to, and translations for ui

  • layouts/ - All layouts used in project
  • pages/ - Inside pages you should have index.astro (landing page for DEFAULT_LANGUAGE in config.ts) and lang.astro for every other language defined in LANGUAGES inside src/i18n/ui.ts

    Inside pages you will also place your markdown files inside each lang folder.

  • styling/ - Used for defining external stylesheets
  • config.ts - Used for configuring the whole project
  • types.ts - Used for defining commonly used types
  • .eslintrc.cjs - Eslint config file
  • .prettierignore - In this file enter all directoriums or files you don’t wanna get linted and formatted by default
  • .prettierrc.cjs - Prettier config file
  • astro.config.mjs - Astro config file
  • tailwind.config.mjs - Tailwind config file
  • tsconfig.json - Typescript config file

Commands

CommandAction
npm installInstalls dependencies
npm run devStarts local dev server at localhost:4321
npm run buildBuild your production site to ./dist/
npm run formatFormats the whole project
npm run lintLints the whole project
npm run typecheckChecks is there any type errors
npm run previewPreview your build locally, before deploying
npm run astro ...Run CLI commands like astro add, astro check
npm run astro -- --helpGet help using the Astro CLI
Edit this page