Contributing

This guide covers the ways to contribute to this site and walks you through a simple edit.

Overview

There are two ways to edit this site:

  1. Edit on GitHub. This option is recommended for those who understand git, GitHub, and the site and are in a hurry (this option is good for quick edits to existing content).
  2. Edit on your computer. This option is recommended for developers, translators, and anyone who wants to edit the mechanics of the site.

Edit on GitHub

Editing on GitHub is perfect for fixing the quick typo.

Pre-requisites

  1. A GitHub account in the McNeel team (if you are reading this, you should already satisfy this requirement.)
  2. Some basic knowledge of git and GitHub (nothing too deep)

Try It

The site content lives in content/en and the folder structure roughly corresponds to the site structure itself. Commits to master will be deployed in production, so be careful. The site is deployed by AWS Amplify and will only deploy if checks pass. Build status displayed in the mcneel slack #build channel. That’s it!

You can also navigate the source for a page from the page itself. If you are logged into https://www.rhino3d.com with your Rhino Account, refresh the page and you should see an Edit this page link near the bottom of the content. Click the Edit on GitHub, make your changes, and commit. The site should deploy with your changes in a matter of minutes.

Edit on your computer

This option is recommended for developers, translators, and anyone who wants to edit the mechanics, or just preview the site locally before committing.

Mac Prerequisites

  1. Visual Studio Code.
  2. Optional: GitHub Desktop: A simple GitHub desktop interface, for those of us that do not like the command line.

Windows Prerequisites

  1. Git for Windows. To check if Git is already installed on the computer, you can go to the command line and type git. Once it is installed, make sure git.exe is added to your $PATH environment variable. Right-click on My Computer and click on Advanced System Settings, then Environment Variables; then, under System Variables find the Path variable and Edit it; add the C:\Program Files\Git\bin\git.exe to the path.
  2. Visual Studio Code.
  3. Optional: GitHub Desktop: A simple GitHub desktop interface, for those of us that do not like the command line.

Try It

  1. Clone the repo using your favorite git client or with:

    git clone https://github.com/mcneel/rhino3d.com.git

  2. Download and install Visual Studio Code.

  3. Launch Visual Studio Code and open the rhino3d.com folder. Visual Studio Code will then recommend some recommended extensions. Install them.

  4. The site content lives in content/en and the folder structure roughly corresponds to the site structure itself. Open content/en/admin/contributing/index.md.

  5. Click the Run and Debug icon on the left (looks like a bug next to a play button). Then, hit the button at the top of the left column Hugo: Serve All Languages. Watch the Terminal window at the bottom to see if the website builds without errors. In the lower right-hand corner of Visual Studio Code, notice that there is now a Task called “hugo serve all languages” that is running. This task will run until you stop it or quit Visual Studio Code.

  6. Make a minor change at the bottom. Add <yourname> was here or something noticable.

  7. Save the file. Cool. Your browser updated to show you your change.

  8. In Visual Studio Code, open content/en/admin/how-this-site-works/index.md.

  9. Press Ctrl + Shift + P (on Mac: Command + Shift + P) to open the Command Palette. Type: Tasks and select Tasks: Run Task from the menu. You are presented with some tasks. Select hugo preview current. This will open a browser tab to the file you are currently editing in Visual Studio Code.

  10. Revert your changes. Commits pushed to master will be deployed in production, so be careful.

  11. Please read the How This Site Works guide as your next step.

That’s it!