Getting started with creating and sharing content for the Merit Network, Inc. technology site
Assuming you're comfortable with Git and have Node/NPM installed, clone/fork the repo then:
# Change into local copy
cd merit-network.github.io
# Install dependencies
npm install
# Run development
npm run develop
# (OPTIONAL) Clean local; helps if develop isn't "working"
npm run clean
# (OPTIONAL) Run a local build
npm run build
On Windows 10, we'll make use of GitHub Desktop to manage code and Ubuntu (app) to run our code via Node/NPM. To copy/paste using the Ubuntu (app) see https://www.howtogeek.com/353200/how-to-enable-copy-and-paste-keyboard-shortcuts-in-windows-10s-bash-shell/.
One-time steps to get your Windows 10 environment setup.
- Fork Repository
- Open https://github.com/merit-network/merit-network.github.io
- Near the top right, click "Fork"
- Learn more at https://guides.github.com/activities/forking/
- Setup GitHub Desktop and clone code
- Download/install GitHub Desktop from https://desktop.github.com/
- Open, log in, confirm stuff.
- Click "Clone a Repository from the Internet..." and select "merit-network.github.io" under "Your Repositories"
- For "Local path" select your desktop via "Choose..." and click Clone
- In "How are you planning to use this fork?" box select "To contribute to the parent project" and click Continue.
- Download/install GitHub Desktop from https://desktop.github.com/
- Setup Ubuntu (app) and Node/NPM
- Install Ubuntu (app)
- Start > Microsoft Store > search "Ubuntu" > Click "Ubuntu" > Click "Get"
- Launch "Ubuntu"
- Install NPM/Node (in Ubuntu)
- Type/paste
sudo apt-get update && sudo apt-get upgrade
- Type/paste
curl -sL https://deb.nodesource.com/setup_14.x | sudo bash -
- You can copy/paste via normal copy and right-click in Ubuntu
- Type/paste
sudo apt-get -y install gcc g++ make
- Type/paste
sudo apt-get -y install nodejs
- Type/paste
- Install NPM/Node packages
- Type/paste
cd /mnt/c/Users/<you>/Desktop/merit-network.github.io
- If you aren't sure of your user name (folder) enter
cd /mnt/c/Users
and hit TAB to see choices. - If you cloned the code to a different location, you'll need to use a different path.
- If you aren't sure of your user name (folder) enter
- Type/paste
npm install
- Type/paste
- Install Ubuntu (app)
- Run code
- In Ubuntu (app), type/paste
cd /mnt/c/Users/<you>/Desktop/merit-network.github.io
- If you aren't sure of your user name (folder) enter
cd /mnt/c/Users
and hit TAB to see choices. - If you cloned the code to a different location, you'll need to use a different path.
- If you aren't sure of your user name (folder) enter
- Type/paste
npm run develop
- Press CTRL+C to exit/stop.
- In a web browser, open http://localhost:8000
- In Ubuntu (app), type/paste
- Edit code
- In Windows Explorer, open Desktop > merit-network.github.io > content > blog
- Add a new folder for your blog post or copy/paste "hello-world" and rename things.
- Edit "index.md" in a text editor
- We recommend VS Code from https://code.visualstudio.com/
- As you make changes, save the file(s) and http://localhost:8000 will automatically refresh!
- Publish code
- WARNING: in Windows, the "package-lock.json" gets modified and we do not want those changes!
- Right-click on "package-lock.json" and select "Discard Changes"
- Select file(s), add a description (commit message) and click "Commit to main"
- Repository (menu) > Push
- Branch (menu) > Create Pull Request
- Learn more at https://guides.github.com/activities/forking/
- WARNING: in Windows, the "package-lock.json" gets modified and we do not want those changes!
- Advanced
- See additional (optional!) clean/build commands under Quick Start above.
On macOS 10/11, we'll make use of GitHub Desktop to manage code and Terminal.app and Homebrew to run our code via Node/NPM.
One-time steps to get your macOS 10/11 environment setup.
- Fork Repository
- Open https://github.com/merit-network/merit-network.github.io
- Near the top right, click "Fork"
- Learn more at https://guides.github.com/activities/forking/
- Setup GitHub Desktop and clone code
- Download/install GitHub Desktop from https://desktop.github.com/
- Open, log in, confirm stuff.
- Click "Clone a Repository from the Internet..." and select "merit-network.github.io" under "Your Repositories"
- For "Local path" select your desktop via "Choose..." and click Clone
- In "How are you planning to use this fork?" box select "To contribute to the parent project" and click Continue.
- Download/install GitHub Desktop from https://desktop.github.com/
- Setup Terminal.app and Node/NPM
- Download and install https://nodejs.org/dist/v14.15.1/node-v14.15.1.pkg
- Install NPM/Node packages
- Open Applications > Terminal.app
- Type/paste
cd /Users/<you>/Desktop/merit-network.github.io
- If you aren't sure of your user name (folder) enter
cd /Users
and hit TAB to see choices. - If you cloned the code to a different location, you'll need to use a different path.
- If you aren't sure of your user name (folder) enter
- Type/paste
npm install
- Run code
- In Terminal, type/paste
cd /Users/<you>/Desktop/merit-network.github.io
- If you aren't sure of your user name (folder) enter
cd /Users
and hit TAB to see choices. - If you cloned the code to a different location, you'll need to use a different path.
- If you aren't sure of your user name (folder) enter
- Type/paste
npm run develop
- Press CMD+C to exit/stop.
- In a web browser, open http://localhost:8000
- In Terminal, type/paste
- Edit code
- In Finder, open Desktop > merit-network.github.io > content > blog
- Add a new folder for your blog post or copy/paste "hello-world" and rename things.
- Edit "index.md" in a text editor
- We recommend VS Code from https://code.visualstudio.com/
- As you make changes, save the file(s) and http://localhost:8000 will automatically refresh!
- Publish code
- Select file(s), add a description (commit message) and click "Commit to main"
- Repository (menu) > Push
- Branch (menu) > Create Pull Request
- Learn more at https://guides.github.com/activities/forking/
- Advanced
- See additional (optional!) clean/build commands under Quick Start above.