Second stage - Running your Docusaurus Code on your Local Machine
Second stage: Running your Docusaurus Code on your Local Machine
You need to install the following: Node, npm or yarn.
Once installed. Open your CLI (Command prompt for Windows and Terminal for Mac).
Go to the directory folder where you have saved the file.
Then type
yarn install
for yarn ornpm install
for npm to download all the dependencies needed in the project. You'll see a newnode_module
folder created in code folder.Now, type
yarn start
ornpm start
to 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 thetitle
in the code located at thedocusaurus.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.To end it, do CTRL-C in the terminal.
Woot! Second Stage Unlocked! 🥳