Move categories to _data/
This commit is contained in:
parent
25a20171c6
commit
aa84c59dee
46
_config.yml
46
_config.yml
|
@ -1,6 +1,4 @@
|
|||
#
|
||||
# Jekyll configuration
|
||||
#
|
||||
|
||||
whitelist:
|
||||
- jekyll-redirect-from
|
||||
|
@ -18,11 +16,8 @@ exclude:
|
|||
- Gemfile.lock
|
||||
- CNAME
|
||||
- vendor
|
||||
- _deprecated
|
||||
|
||||
#
|
||||
# Markdown
|
||||
#
|
||||
|
||||
highlighter: false
|
||||
markdown: kramdown
|
||||
|
@ -33,9 +28,7 @@ kramdown:
|
|||
syntax_highlighter_opts:
|
||||
disable: true
|
||||
|
||||
#
|
||||
# Defaults
|
||||
#
|
||||
|
||||
defaults:
|
||||
- scope:
|
||||
|
@ -54,47 +47,12 @@ defaults:
|
|||
- elixir
|
||||
- ruby
|
||||
|
||||
#
|
||||
# Site info
|
||||
#
|
||||
|
||||
url: http://ricostacruz.com/cheatsheets
|
||||
title: Cheatsheets
|
||||
|
||||
#
|
||||
# Google analytics
|
||||
#
|
||||
#
|
||||
analytics:
|
||||
hostname: ricostacruz.com
|
||||
id: "UA-20473929-1"
|
||||
|
||||
#
|
||||
# Categories
|
||||
#
|
||||
|
||||
category_names:
|
||||
- Ansible
|
||||
- Apps
|
||||
- CLI
|
||||
- CSS
|
||||
- Devops
|
||||
- Elixir
|
||||
- Git
|
||||
- HTML
|
||||
- JavaScript
|
||||
- JavaScript libraries
|
||||
- Jekyll
|
||||
- Ledger
|
||||
- Markup
|
||||
- Node.js
|
||||
- Rails
|
||||
- React
|
||||
- Ruby
|
||||
- Ruby libraries
|
||||
- Vim
|
||||
- Fitness
|
||||
- Others
|
||||
|
||||
# GitHub metadata
|
||||
# https://help.github.com/articles/repository-metadata-on-github-pages/
|
||||
|
||||
repository: rstacruz/cheatsheets
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
enabled: true
|
||||
hostname: ricostacruz.com
|
||||
id: "UA-20473929-1"
|
|
@ -75,8 +75,8 @@
|
|||
{% endif %}
|
||||
|
||||
{%comment%}<!-- tags -->{%endcomment%}
|
||||
{% if page.tags[0] %}
|
||||
<meta content='{{ page.tags[0] }}' property='article:section'>
|
||||
{% if page.category %}
|
||||
<meta content='{{ page.category }}' property='article:section'>
|
||||
{% endif %}
|
||||
{% if page.tags %}
|
||||
{% for tag in page.tags %}
|
||||
|
@ -85,7 +85,7 @@
|
|||
{% endif %}
|
||||
|
||||
{%comment%}<!-- google analytics -->{%endcomment%}
|
||||
{% if site.analytics %}<script>if(~location.hostname.indexOf("{{site.analytics.hostname}}")){var _gaq=_gaq||[];_gaq.push(["_setAccount","{{ site.analytics.id }}"]);_gaq.push(["_trackPageview"]);(function(){var ga=document.createElement("script");ga.async=true;ga.src=("https:"==document.location.protocol?"https://ssl":"http://www")+".google-analytics.com/ga.js";var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(ga,s)})()}</script>{% endif %}
|
||||
{% if site.data.google_analytics.enabled %}<script>if(~location.hostname.indexOf("{{site.data.google_analytics.hostname}}")){var _gaq=_gaq||[];_gaq.push(["_setAccount","{{ site.data.google_analytics.id }}"]);_gaq.push(["_trackPageview"]);(function(){var ga=document.createElement("script");ga.async=true;ga.src=("https:"==document.location.protocol?"https://ssl":"http://www")+".google-analytics.com/ga.js";var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(ga,s)})()}</script>{% endif %}
|
||||
|
||||
<meta content='IE=edge' http-equiv='X-UA-Compatible'>
|
||||
<meta content='width=device-width, initial-scale=1.0' name='viewport'>
|
||||
|
|
|
@ -43,7 +43,7 @@ type: website
|
|||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% for category in site.category_names %}
|
||||
{% for category in site.data.category.names %}
|
||||
<h2 class='category item' id='{{ category | downcase | replace: " ", "-" }}' data-js-searchable-header>
|
||||
<span>{{ category }}</span>
|
||||
</h2>
|
||||
|
|
|
@ -4,7 +4,7 @@ html_class: home
|
|||
{% include head.html %}
|
||||
{% include site-header.html %}
|
||||
|
||||
{% for category in site.category_names %}
|
||||
{% for category in site.data.category.names %}
|
||||
<div class='pages-header'>
|
||||
<h2 id='{{ category | downcase | replace: " ", "-" }}'>{{ category }}</h2>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue