Skip to content

Commit

Permalink
Migrate to Jekyll Starter Kit generator (#55)
Browse files Browse the repository at this point in the history
* Start migrate to Jekyll Starter Kit

* Fix post images path

* Fix gitignore file

* Update code

* Add jekyll-paginate to gemfile

* Fix default posts, favicons, and add firebase project

* Fix to relative url

* Replace jekyll url in travis

* Try again

* Change package.json

* Replace processing with http

* Fix traling comma

* Revert to https
  • Loading branch information
Nir Galon authored Dec 7, 2016
1 parent 4181e27 commit f2a9421
Show file tree
Hide file tree
Showing 289 changed files with 844 additions and 669 deletions.
4 changes: 4 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"presets": ["es2015"],
"retainLines": true
}
5 changes: 5 additions & 0 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"prod": "stories-of-a-lifelong-student"
}
}
92 changes: 44 additions & 48 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,64 +1,60 @@

# Created by https://www.gitignore.io/api/jekyll,sass,node,linux

### Jekyll ###
_site/
.sass-cache/
.jekyll-metadata
scripts/
Gemfile.lock
.publish/
css/

### Always-ignore files and folders ###
*.diff
*.err
*.log
*.orig
*.rej
*.swn
*.swo
*.swp
._*
*~

### Ignore packages ###
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip

### Packages ###
node_modules/
bower_components

### Sass ###
.sass-cache/
*.css.map
/assets/scss/main.min.css


### Node ###
# Logs
logs
*.log
npm-debug.log*
/assets/app.min.js

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules
jspm_packages

# Optional npm cache directory
.npm

# Optional REPL history
.node_repl_history
### Linux ###
*~

### OSX ###
*.DS_Store
.AppleDouble
.LSOverride

### Linux ###
*~
.Trash-*

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory
### Windows ###
# Windows image file caches
Thumbs.db
ehthumbs.db
Desktop.ini
$RECYCLE.BIN/

# Linux trash folder which might appear on any partition or disk
.Trash-*
### Lighthouse ###
validate/log.json
38 changes: 25 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,32 @@
sudo: false
sudo: required
dist: trusty

language: ruby
rvm:
- 2.2
language: node_js
matrix:
include:
- node_js: "node"

env:
global:
# speeds up installation of html-proofer
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true
before_install:
- npm install npm -g
- bundle update

install:
- npm install
- npm install -g gulp
- gem install jekyll jekyll-paginate html-proofer
- bundle install
- gem install html-proofer

# Install lighthouse
- npm install -g lighthouse local-web-server
- export DISPLAY=:99.0
- export LIGHTHOUSE_CHROMIUM_PATH="$(pwd)/chrome-linux/chrome"
- sh -e /etc/init.d/xvfb start
- npm explore -g lighthouse -- ./lighthouse-core/scripts/download-chrome.sh
- mv $(npm root -g)/lighthouse/chrome-linux .
- $LIGHTHOUSE_CHROMIUM_PATH --version

script:
- gulp build
- rm -R ./_site/node_modules
- htmlproofer ./_site --disable-external
- npm run gulp build
- cd _site && ws&
- htmlproofer ./_site
- lighthouse http://127.0.0.1:8000 --output=json --output-path=./validate/log.json
- node ./validate/checklog.js ./validate/log.json
29 changes: 29 additions & 0 deletions 404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
layout: default
permalink: /404.html
sitemap: false
---
<style>
body {
margin: 0 auto;
font-family: Helvetica, Arial, "Lucida Grande", sans-serif;
font-size: 1.1em;
color: #333;
}
h1 {
font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
font-weight: 300;
margin: 1em 0;
padding: 0 0 0.25em 0;
border-bottom: 1px dotted #ccc;
text-align: center;
font-size: 3em;
line-height: 1.1em;
}
p {
margin: 0 0 0.5em 0;
line-height: 1.8em;
}
</style>
<h1>Page Not Found</h1>
<p>This specified page was not found on this website. Please check the URL for mistakes and try again.</p>
18 changes: 18 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
source "https://rubygems.org"
ruby RUBY_VERSION

# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
# bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
gem "jekyll", "3.3.1"
gem "jekyll-paginate", "1.1.0"

# If you have any plugins, put them here!
# group :jekyll_plugins do
# gem "jekyll-github-metadata", "~> 1.0"
# end
25 changes: 13 additions & 12 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
ISC License
Copyright (c) 2016 Nir Galon

Copyright (c) 2016, Nir Galon
Permission to use, copy, modify, and/or distribute this software for
any purpose with or without fee is hereby granted, provided that the
above copyright notice and this permission notice appear in all
copies.

Permission to use, copy, modify, and/or distribute this software for any purpose with or
without fee is hereby granted, provided that the above copyright notice and this permission
notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO
THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT
SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
USE OR PERFORMANCE OF THIS SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
27 changes: 19 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
Stories of a Lifelong Student
===
# Stories of a Lifelong Student

[![license](https://img.shields.io/badge/license-ISC-blue.svg)](https://github.com/nirgn975/Stories-of-a-Lifelong-Student/blob/master/LICENSE) [![Build Status](https://travis-ci.org/nirgn975/Stories-of-a-Lifelong-Student.svg?branch=master)](https://travis-ci.org/nirgn975/Stories-of-a-Lifelong-Student) [![Donate](https://img.shields.io/badge/Donate-PayPal-lightgrey.svg)](https://www.paypal.me/nirgn/2)
[![license][license-image]][license-url] [![Build Status][travis-image]][travis-url] [![Donate][donate-image]][donate-url]

My private blog, written by me. The posts are about computer science (data structures, algorithms, computer networks, operating system, and machine learning), open source (linux, git, arduino, contribution), software development (programming, programming languages, frameworks, design patterns, and architecture), security information (pen testing and whitehat hackers), Google stuff (search, android, chrome, chrome os, and web apps), etc.
> My private blog, written by me. The posts are about computer science (data structures, algorithms, computer networks, operating system, and machine learning), open source (linux, git, arduino, contribution), software development (programming, programming languages, frameworks, design patterns, and architecture), security information (pen testing and whitehat hackers), Google stuff (search, android, chrome, chrome os, and web apps), etc.
## Prerequisites

To install this project, you'll need the following things installed on your machine.

1. [Jekyll](http://jekyllrb.com/) - `$ gem install jekyll`
1. [Jekyll Paginate](https://jekyllrb.com/docs/pagination/) - `$ gem install jekyll-paginate`
2. [NodeJS](http://nodejs.org) - use the installer.

## Local Installation
Expand All @@ -30,14 +28,27 @@ $ npm run gulp

**Deploy mode**

You can easily deploy your site build to gh-pages branch with the command
You can easily deploy your site build with the command
```shell
$ npm run gulp deploy
```

## Tests

If you want to run the tests on your local machine please install `gem install html-proofer`. And then run the tests using
If you want to verify the build output, please install `gem install html-proofer`. And then run it using
```shell
$ htmlproofer ./_site --disable-external
$ htmlproofer ./_site
```

If you want to run PWA tests, please install `npm install -g lighthouse`. And then run the tests using
```shell
$ npm run gulp& && lighthouse http://127.0.0.1:3000 --output=json --output-path=./validate/log.json
$ node ./validate/checklog.js ./validate/log.json
```

[license-image]: https://img.shields.io/badge/license-ISC-blue.svg
[license-url]: https://github.com/nirgn975/Stories-of-a-Lifelong-Student/blob/master/LICENSE
[travis-image]: https://travis-ci.org/nirgn975/Stories-of-a-Lifelong-Student.svg?branch=master
[travis-url]: https://travis-ci.org/nirgn975/Stories-of-a-Lifelong-Student
[donate-image]: https://img.shields.io/badge/Donate-PayPal-lightgrey.svg
[donate-url]: https://www.paypal.me/nirgn/2
22 changes: 19 additions & 3 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
# Site settings
title: Stories of a Lifelong Student
description: A blog writin by Nir Galon. The posts are about computer science (data structures, algorithms, networks, databases, operating systems, programming languages, data mining, machine learning, etc), open source related stuff, software development, security information, etc.
url: "http://lifelongstudent.net" # the base hostname & protocol for your site
permalink: pretty
email: nir@galon.io
description: A tech blog written by Nir Galon. The posts are about computer science (data structures, algorithms, computer networks, operating system, and machine learning), open source (linux, git, arduino, contribution), software development (programming, programming languages, frameworks, design patterns, and architecture), security information (pen testing and whitehat hackers), Google stuff (search, android, chrome, chrome os, and web apps), etc.
baseurl: "" # the subpath of your site, e.g. /blog
url: "http://lifelongstudent.io" # the base hostname & protocol for your site
twitter_username: nirgn975
github_username: nirgn975

# Build settings
markdown: kramdown
permalink: pretty
exclude: [
"node_modules",
"LICENSE",
"package.json",
"README.md",
"Gemfile",
"gulpfile.babel.js",
".babelrc",
".gitignore",
"sass",
"scss"
]

# Pagination
gems: [jekyll-paginate]
Expand Down
39 changes: 10 additions & 29 deletions _includes/head.html
Original file line number Diff line number Diff line change
@@ -1,33 +1,14 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width" initial-scale="1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">

<title>{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}</title>
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
<title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
<meta name="description" content="{{ site.description }}">

<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Arimo:400,400i,700&subset=hebrew" rel="stylesheet">
<link rel="stylesheet" href="{{ "/assets/scss/main.min.css" | prepend: site.baseurl }}">
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}">

<link rel="apple-touch-icon" sizes="57x57" href="/assets/img/icon/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/assets/img/icon/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/assets/img/icon/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/assets/img/icon/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/assets/img/icon/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/assets/img/icon/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/assets/img/icon/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/assets/img/icon/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/assets/img/icon/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="/assets/img/icon/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/assets/img/icon/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="/assets/img/icon/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="/assets/img/icon/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="/assets/img/icon/manifest.json">
<link rel="mask-icon" href="/assets/img/icon/safari-pinned-tab.svg" color="#F0F0F0">
<meta name="msapplication-TileColor" content="#F0F0F0">
<meta name="msapplication-TileImage" content="/assets/img/icon/mstile-144x144.png">
<meta name="theme-color" content="#F0F0F0">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Arimo:400,400i,700&subset=hebrew" rel="stylesheet">
<link rel="stylesheet" href="{{ "/css/main.css" | relative_url }}">
<link rel="canonical" href="{{ page.url | replace:'index.html','' | absolute_url }}">
<link rel="manifest" href="{{ "/manifest.json" | relative_url }}">
</head>
2 changes: 1 addition & 1 deletion _includes/nav.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<nav>
<a href="{{ site.baseurl }}/" class="brand-logo">
<img src="/assets/img/Logo.png" alt="{{ site.title }}" />
<img src="/images/Logo.png" alt="{{ site.title }}" />
</a>
<ul>
<li><a href="http://nirgn.com" target="_blank">About</a></li>
Expand Down
Loading

0 comments on commit f2a9421

Please sign in to comment.