Before we start with making website, There are some prerequisites as defined below, I will explain each and everything in detail.

  1. C9.io : To edit your website remotely.

  2. Jekyll: static site generator.

  3. GitLab : For Hosting and deployment of website.

  4. Forestry.io : A full-featured CMS for your static site with support for Jekyll and Git.

C9.io

Cloud9 IDE is an online integrated development environment. It supports hundreds of programming languages, including C, C++, PHP, Ruby, Perl, Python, JavaScript with Node.js, and Go.I have used this platform because I am frequently formatting my lappy and I always need configuring development environment.C9.io gives pre-installed environment and it saves lots of time for developer like me :)

you need to create the account in c9.io then take initial checkout from GitLab project repo.

c9 configuration phpbees

Jekyll

Jekyll built with ruby and It is a simple, blog-aware, static site generator. It takes a template directory containing raw text files in various formats, runs it through a converter (like Markdown) and our Liquid renderer, and spits out a complete, ready-to-publish static website suitable for serving with your favorite web server.

There are many ready-made templates available in market so you can pick any template which is suitable for your needs and quickly jump into production but if you have some extra things which are not covered in the template then you can search for Ruby plugins.

For example, If you need pagination on your website then there is developed plugin available,In this case, you need to just include “jekyll-paginate” gem in your Gemfile and then add it in config.yaml.that’s It!! now pagination available in your website.

c9 configuration phpbees

Please follow Documentation for how to create page/post etc using Jekyll for in-depth.

GitLab

We are going to use Gitlab for hosting and for compiling Jekyll pages.Of-course GitLab is not limited to these functions but as per our need, we are going to use GitLab for this only.

gitlab  phpbees
c9 gitlab phpbees
As shown in the  image you can check ongoing process by clicking on CI/CD and then jobs then click on running Job, Here you can see actual process what is going on with your current build.Gitlab Takes environment and required gem file from config variable and compile pages to static pages in "public" dir which is defined in ".gitlab-ci.yml" 

Forestry.io

Forestry.io is a Git-based CMS (content management system) for websites and web products built using static site generators. Forestry bridges the gap between developers and their teams, by making development fun and easy, while providing powerful content management for their teams.

For example, If you have added one page on the website from Forestry or you have changed any template in your project then that changes will automatically compile and generates new static pages according to your template.

If you want to deploy admin on your website then go to Settings > project path >add your admin folder name> deploy admin

Tags