intro.mdx 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. ---
  2. sidebar_position: 1
  3. ---
  4. # Tutorial Intro
  5. Let's discover **Docusaurus in less than 5 minutes**.
  6. ## Getting Started
  7. Get started by **creating a new site**.
  8. Or **try Docusaurus immediately** with **[docusaurus.new](https://docusaurus.new)**.
  9. ### What you'll need
  10. - [Node.js](https://nodejs.org/en/download/) version 20.0 or above:
  11. - When installing Node.js, you are recommended to check all checkboxes related to dependencies.
  12. ## Generate a new site
  13. Generate a new Docusaurus site using the **classic template**.
  14. The classic template will automatically be added to your project after you run the command:
  15. ```bash
  16. npm init docusaurus@latest my-website classic
  17. ```
  18. You can type this command into Command Prompt, Powershell, Terminal, or any other integrated terminal of your code editor.
  19. The command also installs all necessary dependencies you need to run Docusaurus.
  20. ## Start your site
  21. Run the development server:
  22. ```bash
  23. cd my-website
  24. npm run start
  25. ```
  26. The `cd` command changes the directory you're working with. In order to work with your newly created Docusaurus site, you'll need to navigate the terminal there.
  27. The `npm run start` command builds your website locally and serves it through a development server, ready for you to view at http://localhost:3000/.
  28. Open `docs/intro.md` (this page) and edit some lines: the site **reloads automatically** and displays your changes.