Skip to content

Commit

Permalink
[#105] Seo updates
Browse files Browse the repository at this point in the history
[#105] Seo updates
  • Loading branch information
khusnetdinov authored Dec 6, 2018
1 parent aab5fa1 commit 587e6bf
Show file tree
Hide file tree
Showing 22 changed files with 140 additions and 132 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ gem 'html-proofer'
gem 'scss_lint'

group :jekyll_plugins do
gem 'jekyll-assets'
gem 'jekyll-multiple-languages-plugin'
gem 'jekyll-sitemap'
end
15 changes: 15 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ GEM
ethon (0.11.0)
ffi (>= 1.3.0)
eventmachine (1.2.7)
extras (0.3.0)
forwardable-extended (~> 2.5)
fastimage (2.1.4)
ffi (1.9.25)
forwardable-extended (2.6.0)
html-proofer (3.9.2)
Expand Down Expand Up @@ -44,6 +47,14 @@ GEM
pathutil (~> 0.9)
rouge (>= 1.7, < 4)
safe_yaml (~> 1.0)
jekyll-assets (2.4.0)
concurrent-ruby (~> 1.0)
extras (~> 0.2)
fastimage (~> 2.0, >= 1.8)
jekyll (~> 3.1, >= 3.0)
pathutil (>= 0.8)
rack (~> 1.6)
sprockets (~> 3.3, < 3.8)
jekyll-feed (0.10.0)
jekyll (~> 3.3)
jekyll-multiple-languages-plugin (1.5.1)
Expand Down Expand Up @@ -95,6 +106,9 @@ GEM
scss_lint (0.57.0)
rake (>= 0.9, < 13)
sass (~> 3.5.5)
sprockets (3.7.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
thread_safe (0.3.6)
typhoeus (1.3.0)
ethon (>= 0.9.0)
Expand All @@ -108,6 +122,7 @@ PLATFORMS
DEPENDENCIES
html-proofer
jekyll (>= 3.7.4)
jekyll-assets
jekyll-multiple-languages-plugin
jekyll-sitemap
minima
Expand Down
15 changes: 15 additions & 0 deletions _config.production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ exclude_from_localizations: ['javascript', 'images', 'css']
markdown: kramdown
theme: minima
plugins:
- jekyll-assets
- jekyll-feed
- jekyll-multiple-languages-plugin
- jekyll-sitemap
Expand All @@ -26,3 +27,17 @@ counters:
webmaster: 'XXXXXXXXXXXXXXXX'
google:
analytics: 'XX-XXXXXXXXX-X'

assets:
destination: '/assets'
source_maps: false
compression: true
gzip: true
defaults:
js: { integrity: true }
css: { integrity: true }
img: { integrity: true }
caching:
path: '.jekyll-cache/assets'
type: memory
enabled: true
15 changes: 15 additions & 0 deletions _config.staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,21 @@ exclude_from_localizations: ['javascript', 'images', 'css']
markdown: kramdown
theme: minima
plugins:
- jekyll-assets
- jekyll-feed
- jekyll-multiple-languages-plugin
- jekyll-sitemap

assets:
destination: '/assets'
source_maps: false
compression: true
gzip: true
defaults:
js: { integrity: true }
css: { integrity: true }
img: { integrity: true }
caching:
path: '.jekyll-cache/assets'
type: memory
enabled: true
17 changes: 16 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ encoding: utf-8
collections:
pages:
output: true
permalink: /:path
permalink: /:slug

languages:
- en
Expand All @@ -14,6 +14,21 @@ exclude_from_localizations: ['javascript', 'images', 'css']
markdown: kramdown
theme: minima
plugins:
- jekyll-assets
- jekyll-feed
- jekyll-multiple-languages-plugin
- jekyll-sitemap

assets:
destination: '/assets'
source_maps: false
compression: true
gzip: false
defaults:
js: { integrity: false }
css: { integrity: false }
img: { integrity: false }
caching:
path: '.jekyll-cache/assets'
type: mempry
enabled: true
1 change: 1 addition & 0 deletions _i18n/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ sidebar:
- queue
- deque
- singly_linked_list
- doubly_linked_list
- ordered_list
- hash_table
- binary_tree
Expand Down
2 changes: 1 addition & 1 deletion _includes/algorithm_complexity_header.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<thead style="font-weight: bold; text-align: center">
<thead class="table complexity">
<tr>
<td>{% t pages.algorithms.complexity.best %}</td>
<td>{% t pages.algorithms.complexity.average %}</td>
Expand Down
2 changes: 1 addition & 1 deletion _includes/data_structure_complexity_header.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<thead style="font-weight: bold; text-align: center">
<thead style="table complexity">
<tr>
<td>Average Access</td>
<td>Average Search</td>
Expand Down
8 changes: 6 additions & 2 deletions _includes/head.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<title>{% t head.title %}</title>
{% assign key = page.url | remove_first: '/' %}
{% assign title = site.translations[site.lang].pages[key].title %}
<title>{% t head.title %} - {{ title }}</title>

<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
Expand All @@ -16,9 +18,11 @@
{% endif %}

<!-- Favicons -->
<!-- <link rel="shortcut icon" type="image/png" href="/favicon.png"> -->
<link rel="shortcut icon" type="image/png" href="/favicon.png">
<link rel="icon" href="/favicon.ico">

<link rel="canonical" href="{{ site.url }}{{ page.url | remove: 'index' }}">

<!-- Styles -->
<link rel="stylesheet" href="/css/main.css">

Expand Down
9 changes: 5 additions & 4 deletions _includes/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@
{%- endif -%}
{%- endcapture -%}
{% assign location = page.url | replace: '/', '' %}
{% assign link = link | replace: '_', '-' %}
{%- if location == link -%}
<li class='menu-item menu__submenus'>
<a class='menu__link menu__link--current' id='{{ link }}' href='{{ link }}'>{{ menu.title }}</a>
<a class='menu__link menu__link--current' id='{{ link }}' href='/{{ link }}'>{{ menu.title }}</a>
{%- else -%}
<li class='menu-item'>
<a class='menu__link' id='{{ link }}' href='{{ link }}'>{{ menu.title }}</a>
<a class='menu__link' id='{{ link }}' href='/{{ link }}'>{{ menu.title }}</a>
{%- endif -%}
<ul class="submenus">
{%- for submenu in menu.submenus -%}
Expand All @@ -35,15 +36,15 @@ <h4>{{ site.translations[site.lang].pages[menu.url][submenu.key].title }}</h4>
{% assign subs = submenu.submenus %}
{%- for sub in subs -%}
<li>
<a href="/{{ link }}#{{ sub }}">
<a href="/{{ link }}#{{ sub | replace: '_', '-' }}">
{{ site.translations[site.lang].pages[menu.url][submenu.key][sub].title }}
</a>
</li>
{%- endfor -%}
</ul>
{%- else -%}
<li>
<a href="/{{ link }}#{{ submenu }}">
<a href="/{{ link }}#{{ submenu | replace: '_', '-' }}">
{{ site.translations[site.lang].pages[menu.url][submenu].title }}
</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion _includes/sponsors/234x60.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<div class="sponsor-block with-size-234x60">
<a href="https://www.givemepoc.org"><img src="images/{{ site.lang }}/poc.png"/></a>
<a href="https://www.givemepoc.org"><img src="images/{{ site.lang }}/poc.png" alt="givmepoc.org"/></a>
</div>
36 changes: 18 additions & 18 deletions _pages/algorithms.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ <h2>{% t pages.algorithms.sorting.title %}</h2>
</article>

<article>
<h3 id="bubble_sort">{% t pages.algorithms.sorting.bubble_sort.title %}</h3>
<h3 id="bubble-sort">{% t pages.algorithms.sorting.bubble_sort.title %}</h3>
<p>{% t pages.algorithms.sorting.bubble_sort.description %}</p>
<table class="complexity" style="text-align: center">
<table class="complexity text-align-center">
{% include algorithm_complexity_header.html %}
<tbody>
<tr>
Expand Down Expand Up @@ -86,9 +86,9 @@ <h3 id="bubble_sort">{% t pages.algorithms.sorting.bubble_sort.title %}</h3>
</article>

<article>
<h3 id="insertion_sort">{% t pages.algorithms.sorting.insertion_sort.title %}</h3>
<h3 id="insertion-sort">{% t pages.algorithms.sorting.insertion_sort.title %}</h3>
<p>{% t pages.algorithms.sorting.insertion_sort.description %}</p>
<table class="complexity" style="text-align: center">
<table class="complexity text-align-center">
{% include algorithm_complexity_header.html %}
<tbody>
<tr>
Expand Down Expand Up @@ -128,9 +128,9 @@ <h3 id="insertion_sort">{% t pages.algorithms.sorting.insertion_sort.title %}</h
{% include sponsors/728x90.html %}

<article>
<h3 id="selection_sort">{% t pages.algorithms.sorting.selection_sort.title %}</h3>
<h3 id="selection-sort">{% t pages.algorithms.sorting.selection_sort.title %}</h3>
<p>{% t pages.algorithms.sorting.selection_sort.description %}</p>
<table class="complexity" style="text-align: center">
<table class="complexity text-align-center">
{% include algorithm_complexity_header.html %}
<tbody>
<tr>
Expand Down Expand Up @@ -185,9 +185,9 @@ <h3 id="selection_sort">{% t pages.algorithms.sorting.selection_sort.title %}</h
</article>

<article>
<h3 id="shell_sort">{% t pages.algorithms.sorting.shell_sort.title %}</h3>
<h3 id="shell-sort">{% t pages.algorithms.sorting.shell_sort.title %}</h3>
<p>{% t pages.algorithms.sorting.shell_sort.description %}</p>
<table class="complexity" style="text-align: center">
<table class="complexity text-align-center">
{% include algorithm_complexity_header.html %}
<tbody>
<tr>
Expand Down Expand Up @@ -229,9 +229,9 @@ <h3 id="shell_sort">{% t pages.algorithms.sorting.shell_sort.title %}</h3>
{% include sponsors/728x90.html %}

<article>
<h3 id="heap_sort">{% t pages.algorithms.sorting.heap_sort.title %}</h3>
<h3 id="heap-sort">{% t pages.algorithms.sorting.heap_sort.title %}</h3>
<p>{% t pages.algorithms.sorting.heap_sort.description %}</p>
<table class="complexity" style="text-align: center">
<table class="complexity text-align-center">
{% include algorithm_complexity_header.html %}
<tbody>
<tr>
Expand Down Expand Up @@ -287,9 +287,9 @@ <h3 id="heap_sort">{% t pages.algorithms.sorting.heap_sort.title %}</h3>
</article>

<article>
<h3 id="merge_sort">{% t pages.algorithms.sorting.merge_sort.title %}</h3>
<h3 id="merge-sort">{% t pages.algorithms.sorting.merge_sort.title %}</h3>
<p>{% t pages.algorithms.sorting.merge_sort.description %}</p>
<table class="complexity" style="text-align: center">
<table class="complexity text-align-center">
{% include algorithm_complexity_header.html %}
<tbody>
<tr>
Expand Down Expand Up @@ -327,9 +327,9 @@ <h3 id="merge_sort">{% t pages.algorithms.sorting.merge_sort.title %}</h3>
</article>

<article>
<h3 id="quick_sort">{% t pages.algorithms.sorting.quick_sort.title %}</h3>
<h3 id="quick-sort">{% t pages.algorithms.sorting.quick_sort.title %}</h3>
<p>{% t pages.algorithms.sorting.quick_sort.description %}</p>
<table class="complexity" style="text-align: center">
<table class="complexity text-align-center">
{% include algorithm_complexity_header.html %}
<tbody>
<tr>
Expand Down Expand Up @@ -382,10 +382,10 @@ <h2>{% t pages.algorithms.searching.title %}</h2>
</article>

<article>
<h3 id="binary_search">{% t pages.algorithms.searching.binary_search.title %}</h3>
<h3 id="binary-search">{% t pages.algorithms.searching.binary_search.title %}</h3>
<p>{% t pages.algorithms.searching.binary_search.description %}</p>
<table class="complexity" style="text-align: center">
<thead style="font-weight: bold; text-align: center">
<table class="table complexity text-align-center">
<thead>
<tr>
<td>{% t pages.algorithms.complexity.best %}</td>
<td>{% t pages.algorithms.complexity.average %}</td>
Expand Down Expand Up @@ -437,7 +437,7 @@ <h3 id="binary_search">{% t pages.algorithms.searching.binary_search.title %}</h
{% include sponsors/728x90.html %}

<article>
<h3 id="knuth_moriss_pratt_search">{% t pages.algorithms.searching.knuth_moriss_pratt_search.title %}</h3>
<h3 id="knuth-moriss-pratt-search">{% t pages.algorithms.searching.knuth_moriss_pratt_search.title %}</h3>
<p>{% t pages.algorithms.searching.knuth_moriss_pratt_search.description %}</p>
<a href="https://en.wikipedia.org/wiki/Binary_search_algorithm">{% t pages.wiki %}</a>
</article>
Expand Down
Loading

0 comments on commit 587e6bf

Please sign in to comment.