Giter VIP home page Giter VIP logo

rzl-homepage's Introduction

rzl-homepage

Build Status DevDependency Updates

This repository is rather large (about 200MB at the time of writing) because everything (including images) is included. The initial cloning therefore takes a few seconds (depending on your Internet connection).

Please have a look at our contribution guidelines.

Development Setup

We have a Docker build container 'cause it's hip, but you may also roll your own environment. Choose as you like.

Docker

experimental

docker run --rm=true -e DEVUID=$(id -u) -p 127.0.0.1:8000:8000 -v $(pwd):/home/dev raumzeitlabor/rzl-homepage-dev-docker

Plain

Requirements

Debian
sudo apt-get install nodejs nodejs-legacy npm bundler ruby-dev
sudo npm install -g grunt-cli
Arch Linux
sudo pacman -S nodejs npm
gem install bundler
sudo npm install -g grunt-cli
FreeBSD
sudo pkg install node npm rubygem-bundler nasm
sudo npm install -g grunt-cli

Note: nasm(1) is needed to compile some node packages from source.

OSX

Needs Homebrew.

brew install node ruby 
sudo gem install bundler
sudo npm install -g grunt-cli

Dependencies

yarn install
bundler install

Hacking

grunt serve
$EDITOR app/$file

Building

grunt

uses the default task in the Gruntfile to build the whole site (targets test and build). This is what Travis does on new commits (see .travis.yml).

You can also run individual Grunt targets, e.g.

grunt build
grunt test

To check the result use

grunt serve:dist

which rebuilds the whole project and serves the "dist" folder on port 8080. The editing of files then triggers a new build.

You can read about all targets in the Gruntfile.

Deployment

This homepage is auto-deployed by Travis if the following requirements are met:

  • we're on the master branch
  • the build is green (grunt exited with status 0)

Travis will rsync the contents of the dist directory to citizenfour (this is really fast). Please note that it may take a few minutes until Travis is able to complete a build. We originally used Travis' new container-based infrastructure; due to lack of IPv6 (we deploy via IPv6) we had to switch back to the standard virtualized boxes, leading to a much slower build.

The homepage is served by the rzl-homepage-docker container. Anything related to webserver setup should be filed against that repository.

Internals

The data flow is as follows:

                             app
             app/_layouts     |
                    |         v
                    v      +--------+
               .layouts -> | jekyll | -> .tmp -> dist
                           +--------+

The Gruntfile we're using was initially generated using the yeoman webapp generator. While it allows for really nice development setups, it is a bit complicated to understand. Here's some information on how the homepage is built (rough sketch):

  1. All JS code is linted. If you don't meet our style, you're out.
  2. The target directory is cleaned up.
  3. CSS is auto-prefixed (see e.g. http://scottriley.im/autoprefix).
  4. All files relevant for Jekyll (especially HTML) is copied to .tmp
  5. CSS and JS files are minified, concatenated and revved.
  6. Images are optimized and revved.
  7. Jekyll is run to generate the contents.
  8. All HTML files are minified (e.g. templates, static pages).

rzl-homepage's People

Contributors

elsbrock avatar tabascoeye avatar lutoma avatar abrock avatar greenkeeperio-bot avatar blabber avatar silsha avatar flederrattie avatar ranlvor avatar hax404 avatar pfeyffer avatar renovate[bot] avatar uwap avatar raphaelm avatar renovate-bot avatar echomirage avatar s1lvester avatar leahoswald avatar cheatha avatar thinkjd avatar jacboy avatar mkhl avatar mschuetz avatar echox avatar takuruu 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.