This documentation website is built using Docusaurus, a modern static website generator. It provides comprehensive documentation, guidelines, and resources for the Equinor Design System.
Before you begin, ensure you have the following installed:
- Node.js -- Version 16.15 or compatible
- pnpm -- Version 10.15.0 or higher (install globally with
npm install -g pnpm)
This documentation site is part of the EDS monorepo. All commands should be run from the root directory of the monorepo, not from this directory.
If you haven't already, start by setting up the monorepo:
- First navigate to the root directory
- Then install dependencies and build packages by running
pnpm run init
Run these commands from the root directory of the monorepo:
pnpm docu:startThis command starts a local development server at http://localhost:3000 and opens your browser. Most changes are reflected live without needing to restart the server.
pnpm docu:buildThis command extracts prerequisites and generates static content into the build directory. You can serve this content using any static hosting service.
pnpm docu:serveUse this command to preview the production build locally before deploying.
pnpm docu:clearIf you encounter issues, clear the Docusaurus cache with this command.
pnpm docu:prerequisitesThis command extracts prerequisite information from package files. It runs automatically during the build process.
pnpm lint:docsRun ESLint to check for code quality issues in the documentation site.
The documentation site includes:
- docs/ -- Documentation content in Markdown and MDX format
- src/ -- Custom React components and pages
- static/ -- Static assets like images and files
- docusaurus.config.ts -- Docusaurus configuration
When adding or updating documentation:
- Create or edit Markdown/MDX files in the
docs/directory - Use clear headings and structure for easy navigation
- Test your changes locally with
pnpm docu:start - Ensure all links work correctly
When creating content for the documentation site, choose the appropriate tone guide:
- Friendly Professional -- Default for most documentation
- Friendly Minimalist Blend -- Concise but approachable
- Minimalist -- Essential information only
The documentation site uses:
- Docusaurus -- Static site generator
- React -- UI framework
- TypeScript -- Type-safe JavaScript
- MDX -- Markdown with React components
- EDS Tokens & Components -- Equinor Design System packages
If port 3000 is already in use, either stop the conflicting process or Docusaurus will automatically use the next available port.
Try clearing the cache, rebuilding and then restarting:
pnpm docu:clear
pnpm docu:build
pnpm docu:startEnsure all dependencies are installed by running from the root:
pnpm installWhen contributing to the documentation:
- Follow the contribution guidelines
- Use the appropriate tone guide for your content
- Test locally before submitting a pull request
- Ensure all links and images work correctly
- Check the main project README for more information about the monorepo
- Visit the Docusaurus documentation for site-specific questions
- Join the conversation on Slack: #eds-design-system