Welcome, Pop-pop!
Here's how to get started publishing your writings.
1. Set Up a GitHub Account
- Create a GitHub account if you don't have one already.
- Make sure to provide your GitHub username to Joel so he can grant you access to the repository.
2. Generate an SSH Key
ssh-keygen -t ed25519 -C "your_email@example.com"
Creates a key pair under~/.ssh.eval "$(ssh-agent -s)" && ssh-add ~/.ssh/id_ed25519
Starts agent & adds your private key.cat ~/.ssh/id_ed25519.pub
Copy/paste that public key to share with Joel. Joel will use this public key to grant you access to the repository.- To add your SSH key to your GitHub account, go to Settings > SSH and GPG keys and click New SSH key. Paste your public key there and save.
echo 'eval "$(ssh-agent -s)" && ssh-add ~/.ssh/id_ed25519' >> ~/.bashrc
Adds the SSH agent startup and key add command to your~/.bashrcfor automatic execution on terminal startup. Run this command only once.
3. Configure Git
sudo apt-get update && sudo apt-get install git -y
Installs Git if not already present.git config --global user.name "Lewis Sauerwein"git config --global user.email "your_email@example.com"git --version
Confirm Git is installed and set up.
4. Install Node via NVM
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
Installs NVM.source ~/.bashrc && nvm install 18 && nvm use 18
Loads NVM, installs Node 18, sets it active.node -v
Check your Node version (should be 18.x.x).
5. Clone the Project Repository
git clone git@github.com:JoelAlexander/les-docusaurus.git
Uses SSH to clone the repo. You will need your SSH key set up in GitHub.cd les-docusaurus && npm install
Installs all required packages.npm start
Starts local dev server. Visithttp://localhost:3000in a browser.- To iterate on changes, edit your files. You should be able to see updates instantly in the browser
6. Make and Publish Changes
- Edit any file, e.g.
pages/index.tsx, and save changes. git add . && git commit -m "Hello world"
Commits your changes locally.git push origin main
Pushes changes. Once CI finishes, your updates should appear on the live site.