Coder Social home page Coder Social logo

www.vtcodecamp.org's Introduction

VT Code Camp Website

Netlify Status

  • Production site: https://www.vtcodecamp.com/
  • Deploy Previews: https://deploy-preview-{PR#}--vtcodecamp.netlify.com/
  • Branch Deploys: https://{branch-name}--vtcodecamp.netlify.com/

Built With

Project Setup

  • Install Node.js & NPM
  • Run npm install in the project directory to install local dependencies
  • Run npm run serve to run a local dev environment
  • Access dev copy of the site at localhost:8080

NPM Scripts

npm run build             # runs `npx eleventy` to build the site
npm run serve             # builds site + serves `_site` directory
npm run update-data       # gets sessionize data and updates _data directory
npm run update-and-build  # gets new sessionize data and builds site

Build Workflow / Interface Diagram

diagram

Site Winterization

Leading up to, and for a while after the event, we set the Netlify build command to npm run update-and-build in the netlify.toml file. This pulls the latest data from Sessionize at build time since the schedule, session descriptions, and speaker info can change. We also set up a Zapier job to rebuild the site on a schedule via webhook. Sessionize data stops changing once the event has been over for a little while. At that point we stop the scheduled, live rebuilds. Since we do this in the fall, we call it winterization ๐Ÿ˜‰. Here are the steps:

  1. Run npm run update-data and commit all data file changes
  2. Change build command in netlify.toml to npm run build so Netlify will no longer update data from Sessionize
  3. Disable the Zapier task

File Structure

2019.vtcodecamp
โ”œโ”€โ”€ _site/                # generated site output
โ”œโ”€โ”€ .vscode/              # vs code editor configs
โ”œโ”€โ”€ .netlify/             # netlify dev settings
โ”œโ”€โ”€ node_modules/         # created by npm install
โ”œโ”€โ”€ src
โ”‚   โ”œโ”€โ”€ _data             # data directory for 11ty (json + js)
โ”‚   โ”‚   โ”œโ”€โ”€ config.js     # environment settings
โ”‚   โ”‚   โ””โ”€โ”€ sponsor.js    # data driving sponsor section
โ”‚   โ”œโ”€โ”€ _includes         # template directory for 11ty
โ”‚   โ”‚   โ””โ”€โ”€ defaultLayout # parent template layout page
โ”‚   โ”œโ”€โ”€ assets            # static assets to build into site
โ”‚   โ”‚   โ””โ”€โ”€ sponsorLogos/ # sponsor logos
โ”‚   โ”œโ”€โ”€ [PageName].md     # any .md files will be built into html
โ”‚   โ”œโ”€โ”€ [PageName].njk    # any .njk files will be built into html
โ”‚   โ”œโ”€โ”€ favicon.ico       # favicon needs to be in root dir
โ”‚   โ””โ”€โ”€ index.njk         # home page
โ”œโ”€โ”€ package.json          # lists npm modules, package, and scripts
โ”œโ”€โ”€ .eleventy.js          # config information for 11ty
โ”œโ”€โ”€ .gitignore            # ignored files in git
โ”œโ”€โ”€ netlify.toml          # deploy settings for netlify
โ”œโ”€โ”€ resources.md          # helpful links
โ””โ”€โ”€ readme.md             # ๐ŸŸŠ [You Are Here]

YAML FrontMatter

Data can be added to the beginning of a page and leveraged in the templating process. The following fields are commonly used by the layout page:

---
layout: default-layout.njk
title:  page title and header element
meta_description: description will show up in meta tags
---

Sponsor Logo Workflow

  • Add sponsor info to sponsors.json
  • Start with scale:100 and run project locally, value can be adjusted (70...150) to maintain consistent visual weight in each category
  • Logo should have an transparency channel for non-design elements (background)
    • If it doesn't, add an alpha channel, and remove background with magic selector using any of the following programs:
  • Compress Image
    • Raster
      1. Whatever the screen resulting resolution, the logo should be resized down to double that resolution for retina displays
      2. Use ImageOptim, Compressor.io, or Squoosh
    • SVG
    • Note: At some point we may try to bake this into the build process if we can get node based CLIs for each optimization. Netlify is setup to perform non-lossy asset optimization, but there's still a lot of other more opinionated optimizations.

Resources

Checkout resources.md for a bunch of docs, links, google search results that helped get us to the point where we are today. Often each resource links lives within the same commit where that feature was being worked on, so you can see a real example of how that snippet was actually implemented.

Contributing

Thanks for your interest in contributing! There are many ways to contribute to this project.

Get started with contributing.md

www.vtcodecamp.org's People

Contributors

kylemit avatar zekefarwell avatar robhalevt avatar dependabot[bot] avatar mmcelaney avatar julielerman 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.