From 4fc101def29a321b0f7c6887d198bf1d103ae4ff Mon Sep 17 00:00:00 2001 From: "Rico Sta. Cruz" Date: Fri, 13 Mar 2015 02:59:13 +0800 Subject: [PATCH] Update meta tags --- _/layouts/default.html | 1 + _/layouts/home.html | 2 +- _config.yml | 16 +----- _includes/about-the-site.html | 2 +- _includes/head.html | 72 +-------------------------- _includes/meta.html | 91 +++++++++++++++++++++++++++++++++++ _includes/site-header.html | 2 +- index.md | 4 +- jekyll.md | 1 + 9 files changed, 103 insertions(+), 88 deletions(-) create mode 100644 _includes/meta.html diff --git a/_/layouts/default.html b/_/layouts/default.html index 3a2d41110..9c748c94d 100644 --- a/_/layouts/default.html +++ b/_/layouts/default.html @@ -1,4 +1,5 @@ --- +type: article --- {% include head.html %} {% include site-header.html %} diff --git a/_/layouts/home.html b/_/layouts/home.html index 6f518a781..93c0bb3ea 100644 --- a/_/layouts/home.html +++ b/_/layouts/home.html @@ -6,7 +6,7 @@ html_class: home
{% for page in site.pages %} - + {{ page.title }} {{ page.url }} diff --git a/_config.yml b/_config.yml index bafade724..707a41dd0 100644 --- a/_config.yml +++ b/_config.yml @@ -11,14 +11,6 @@ kramdown: input: GFM hard_wrap: false parse_block_html: true - use_coderay: true - - coderay: - coderay_line_numbers: nil - coderay_line_numbers_start: 1 - coderay_tab_width: 4 - coderay_bold_every: 10 - coderay_css: class defaults: - scope: @@ -28,13 +20,9 @@ defaults: # Site info url: http://ricostacruz.com/cheatsheets -meta: - name: "Cheatsheets" - title: Cheatsheets - description: "A collection of cheatsheets I've written." - hostname: ricostacruz.com - author: Rico Sta. Cruz +title: Cheatsheets # Google analytics analytics: + hostname: ricostacruz.com id: "UA-20473929-1" diff --git a/_includes/about-the-site.html b/_includes/about-the-site.html index a8d87878e..2c77e7f61 100644 --- a/_includes/about-the-site.html +++ b/_includes/about-the-site.html @@ -1,7 +1,7 @@

- Cheatsheets is a collection of cheatsheets I've written over the years. + Cheatsheets is a collection of cheatsheets I've written over the years. Suggestions and corrections? Send them in. I'm Rico Sta. Cruz. diff --git a/_includes/head.html b/_includes/head.html index 74cefa7b8..2fa66a6e0 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -1,77 +1,9 @@ - - - {% if page.title %} - {{ page.title }} — {{ site.meta.title }} - - - - {% else %} - {{ site.meta.title }} - - - - {% endif %} - - {% if page.description %} - - - {% else if page.url == '/index.html' && site.meta.description %} - - - {% endif %} - - {% if page.url != '/index.html' %} - - - - - {% endif %} - - {% if page.author %} - {% for author in site.authors | where: "name", page.author %} - - {% if author.ogp %} - - {% endif %} - {% endfor %} - {% endif %} - {% if site.meta.title %} - - {% endif %} - {% if site.facebook.app_id %} - - {% endif %} - {% if site.facebook.admin %} - - {% endif %} - {% if page.date %} - - {% endif %} - {% if page.image %} - - - {% endif %} - - {% if page.tags[0] %} - - {% endif %} - {% if page.tags %} - {% for tag in page.tags %} - - {% endfor %} - {% endif %} - - - - - - {% if site.analytics %}{% endif %} - + {% include meta.html %} - +

diff --git a/_includes/meta.html b/_includes/meta.html new file mode 100644 index 000000000..b63d01385 --- /dev/null +++ b/_includes/meta.html @@ -0,0 +1,91 @@ + + +{%comment%}{%endcomment%} +{% assign base = '' %} +{% assign depth = page.url | split: '/' | size | minus: 1 %} +{% if depth == 1 %}{% assign base = '.' %} +{% elsif depth == 2 %}{% assign base = '..' %} +{% elsif depth == 3 %}{% assign base = '../..' %} +{% elsif depth == 4 %}{% assign base = '../../..' %}{% endif %} +{% assign timestamp = site.time | date: "%Y%m%d%H%M%S" %} + +{%comment%}{%endcomment%} +{% if page.full_title %} +{{ page.full_title }} + + + +{% elsif page.title %} +{{ page.title }} — {{ site.title }} + + + +{% else %} +{{ site.title }} + + + +{% endif %} + +{%comment%}{%endcomment%} +{% if page.description %} + + +{% endif %} + +{%comment%}{%endcomment%} +{% if page.url != '/index.html' %} + + + + +{% endif %} + +{%comment%}{%endcomment%} +{% if page.author %} +{% for author in site.authors | where: "name", page.author %} + + {% if author.ogp %} + + {% endif %} +{% endfor %} +{% endif %} + +{%comment%}{%endcomment%} +{% if site.title %} + +{% endif %} + +{%comment%}{%endcomment%} +{% if site.facebook.app_id %} + +{% endif %} +{% if site.facebook.admin %} + +{% endif %} + +{%comment%}{%endcomment%} +{% if page.date %} + +{% endif %} +{% if page.image %} + + +{% endif %} + +{%comment%}{%endcomment%} +{% if page.tags[0] %} + +{% endif %} +{% if page.tags %} +{% for tag in page.tags %} + +{% endfor %} +{% endif %} + +{%comment%}{%endcomment%} +{% if site.analytics %}{% endif %} + + + + diff --git a/_includes/site-header.html b/_includes/site-header.html index ada6e3312..f5dcec38c 100644 --- a/_includes/site-header.html +++ b/_includes/site-header.html @@ -1,6 +1,6 @@ diff --git a/index.md b/index.md index 8e5403908..47b169f7d 100644 --- a/index.md +++ b/index.md @@ -1,4 +1,6 @@ --- -title: Cheatsheets +full_title: "Cheatsheets — for web development and more" +description: "A collection of cheatsheets I've written." layout: home +type: website --- diff --git a/jekyll.md b/jekyll.md index 91e8507b6..ec640d6fe 100644 --- a/jekyll.md +++ b/jekyll.md @@ -145,6 +145,7 @@ Markup ### If {% if page.image.feature %} + {% else if xyz %} {% else %} {% endif %}