How to Contribute to Sean's Website

Thank you for your interest in contributing to this project! This guide will walk you through the process of cloning the repository and updating the events data.

1. Clone the Repository

First, clone the repository to your local machine:

git clone https://github.com/404seannotfound/seanwebsite.git
cd seanwebsite

2. Understand the Data Structure

The events are stored in events/events.json. Each event has the following structure:

{
    "name": "Event Name",
    "date": "YYYY-MM-DD/YYYY-MM-DD",  // Single date or date range
    "location": "City, State/Country",
    "lat": 0.0,  // Latitude coordinate
    "lng": 0.0,  // Longitude coordinate
    "ticketUrl": "https://ticket-url.com",
    "status": "normal"  // Optional: can be "normal", "suspect_date", or "suspect_date_broken"
}
Tip: To get latitude and longitude coordinates from Google Maps:
  1. Go to Google Maps
  2. Search for your event location
  3. Right-click on the exact spot on the map
  4. The coordinates will appear at the top of the menu (e.g., "37.7749° N, 122.4194° W")
  5. Copy these numbers into your event's lat and lng fields
  6. Note: Make sure to use the decimal format (e.g., 37.7749) rather than degrees/minutes/seconds

3. Making Changes

To update or add an event:

  1. Open events/events.json in your preferred text editor
  2. Add or modify the event data following the structure above
  3. Save the file
Note: Make sure to maintain valid JSON format. You can use a JSON validator to check your changes.

4. Testing Your Changes

To test your changes locally, you'll need to set up a simple web server because browsers block the fetch API when loading files directly from the filesystem. Here are a few easy ways to do this:

Option 1: Using Python (simplest)

If you have Python installed:

# For Python 3
python -m http.server 8000

# For Python 2
python -m SimpleHTTPServer 8000

Then open http://localhost:8000/events/events.html in your browser.

Option 2: Using Node.js

If you have Node.js installed:

# Install http-server globally
npm install -g http-server

# Run the server
http-server

Then open http://localhost:8080/events/events.html in your browser.

Option 3: Using VS Code

If you're using Visual Studio Code:

  1. Install the "Live Server" extension
  2. Right-click on events/events.html
  3. Select "Open with Live Server"

Once your server is running, verify that:

  1. Your changes appear correctly on the map and calendar
  2. All links work properly
  3. The event data loads without any console errors

5. Submitting Your Changes

Since you don't have direct write access to the repository, you'll need to submit your changes through a pull request. Here's how:

1. Fork the Repository

  1. Go to the repository
  2. Click the "Fork" button in the top-right corner
  3. This will create a copy of the repository in your GitHub account

2. Clone Your Fork

git clone https://github.com/YOUR_USERNAME/seanwebsite.git
cd seanwebsite

3. Make Your Changes

  1. Edit the events/events.json file
  2. Test your changes locally using one of the web server methods above
  3. Commit your changes:
    git add events/events.json
    git commit -m "Update events: [describe your changes]"
  4. Push to your fork:
    git push origin main

4. Create a Pull Request

  1. Go to your fork on GitHub
  2. Click the "Pull requests" tab
  3. Click the "New pull request" button
  4. Set the base repository to "404seannotfound/seanwebsite" and base branch to "main"
  5. Set the head repository to your fork and branch to "main"
  6. Click "Create pull request"
  7. Add a description of your changes
  8. Submit the pull request
Note: The repository owner will review your changes and may request modifications before merging them.

Need Help?

If you run into any issues or have questions:

Thank you for helping improve this project!