Skip to content

Latest commit

 

History

History
68 lines (46 loc) · 3.91 KB

README.md

File metadata and controls

68 lines (46 loc) · 3.91 KB

Website Setup

1 | Setup

This docs/ folder contains the source for the static Docusaurus site published to the GitHub Pages endpoint on this repo. It was created using the default quickstart command below, run in the root of the repository:

npx create-docusaurus@latest docs classic

2 | Commands

Open the VS Code terminal and change to the docs/ directory. Run npm install to get local environment setup first. Then use the following commands for development:

Command Description
npm install Install dependencies first
npm start Preview site with dev server
npm run build Build static site for deploy
npm run serve Preview site from static build
npm run deploy Publish static build to GitHub pages

3 | Configuration

The site can be customized for basic themes and capabilities (config), styling (css) and content (sidebars, docs, blog). These are the core docs to reference for more details:

  1. Configuration
  2. Styling and Layout
  3. Using Plugins
  4. Deploying to GitHub Pages
  5. Static Assets
  6. Using Local Search - via community plugins
  7. Optimizing SEO - with metadata, sitemap etc.
  8. Swizzling - for deeper customization of core components

Some additional notes:

Let's get these configured in order!

3.1 Styling: src/css/custom.css

  1. Use the Styling with Infima tool to pick color palettes for dark and light modes to customize the src/css/custom.css file defaults.
  2. Update the static/img/logo.svg file with your desired new logo - and update the relevant logo references in the repository (search/replace) to use updated logo.

3.2 Site Config: docusaurus.config.js

Relevant references:

3.3 Docs Sidebar: sidebars.js

3.4 Docs & Pages: src/

  1. The Homepage layout is defined in src/pages/index.tsx - and has a <HomepageHeader> (hero element) and HomepageFeatures (main body) as the core components.
  2. The HomepageFeatures component is defined in src/components/HomepageFeatures.tsx - and is a grid of cards with icons, titles and descriptions. Refactored this to load data from a JSON file in src/data/features.json and use image paths instead of SVGs.

3.5 Blog: blog/

4 | Deployment