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:
- 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).
- 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
- A GitHub account in the McNeel team (if you are reading this, you should already satisfy this requirement.)
- 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
- Visual Studio Code.
- Optional: GitHub Desktop: A simple GitHub desktop interface, for those of us that do not like the command line.
Windows Prerequisites
- 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 suregit.exeis added to your$PATHenvironment variable. Right-click on My Computer and click on Advanced System Settings, then Environment Variables; then, under System Variables find thePathvariable and Edit it; add theC:\Program Files\Git\bin\git.exeto the path. - Visual Studio Code.
- Optional: GitHub Desktop: A simple GitHub desktop interface, for those of us that do not like the command line.
Try It
-
Clone the repo using your favorite git client or with:
git clone https://github.com/mcneel/rhino3d.com.git -
Download and install Visual Studio Code.
-
Launch Visual Studio Code and open the
rhino3d.comfolder. Visual Studio Code will then recommend some recommended extensions. Install them. -
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. -
Press
Ctrl+Shift+P(on Mac:Command+Shift+P) to open the Command Palette. Type:Tasksand selectTasks: Run Taskfrom the menu. You are presented with some tasks. Use the ↑/↓ keys to selecthugo serve all languagesfrom the list and press enter. 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. -
Make a minor change at the bottom. Add
<yourname> was hereor something noticable. -
Save the file. Cool. Your browser updated to show you your change.
-
In Visual Studio Code, open
content/en/admin/how-this-site-works/index.md. -
Press
Ctrl+Shift+P(on Mac:Command+Shift+P) to open the Command Palette. Type:Tasksand selectTasks: Run Taskfrom the menu. You are presented with some tasks. Selecthugo preview current. This will open a browser tab to the file you are currently editing in Visual Studio Code. -
Revert your changes. Commits pushed to
masterwill be deployed in production, so be careful. -
Please read the How This Site Works guide as your next step.
That’s it!
