Skip to content

Latest commit

Β 

History

History
148 lines (120 loc) Β· 5 KB

File metadata and controls

148 lines (120 loc) Β· 5 KB

coding-blocks.github.io

Deploys

Netlify
Commits to master and PRs are automatically built and deployed by Netlify

Contributions and PR

  • PRs should be generated against master
  • Wait for @codingblocks-bot to deploy site and paste link of preview
  • Check preview. If all good, then only PR -> master merge is made

Build Setup

# install dependencies
npm install

# build for production with minification
npm run build

Tasks

# minify src images
gulp compress

# clean tmp and dist
gulp clean

Project Structure

.
β”œβ”€β”€ dist                    # Compiled files (auto deployed to master)
β”œβ”€β”€ gulp                    # Gulp tasks and config
β”œβ”€β”€ src                     # Source files
└── ...

Gulp Structure

.
β”œβ”€β”€ ...
β”œβ”€β”€ gulp
β”‚   β”œβ”€β”€ tasks               # Task.js files
β”‚   └── config.js           # Exports module for tasks config
└── ...

Src Structure

.
β”œβ”€β”€ ...
β”œβ”€β”€ src
β”‚   β”œβ”€β”€ ...
β”‚   β”œβ”€β”€ assets              # assets for the website
β”‚   β”‚   β”œβ”€β”€ fonts
β”‚   β”‚   β”œβ”€β”€ images
β”‚   β”‚   β”œβ”€β”€ scripts
β”‚   β”‚   β”œβ”€β”€ styles
|   β”œβ”€β”€ data                # Common JSON data for all pages
|   β”œβ”€β”€ helpers             # Handlebars helpers (js exporting a function in module)
|   β”œβ”€β”€ partials            # Handlebars partials (hbs template)
|   β”œβ”€β”€ index.hbs           # HBS template file 
|   β”œβ”€β”€ index.json          # JSON file for the HBS (/src/index.hbs)
β”‚   └── ...
└── ...

Data

Common JSON data for all pages

.
β”œβ”€β”€ ...
β”œβ”€β”€ src
β”‚   β”œβ”€β”€ ...
β”‚   β”œβ”€β”€ data             
β”‚   β”‚   β”œβ”€β”€ bootcamps.json      # Bootcamps data (price table and upcoming batches)
β”‚   β”‚   β”œβ”€β”€ courses.json        # Courses data (price table and upcoming batches)
β”‚   β”‚   β”œβ”€β”€ footer.json         # Footer imgSrc data
β”‚   β”‚   β”œβ”€β”€ navbar.json         # Navbar imgSrc data
β”‚   β”‚   β”œβ”€β”€ reviews.json        # All reviews data
β”‚   β”‚   β”œβ”€β”€ team.json           # All team member's data
β”‚   └── ...
└── ...

Helpers

Js files export modules with a single function.

.
β”œβ”€β”€ ...
β”œβ”€β”€ src
β”‚   β”œβ”€β”€ ...
β”‚   β”œβ”€β”€ helpers             
β”‚   β”‚   β”œβ”€β”€ ifEquals.js     # In-case Sensitive matching of a string
β”‚   β”‚   β”œβ”€β”€ relativePath.js # Generate relative path from two absolute path strings
β”‚   β”‚   β”œβ”€β”€ removeComma.js  # Remove commas from a string
β”‚   └── ...
└── ...

Example:

module.exports = function (..., options) {
.
.
.
}

Partials

Handlebars Template files

.
β”œβ”€β”€ ...
β”œβ”€β”€ src
β”‚   β”œβ”€β”€ ...
β”‚   β”œβ”€β”€ partials                        
β”‚   β”‚   β”œβ”€β”€ bootcamps.hbs               # Bootcamps section
β”‚   β”‚   β”œβ”€β”€ centerlocation.hbs          # Center location & contact Box
β”‚   β”‚   β”œβ”€β”€ course.hbs                  # Course price box 
β”‚   β”‚   β”œβ”€β”€ coursecontents.hbs          # Course content section
β”‚   β”‚   β”œβ”€β”€ courseenroll.hbs            # Upcoming batches and price box section
β”‚   β”‚   β”œβ”€β”€ coursefaq.hbs               # Course Faq section
β”‚   β”‚   β”œβ”€β”€ coursehighlights.hbs        # Course Highlights section
β”‚   β”‚   β”œβ”€β”€ courses.hbs                 # Courses section
β”‚   β”‚   β”œβ”€β”€ courseSchema.hbs            # Course JSON-LD Schema
β”‚   β”‚   β”œβ”€β”€ footer.hbs                  # Footer container
β”‚   β”‚   β”œβ”€β”€ head.hbs                    # Site-wide head dependencies
β”‚   β”‚   β”œβ”€β”€ header.hbs                  # Page header section
β”‚   β”‚   β”œβ”€β”€ map.hbs                     # Contact form with map section
β”‚   β”‚   β”œβ”€β”€ meta.hbs                    # Meta & open graph tags
β”‚   β”‚   β”œβ”€β”€ navbar.hbs                  # Navbar section
β”‚   β”‚   β”œβ”€β”€ numbers.hbs                 # Numbers Speak Louder section
β”‚   β”‚   β”œβ”€β”€ overview.hbs                # Course overview section
β”‚   β”‚   β”œβ”€β”€ readmoretestimonials.hbs    # Read more reviews buttons section
β”‚   β”‚   β”œβ”€β”€ registration.hbs            # Registration iframe section
β”‚   β”‚   β”œβ”€β”€ scripts.hbs                 # Site-wide body bottom JS dependencies
β”‚   β”‚   β”œβ”€β”€ slider.hbs                  # Slider section
β”‚   β”‚   β”œβ”€β”€ team.hbs                    # Team section
β”‚   β”‚   β”œβ”€β”€ teamMember.hbs              # Team member box
β”‚   β”‚   β”œβ”€β”€ whatstudentssay.hbs         # Reviews Section
β”‚   └── ...
└── ...