Code Monkey home page Code Monkey logo

mcs-web-2.0's Introduction

mcs-web

This is the design guide for MCS's new website.

Technologies

  • Eleventy - static site generator
  • Liquid - templating language
  • Node - JavaScript runtime
  • npm - node package manager
  • GitHub - host of the git repository
  • Netlify - build, deploy, and host the website

Local Development

Environment Setup

To develop locally, you will need to work on a computer with the following tools:

  1. Terminal, Shell, or Console application.
  2. git for version control
  3. Node and npm
  4. A Text Editor of your choice, e.g. Sublime Text (recommended), Textmate, VS Code
  5. A browser of your choice, e.g. Chrome, Firefox, Edge, Safari

Below, you will find more specific instructions for your operating system.

On MacOS

  1. Terminal is a shell that comes pre-installed on Macs. Find it in the Application folder and open it.
  2. Install homebrew, which you will use to install Node.
  3. Check if brew is installed by running brew -v in Terminal.
  4. Install node in homebrew by running brew install node in Terminal.
  5. Check if node and npm are installed by running node -v and npm -v in Terminal.
  6. Open your browser.

On Linux

  1. Linux usually comes pre-installed with at least one terminal emulator: gnome-terminal, konsole, xterm, eterm. Find it and open it.
  2. Install git with sudo apt install git-all. Check it is installed by running git -v in terminal.
  3. Install node with apt-get by running sudo apt install nodejs in your terminal.
  4. Install npm with apt-get by running sudo apt install npm in your terminal.
  5. Check if node and npm are installed by running node -v and npm -v in terminal.
  6. Open your browser.

On PC

  1. Install a git terminal emulator by downloading the build and installing it. Open it.
  2. Install node and npm by downloading the Node.js installer.
  3. In the git terminal, check to see if node and npm are in the path by running node -v and npm -v. If not, add them to your PATH environmental variable.
  4. Open your browser.

Getting Started (The First Time)

GitHub account firsts

  1. Create a GitHub account.
  2. In your terminal, generate a SSH public key, following the steps in this guide. Copy the public key.
  3. In GitHub, go to your Account Settings, and save the public key to your SSH and GPG keys.

GitHub Repository Firsts

  1. Git Clone this repository onto your machine (see link for instructions).
  2. Change your directory to the cloned repository: cd mcs-web in terminal.
  3. Install dependencies: npm install in terminal.
  4. Build the site for the first time (generating a _site directory) by running npm run-script build in terminal.

Running the server

  1. Run npm start in terminal to start the app server.
  2. Open your browser to a new tab and view the app at http://localhost:8080

Example Workflow

This workflow assumes you have already done all the 'Getting Started' pieces and are coming back to do work on this repo.

All code snippets below are commands to run in terminal.

  1. Open terminal and change your directory until you are in this repository's directory.
  2. Open your Text Editor, and open this repository as a project.
  3. Pull down the latest code changes from GitHub.
    git checkout main
    git pull origin main
  4. Create a new branch for your work.
    git checkout -b my-new-branch-name
  5. Install npm packages again, just in case they changed.
    npm install
  6. Create a new terminal window or tab and run the server there.
    npm start
  7. Open your browser. View the app in a new tab at http://localhost:8080.
  8. Do any work that you need to do. Save changes to the files, and eleventy should rebuild the site automatically and show the changes in the browser.
  9. When you are done working, you can stage and commit your changes with git.
    git add .
    git commit -m 'Will add a good commit message about what this change does'
  10. Push your branch to GitHub so you can open a new PR. If you cannot remember the current branch name, you can type git status to see the branch name.
    git push origin my-new-branch-name
  11. Go to the repository on GitHub. You should see the branch you just pushed. Click the 'Compare & pull request' button to make a new Pull Request.
  12. On the Open a Pull Request page, type information a reviewer might need to review your work in the main body. On the right hand menu, use the Settings icon in the Reviewers section to tag reviewers. On the right hand menu, in the Label section add 'Code Review' as a label. Click to Create Pull Request'.

CSS Files

We use Sass to write styles. Any sass file (with extension .scss) in the assets/styles folder will get compiled to css and placed in the _site/assets/styles when you run npm start or npm run-script build.

mcs-web-2.0's People

Contributors

tgawley avatar gmfholley avatar mel-d avatar morganhaworth avatar lingligan avatar mystery-code-society avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.