thephpleague / theme.thephpleague.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Quick-start guide

The following document explains how to quickly generate a fully responsive, branded project website for The PHP League. These sites are created using Jekyll and are designed to be hosted on GitHub Pages.

Install Jekyll

If you do not yet have Jekyll installed, do that first.

Create gh-pages branch

Go to your project folder.

cd your-project-folder

Create an orphaned gh-pages branch and remove all files from the old working tree.

git checkout --orphan gh-pages
git rm -rf .

If you already have a gh-pages branch, simply switch to it.

git checkout gh-pages

Install the theme

The following script will add the necessary files and folders for the website theme. It will NOT overwrite or delete any existing files.

php -r "readfile('https://raw.githubusercontent.com/thephpleague/theme.thephpleague.com/gh-pages/scripts/create.php');" | php

The basic file stucture looks like this:

├── _data
│   ├── images.yml
│   ├── menu.yml
│   └── project.yml
├── _layouts
│   └── default.html
├── .gitignore
├── CNAME
└── index.md

Build your website

View the Jekyll documentation here. Be sure to add your site specific settings to the config files found in the _data folder. Also add your domain name to the CNAME file.

jekyll serve --watch

View your development site at localhost:4000.

Commit and deploy

When you're ready to deploy your website, simply push it to the gh-pages branch of your GitHub project. You do not need to commit the compiled website, as GitHub Pages does this automatically.

git add -A
git commit -m "Inital commit"
git push origin gh-pages

About


Languages

Language:SCSS 96.2%Language:HTML 1.9%Language:PHP 1.1%Language:JavaScript 0.8%