Giter Club home page Giter Club logo

bikolabs-web's Introduction

Pleasure

Pleasure Static Site Generator

Twig based Static Site generator powered by gulp.

Motivation

There are a lot of static site generator out there but we always found ourselves tweaking and adjusting them. The idea is to use it as a boiler plate for basic static web sites. Tailored to our needs and workflows, its intended to use as it is with no config required. Heavily inspired on Jekyll.

Prerequisites

Download

Installation

  • Launch npm installer
    npm install
    

Development

  • Launch development environment
    npm start
    

Deploy (production ready)

  • Clean previous builds.
    npm run clean
    
  • Compile everything for production.
    npm run build
    

Deploy (Netlify)

  • Build command: npm run build
  • Publish directory: build

Automatic Netlify Deploy

Deploy to Netlify

Structure

Some simples and some advanced.

Folders

|-- build/  (generated production build)
|-- build-dev/  (generated development build)
|-- src/assets/fonts/  (font sources)
|-- src/assets/images/  (image sources)
|-- src/assets/js/  (js sources)
|-- src/assets/scss/  (SMACSS based sass setup)
|-- src/assets/svg/  (svg sources)
|-- src/assets/videos/  (video sources)
|-- gulpfile.js  (configured gulp file)
|-- node_modules/  (modules generated by npm)
|-- package.json  (configured to load dependencies by npm)
|-- config.vendors.js (javascript vendor configuration file example)
|-- README.md (Documentation)

Sass

BEM & Atomic design structure.

src/assets/sass/
  |-- 01_tools/
  |-- 02_settings/
  |-- 03_generic/
  |-- 04_elements/
  |-- 05_objects/
  |-- 06_components/
  |-- 07_pages/
  |-- 08_utilities/
  |-- style.scss

Pages

src/pages/
  |-- _components/ (reusable twig components)
  |-- _data/ (site data and specific page data)
  |-- _includes/ (common place for include files)
  |-- _layouts/ (html and page layout)
  |-- page1/index.twig (example page)
  |-- page2/index.twig (example page with partials)
  |-- dev-guide.twig (pages, components and svg icons index, for development purposes)
  |-- index.twig

NetlifyCMS

Admin Configuration: src/static/admin/config.yml

Normal NetlifyCMS config file. Modify as needed. name act as machinename. Important for folder naming and final url.

Template convention

src/pages/content-name
  |-- list.twig (content list page)
  |-- item.twig (content item page)

Content convention

content/content-name
  |-- slug.json (a file per item)

Twig Template System

Custom functions

SVG Spritesheet

Nuts and bolts

and how to use them.

  • Favicon

  • JS Vendors

  • SASS Vendors

  • Critical CSS splitting

  • Fonts

  • Image optimization, responsive images and lazyloading

  • SVG Icon Spritesheet

  • Defaults

  • GRDP

  • NetlifyCMS

ToDo:

  • Critical split - missing string inject into style
  • Responsive images
  • Documentation
  • Default non intrusive html and sass
  • Favicon gen

bikolabs-web's People

Contributors

oierbravo avatar karlosgliberal avatar carlosj-biko avatar

Watchers

 avatar Aitor Resano 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.