How to Contribute to JoySpace Wiki: A Complete Guide

Learn how to contribute to JoySpace Wiki with this comprehensive guide covering everything from forking the repository to submitting your first pull request. Perfect for both beginners and experienced contributors.

Sunnote
4 min read
How to Contribute to JoySpace Wiki: A Complete Guide

Thank you for your interest in contributing to JoySpace Wiki! This guide will walk you through the process of contributing content to our wiki.

Prerequisites

  • A GitHub account (required for forking and creating Pull Requests)
  • Basic knowledge of Markdown
  • Git installed on your computer

Contribution Flow

  1. Fork the repository (requires GitHub account)
  2. Clone your fork
  3. Create your content
  4. Submit a Pull Request
  5. Wait for review and merge

Detailed Guide

1. Fork First, Then Clone

  1. Fork the repository (required first step):

    • Go to JoySpace-Site repository
    • Click the 'Fork' button in the top-right corner
    • Wait for GitHub to create your copy of the repository
  2. Clone your fork (not the original repository):

#  Clone your fork (replace YOUR_USERNAME with your GitHub username)
git clone https://github.com/YOUR_USERNAME/JoySpace-Site.git
cd JoySpace-Site
# Add the original repository as upstream
git remote add upstream https://github.com/original-repo/JoySpace-Site.git

2. Create Your Content

Writing a Blog Post

  1. Create a new markdown file in the content/posts directory:

Example structure

content/ └── posts/ └── my-awesome-post.md
└── bookmark-guide.md └── getting-started.md

  1. Add frontmatter with the date (required):
---
title: My Awesome Post
date: 2024-03-15
author: Your Name
description: A brief description of your post
tags: ["tutorial", "guide", "tips"]
---

Important: Fields containing special characters must be wrapped in quotes "". For example:

  • title: "My: Awesome Post"
  • title: My: Awesome Post

File Naming Guidelines

  • Use lowercase letters
  • Replace spaces with hyphens
  • Keep names short but descriptive
  • Don't include dates in filenames
  • Use .md extension

✅ Good examples:

  • bookmark-guide.md
  • getting-started.md
  • quick-tips.md

❌ Avoid:

  • 2024-03-15-my-post.md
  • My Awesome Post.md
  • post1.md

3. Preview Your Content

You can easily preview the current content and your additions using the index.html file in the root directory:

Option 1: Using VS Code Live Server (Recommended)

  1. Install VS Code Live Server extension:
    • Open VS Code Extensions (Ctrl+Shift+X or Cmd+Shift+X)
    • Search for "Live Server"
    • Install "Live Server" by Ritwick Dey
  2. Preview the wiki:
    • Right-click on index.html in the root folder
    • Select "Open with Live Server"
    • Your browser will open with a live preview that updates automatically

Option 2: Using Command Line Server

You can run a local server using Python or Node.js:

# Using Python (Python 3)
python -m http.server 8080

# Using Python (Python 2)
python -m SimpleHTTPServer 8080

# Using Node.js (need to install first: npm install -g http-server)
http-server

Then open your browser and visit:

Note: Using VS Code Live Server (Option 1) is still the recommended method as it's easier to set up and use.

4. Submit Your Contribution

  1. Create a branch in your fork:
git checkout -b post/my-awesome-post
  1. Commit your changes:
git add content/posts/my-awesome-post.md
git commit -m "Add: New post about awesome topic"
  1. Push to your fork:
git push origin post/my-awesome-post
  1. Create a Pull Request:
    • Go to the original repository at univault-org/JoySpace-Site
    • You should see a yellow banner with your recently pushed branch and a green 'Compare & pull request' button
    • Click the green 'Compare & pull request' button
    • Base repository: univault-org/JoySpace-Site
    • Base: main
    • Head repository: YOUR_USERNAME/JoySpace-Site
    • Compare: post/my-awesome-post
    • Fill in the PR description with details about your post
    • Click 'Create pull request'

5. Review Process

  1. Maintainers will review your PR
  2. They may request changes
  3. Once approved, your PR will be merged
  4. Site rebuilds automatically with new content

FAQ

Q: Can I contribute without a GitHub account?

A: No, you need a GitHub account to fork the repository and create Pull Requests. This helps us:

  • Track contributions
  • Maintain quality
  • Provide proper attribution
  • Enable collaboration

Q: Why do I need to fork instead of clone?

A: Forking:

  • Creates your own copy of the repository
  • Allows you to make changes without affecting the original
  • Enables proper Pull Request workflow
  • Maintains project security

Q: How do I keep my fork updated?

First, add the upstream repository (only need to do this once):

# Add the original repository as upstream
git remote add upstream https://github.com/univault-org/JoySpace-Site.git

Then, whenever you want to update your fork:

# Fetch changes from upstream repository
git fetch upstream

# Update your main branch
git checkout main
git merge upstream/main

You can verify your remotes at any time using:

git remote -v

Need Help?

  • Create an issue for questions
  • Join our community discussions
  • Read our Code of Conduct

Thank you for contributing to JoySpace Wiki! 🎉