Getting started
Use this guide to clone the 3di Docusaurus template, run it locally, and start editing content.
Prerequisites
To use the 3di Docusaurus template, you need the following elements:
- Git
- A text editor with terminal, like VS Code
- Access to the GitLab project: 3di/templates/docusaurus-template
- Node.js 20 or above (this template’s
enginesfield requires it)- When installing Node.js, enable the options that add it to your
PATH
- When installing Node.js, enable the options that add it to your
Clone the template
Clone the repository to your PC, following the 3di procedure.
Install dependencies
In the terminal, from the repository root (the folder that contains package.json):
npm install
This installs Docusaurus and the other packages listed in package.json (including local search and icons used on the home page).
Start the site locally
npm start
That runs the Docusaurus development server. When it’s ready, http://localhost:3000/ opens in your browser.
Most edits under docs/, src/, and static/ reload automatically. Config changes (for example docusaurus.config.js) usually need a restart of npm start.
Where to edit
| What you want to change | Where to look |
|---|---|
| Doc pages | docs/ — create .mdx files by default (this page is docs/template-description/getting-started.mdx) |
| Home page tiles and quick links | src/components/HomepageFeatures/ |
| Site title, navbar, theme | docusaurus.config.js |
| Brand colours | src/css/custom.css |
| Images and icons in content | static/img/ |
| Sidebar structure | sidebars.js |
For how to structure topic body text (procedures, callouts, code, graphics), start with Basic text elements.
Check a production build
Before you push, optionally confirm the site builds cleanly (same check GitLab CI runs):
npm run build
Broken links fail the build (onBrokenLinks: 'throw'). Fix them before merging.
Next steps
- Edit this page (
docs/template-description/getting-started.mdx), save, and watch the browser update. - Add new docs as
.mdxunderdocs/and register them insidebars.js. See Creating topics and Sidebar and table of contents. - Update home page tiles in
HomepageFeaturesso they point at your real entry topics. - Set
url(and related fields) indocusaurus.config.jsfor your deployed site.