Website Setup
First setup a project folder for the website by installing a Docusaurus template (as recommended by the fast track):
Use your own website/project name wherever you see YOUR_SITE_NAME
(for
example: site-on-aws
)
npx create-docusaurus@latest --typescript YOUR_SITE_NAME classic
Once that's done, run the site locally:
cd YOUR_SITE_NAME
npm run start
If you're new to Docusaurus, go through the tutorial on the local site to learn basic usage.
Creating the first version of the website
As you can see from the Docusaurus tutorial running on your computer, the template project is intended to teach people how to use Docusaurus. Most of that should be deleted to prepare for building a new website with it.
Here are the main things to clean up (keep the blog if you want it):
- remove Community and Docusaurus Github links from
docusaurus.config.ts
- remove
editUrl
indocusaurus.config.ts
- delete
src/markdown-page.md
- delete the blog (optional):
- delete the
blog
folder - set
blog: false,
indocusaurus.config.ts
- search through
docusaurus.config.ts
and delete blog links in the sidebar and footer
- delete the
Then, start sketching out the site contents. Do as much of this you want now, and save the rest for later.
- update the site title and tagline, navbar title, and copyright text in
docusaurus.config.ts
- rewrite
src/index.tsx
- rewrite (or delete)
src/components/HomepageFeatures
- change images
- start writing content in the
docs
folder by repurposing files (e.g. rewritedocs/intro.md
) and deleting anything unneeded
Unless this is a throw-away experiment, now's a good time to start version
controlling your site if you haven't already. For example, by running
git init
, then adding and committing all files. Note the Docusaurus template
includes a good starter .gitignore
file.