Second stage - Running your Docusaurus Code on your Local Machine

Second stage: Running your Docusaurus Code on your Local Machine

  1. You need to install the following: Node, npm or yarn.

  2. Once installed. Open your CLI (Command prompt for Windows and Terminal for Mac).

  3. Go to the directory folder where you have saved the file.

  4. Then type yarn install for yarn or npm installfor npm to download all the dependencies needed in the project. You'll see a new node_modulefolder created in code folder.

  5. Now, type yarn start or npm startto run it on your local machine. It will advise you to open your browser and do localhost:3000. There you can see it now on your local machine. If you do any changes on your code and save it, it automatically reflects on the localhost. Try changing the title in the code located at the docusaurus.config.js and check the localhost in your browser. It should be updated, but the code in the url is not updated. You need to commit your changes to git, just like what we did it the first stage. Try doing it again.

  6. To end it, do CTRL-C in the terminal.

Woot! Second Stage Unlocked! 🥳