Getting Started with Your Documentation Site
Welcome! This guide will help you get started with the documentation template, whether you're seeing this for the first time or already have it running.
Getting the Template
If you haven't set up the template yet, here's how to get started:
Step 1: Get the Template
You have several options to get the template:
Option A: GitHub Classroom (For CIS 4398 and 3296 Students)
If you're working on a class assignment, use the GitHub Classroom link provided by your instructor. This will automatically create your repository with the correct permissions and settings.
Option B: Use as Template (For Personal Projects)
- Go to the template repository
- Click the green "Use this template" button
- Select "Create a new repository"
- Name your repository and make it public
- Click "Create repository from template"
Option C: Quick Start with npx
Create a new project quickly using npx:
npx create-project-docs my-project
cd my-project
Step 2: Enable GitHub Pages
After creating your repository:
- Go to your repository Settings
- Scroll down to Pages section
- Under "Source", select "Deploy from a branch"
- Choose "gh-pages" branch (this will be created automatically later)
- Click Save
Development Environment Options
Now you have two main options for working with your documentation:
Option 1: GitHub Codespaces (Recommended for Beginners)
GitHub Codespaces provides a cloud-based development environment that's ready to go:
- Open in Codespaces: Go to your repository on GitHub and click the green "Code" button, then select "Codespaces"
- Wait for setup: The environment will automatically install dependencies
- Start the development server:
cd documentation
yarn start
- View your site: Codespaces will provide a preview URL (usually shown in a popup)
Only you can see your Codespace and it's preview URL. To share your work, push changes to GitHub.
Option 2: Local Development
If you prefer working locally on your machine:
Prerequisites
Setup Steps
- Clone your repository:
git clone https://github.com/YOUR-USERNAME/YOUR-REPO-NAME.git
- Navigate to the documentation folder:
cd YOUR-REPO-NAME/documentation
- Install dependencies:
yarn install
- Start the development server:
yarn start
- View your site: Open http://localhost:3000 in your browser
Making Your First Edit
Let's make a quick edit to see how the live reload works:
- Open
docs/intro.mdx
in your editor - Make a small change to the text
- Save the file
- Watch your browser automatically refresh with the changes!
Automatic Deployment
This is the best part. Your site deploys automatically:
- Make changes to your documentation
- Commit and push to the
main
branch - GitHub Actions automatically builds and deploys your site
- View your live site at:
https://YOUR-USERNAME.github.io/YOUR-REPO-NAME/
No manual deployment needed!
Key Files and Folders
Here's what's important in your documentation structure:
docs/
- Your main documentation contenttutorial/
- The tutorial pages you're reading nowsrc/pages/
- Custom React pages (like the homepage)static/
- Static assets (images, files)docusaurus.config.js
- Main configuration file
Next Steps
- Customize your site title and branding in
docusaurus.config.js
- Set up environment variables for the contributors section (see Set Environment Variables)
- Add your project content by editing files in the
docs/
folder - Deploy your changes - commits to the main branch automatically deploy via GitHub Actions
Need Help?
- Git basics: Check out GitHub's Git Handbook
- Markdown guide: See Markdown Features
- Docusaurus docs: Visit docusaurus.io for advanced features
Happy documenting! 🚀