A list of the most common functionalities in Jekyll (Liquid). You can use Jekyll with GitHub Pages, just make sure you are using the proper version.
Running a local server for testing purposes:
| /* | |
| * Copyright 2017 Mohsen Mesgarpour | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
| <!-- TODO: add og, twitter card --> | |
| {% comment %} | |
| http://ogp.me/ | |
| {% endcomment %} | |
| <meta name="description" content="{% if page.tagline %}{{page.tagline}}{% endif %}"> | |
| {% if page.categories %} | |
| {% for category in page.categories limit:1 %} | |
| <meta content="{{ category }}" property="article:section"> |
| <h2>Categories</h2> | |
| <ul> | |
| {% assign categories_list = site.categories %} | |
| {% if categories_list.first[0] == null %} | |
| {% for category in categories_list %} | |
| <li><a href="#{{ category }}">{{ category | capitalize }} ({{ site.tags[category].size }})</a></li> | |
| {% endfor %} | |
| {% else %} | |
| {% for category in categories_list %} | |
| <li><a href="#{{ tag[0] }}">{{ category[0] | capitalize }} ({{ category[1].size }})</a></li> |
| {% comment %} | |
| * | |
| * Counter: This include counts your jekyll posts | |
| * | |
| {% endcomment %}{% assign counter = 1 %}{% for item in site.posts %}{% unless item.published == false %}{% assign counter=counter | plus:1 %}{% endunless %}{% endfor %}{{ counter }} |
| {% for c in site.collections %} | |
| {% assign docs=c[1].docs %} | |
| {% for doc in docs %} | |
| // do something | |
| {% endfor %} | |
| {% endfor %} |
| <h2>Categories</h2> | |
| <ul> | |
| {% assign categories_list = site.categories %} | |
| {% if categories_list.first[0] == null %} | |
| {% for category in categories_list %} | |
| <li><a href="#{{ category }}">{{ category | capitalize }} ({{ site.tags[category].size }})</a></li> | |
| {% endfor %} | |
| {% else %} | |
| {% for category in categories_list %} | |
| <li><a href="#{{ category[0] | downcase }}">{{ category[0] | capitalize }} ({{ category[1].size }})</a></li> |
A list of the most common functionalities in Jekyll (Liquid). You can use Jekyll with GitHub Pages, just make sure you are using the proper version.
Running a local server for testing purposes:
| {% assign sorted_cats = site.categories | sort %} | |
| {% for category in sorted_cats %} | |
| <!-- <p><a href="posts/{{ category | first }}">{{ category | first }}</a></p> --> | |
| <p><a href="post.html">{{ category | first }}</a></p> | |
| {% for posts in category %} | |
| {% for post in posts %} | |
| <li><a href="{{site.baseurl}}{{ post.url }}">{{ post.title }}</a></li> | |
| {% endfor %} | |
| {% endfor %} | |
| {% endfor %} |
Testest with PHP 5.6, 7.0, 7.1.
instantclient-basiclite-nt-12.2.0.1.0.zipc:\xampp\php| -- --------------------------------------- | |
| -- Generate Data | |
| -- --------------------------------------- | |
| CREATE table trans_history AS | |
| SELECT 'TRANS-A' AS transactions, '2017-08-30 08:00:00' AS history UNION ALL | |
| SELECT 'TRANS-A' AS transactions, '2017-08-30 08:10:00' AS history UNION ALL | |
| SELECT 'TRANS-A' AS transactions, '2017-08-30 08:20:00' AS history UNION ALL | |
| SELECT 'TRANS-A' AS transactions, '2017-08-30 08:30:00' AS history UNION ALL | |
| SELECT 'TRANS-A' AS transactions, '2017-08-30 08:40:00' AS history UNION ALL | |
| SELECT 'TRANS-A' AS transactions, '2017-08-30 08:50:00' AS history UNION ALL |