Skip to content
This repository was archived by the owner on Jan 30, 2024. It is now read-only.

Commit 10214ef

Browse files
committed
Integrate Algolia search into website
1 parent e25bc25 commit 10214ef

14 files changed

Lines changed: 226 additions & 61 deletions

File tree

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
source 'https://rubygems.org'
22
gem 'github-pages', group: :jekyll_plugins
33
group :jekyll_plugins do
4-
gem 'algoliasearch-jekyll', '~> 0.7.0'
5-
end
4+
gem 'algoliasearch-jekyll', '~> 0.8.0'
5+
end

Gemfile.lock

Lines changed: 32 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
activesupport (5.0.0)
5-
concurrent-ruby (~> 1.0, >= 1.0.2)
4+
activesupport (4.2.7)
65
i18n (~> 0.7)
6+
json (~> 1.7, >= 1.7.7)
77
minitest (~> 5.1)
8+
thread_safe (~> 0.3, >= 0.3.4)
89
tzinfo (~> 1.1)
910
addressable (2.4.0)
10-
algoliasearch (1.10.0)
11-
httpclient (~> 2.7.1)
11+
algoliasearch (1.11.0)
12+
httpclient (~> 2.8.2)
1213
json (>= 1.5.1)
13-
algoliasearch-jekyll (0.7.0)
14+
algoliasearch-jekyll (0.8.0)
1415
algoliasearch (~> 1.4)
1516
appraisal (~> 2.1.0)
1617
awesome_print (~> 1.6)
@@ -26,36 +27,38 @@ GEM
2627
coffee-script-source
2728
execjs
2829
coffee-script-source (1.10.0)
29-
colorator (0.1)
30-
concurrent-ruby (1.0.2)
30+
colorator (1.1.0)
3131
ethon (0.9.0)
3232
ffi (>= 1.3.0)
3333
execjs (2.7.0)
3434
faraday (0.9.2)
3535
multipart-post (>= 1.2, < 3)
3636
ffi (1.9.14)
37+
forwardable-extended (2.6.0)
3738
gemoji (2.1.0)
38-
github-pages (87)
39-
github-pages-health-check (= 1.1.0)
40-
jekyll (= 3.1.6)
39+
github-pages (96)
40+
activesupport (= 4.2.7)
41+
github-pages-health-check (= 1.2.0)
42+
jekyll (= 3.2.1)
4143
jekyll-coffeescript (= 1.0.1)
4244
jekyll-feed (= 0.5.1)
4345
jekyll-gist (= 1.4.0)
4446
jekyll-github-metadata (= 2.0.2)
45-
jekyll-mentions (= 1.1.3)
47+
jekyll-mentions (= 1.2.0)
4648
jekyll-paginate (= 1.1.0)
4749
jekyll-redirect-from (= 0.11.0)
4850
jekyll-sass-converter (= 1.3.0)
4951
jekyll-seo-tag (= 2.0.0)
5052
jekyll-sitemap (= 0.10.0)
51-
jemoji (= 0.6.2)
53+
jemoji (= 0.7.0)
5254
kramdown (= 1.11.1)
5355
liquid (= 3.0.6)
5456
listen (= 3.0.6)
5557
mercenary (~> 0.3)
58+
minima (= 1.2.0)
5659
rouge (= 1.11.1)
5760
terminal-table (~> 1.4)
58-
github-pages-health-check (1.1.0)
61+
github-pages-health-check (1.2.0)
5962
addressable (~> 2.3)
6063
net-dns (~> 0.8)
6164
octokit (~> 4.0)
@@ -64,15 +67,16 @@ GEM
6467
html-pipeline (2.4.2)
6568
activesupport (>= 2)
6669
nokogiri (>= 1.4)
67-
httpclient (2.7.2)
70+
httpclient (2.8.2.4)
6871
i18n (0.7.0)
69-
jekyll (3.1.6)
70-
colorator (~> 0.1)
72+
jekyll (3.2.1)
73+
colorator (~> 1.0)
7174
jekyll-sass-converter (~> 1.0)
7275
jekyll-watch (~> 1.1)
7376
kramdown (~> 1.3)
7477
liquid (~> 3.0)
7578
mercenary (~> 0.3.3)
79+
pathutil (~> 0.9)
7680
rouge (~> 1.7)
7781
safe_yaml (~> 1.0)
7882
jekyll-coffeescript (1.0.1)
@@ -83,7 +87,8 @@ GEM
8387
jekyll-github-metadata (2.0.2)
8488
jekyll (~> 3.1)
8589
octokit (~> 4.0)
86-
jekyll-mentions (1.1.3)
90+
jekyll-mentions (1.2.0)
91+
activesupport (~> 4.0)
8792
html-pipeline (~> 2.3)
8893
jekyll (~> 3.0)
8994
jekyll-paginate (1.1.0)
@@ -94,9 +99,10 @@ GEM
9499
jekyll-seo-tag (2.0.0)
95100
jekyll (~> 3.1)
96101
jekyll-sitemap (0.10.0)
97-
jekyll-watch (1.4.0)
102+
jekyll-watch (1.5.0)
98103
listen (~> 3.0, < 3.1)
99-
jemoji (0.6.2)
104+
jemoji (0.7.0)
105+
activesupport (~> 4.0)
100106
gemoji (~> 2.0)
101107
html-pipeline (~> 2.2)
102108
jekyll (>= 3.0)
@@ -108,6 +114,7 @@ GEM
108114
rb-inotify (>= 0.9.7)
109115
mercenary (0.3.6)
110116
mini_portile2 (2.1.0)
117+
minima (1.2.0)
111118
minitest (5.9.0)
112119
multipart-post (2.0.0)
113120
net-dns (0.8.0)
@@ -116,6 +123,8 @@ GEM
116123
pkg-config (~> 1.1.7)
117124
octokit (4.3.0)
118125
sawyer (~> 0.7.0, >= 0.5.3)
126+
pathutil (0.14.0)
127+
forwardable-extended (~> 2.6)
119128
pkg-config (1.1.7)
120129
public_suffix (1.5.3)
121130
rake (11.2.2)
@@ -128,20 +137,22 @@ GEM
128137
sawyer (0.7.0)
129138
addressable (>= 2.3.5, < 2.5)
130139
faraday (~> 0.8, < 0.10)
131-
terminal-table (1.6.0)
140+
terminal-table (1.7.2)
141+
unicode-display_width (~> 1.1.1)
132142
thor (0.19.1)
133143
thread_safe (0.3.5)
134144
typhoeus (0.8.0)
135145
ethon (>= 0.8.0)
136146
tzinfo (1.2.2)
137147
thread_safe (~> 0.1)
148+
unicode-display_width (1.1.1)
138149
verbal_expressions (0.1.5)
139150

140151
PLATFORMS
141152
ruby
142153

143154
DEPENDENCIES
144-
algoliasearch-jekyll (~> 0.7.0)
155+
algoliasearch-jekyll (~> 0.8.0)
145156
github-pages
146157

147158
BUNDLED WITH

_config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ description: dkdeploy documentation
1212
baseurl: "" # the subpath of your site, e.g. /blog
1313
url: "https://dkdeploy.github.io" # the base hostname & protocol for your site
1414
twitter_username: dkd_de
15-
github_username: KieranHayes
15+
github_username: dkdeploy
1616
exclude: [foundation, vendor]
1717
# Build settings
1818
markdown: kramdown
1919
algolia:
2020
application_id: 'QOFNLOOCWH'
21-
index_name: 'dkdeploy_dev'
21+
index_name: 'dkdeploy_production'
2222
record_css_selector: 'p,ul,td,th,h3,code'

_includes/footer.html

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
<div class="row">
33
<div class="large-12 columns">
44
<div class="footer-content">
5-
<p>&copy 2016 <a href="https:/www.dkd.de/">dkd Internet Service GmbH</a> <i class="fi-heart animated"></i> <a href="mailto:opensource@dkd.de">opensource@dkd.de</a></p>
5+
<p>&copy; 2016 <a href="https://www.dkd.de/">dkd Internet Service GmbH</a> <i class="fi-heart animated"></i> <a href="mailto:opensource@dkd.de">opensource@dkd.de</a></p>
66
</div>
77
</div>
88
</div>
99
</footer>
1010
<script>
1111
window.ALGOLIA_CONFIG = {
1212
'applicationId': 'QOFNLOOCWH',
13-
'indexName': 'dkdeploy_dev',
13+
'indexName': 'dkdeploy_production',
1414
'apiKey': 'e51022a00302b50ec0f0fe226c460d5e',
1515
'baseurl': ''
1616
}
@@ -33,12 +33,19 @@
3333
<script src="//cdn.jsdelivr.net/hogan.js/3.0.2/hogan.min.js"></script>
3434
<script src="//cdn.jsdelivr.net/momentjs/2.10.3/moment.min.js"></script>
3535
<script src="{{ site.baseurl }}/assets/javascript/algolia.js"></script>
36-
36+
<script src="https://use.fontawesome.com/b5dbc25dd5.js"></script>
3737
<script type="text/javascript" src="{{ '/assets/javascript/toc2select.js' | prepend: site.url }}" defer></script>
3838
<script type="text/javascript">
3939
$(document).ready(function(){
4040
$(document).foundation();
41-
var toc2select = new DkdeployApp.Classes.toc2select("#main-content", "#js-toc", "<span class='toc-label'>Jump to</span>");
41+
var toc2select = new DkdeployApp.Classes.toc2select("#main-content", "#js-toc", '<span class="input-group-label"><i class="fa fa-anchor" aria-hidden="true"></i></span>');
4242
toc2select.render()
43+
44+
// Search
45+
$('.input-group-algolia input').on('focus', function(){
46+
$('.input-group-algolia').addClass("input-group-algolia-focus");
47+
}).on('focusout', function(){
48+
$('.input-group-algolia').removeClass('input-group-algolia-focus');
49+
});
4350
})
4451
</script>

_includes/head.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
<meta charset="utf-8">
33
<meta http-equiv="X-UA-Compatible" content="IE=edge">
44
<meta name="viewport" content="width=device-width, initial-scale=1">
5-
65
<title>dkdeploy | {% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
76
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
8-
<link rel="stylesheet" href="{{ "/assets/css/app.css" | prepend: site.url }}">
7+
<link rel="stylesheet" href="{{ "/assets/css/app.css" | prepend: site.url }}">
98
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
109
</head>

_includes/header.html

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,31 @@
1919
{% endfor %}
2020
</ul>
2121
</div>
22-
<div class="top-bar-right" id="js-toc"></div>
22+
<div class="top-bar-right">
23+
<ul class="menu">
24+
<li>
25+
<div class="input-group" id="js-toc">
26+
</div>
27+
</li>
28+
</ul>
29+
</div>
30+
<div class="top-bar-right">
31+
<ul class="menu">
32+
<li>
33+
<div class="input-group input-group-algolia">
34+
<span class="input-group-label"><i class="fa fa-search" aria-hidden="true"></i>
35+
</span>
36+
<input type="text" class="algolia__input js-algolia__input" autocomplete="off" name="query" placeholder="Search ..." />
37+
</div>
38+
</li>
39+
</ul>
40+
</div>
41+
2342
</div>
2443
</div>
2544
</div> <!-- end sticky-container -->
2645
<ul id="mobile-navigation" class="hide-for-medium vertical menu" data-responsive-menu="small-dropdown">
27-
<li class="menu-text"><a href="/"><img style="height: 24px; margin-left: -17px" src="/assets/images/3056-73126-dkdeploy-logo.svg"></a></li>
46+
<li class="menu-text"><a href="/"><img class="logo" alt="dkdeploy" title="dkdeploy" src="/assets/images/3056-73126-dkdeploy-logo.svg"></a></li>
2847
{% for nav in site.data.navigation %}
2948
{% if page.section == nav.section %}
3049
{% assign active = "active" %}

_layouts/default.html

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,8 @@
55
<div id="content" class="row">
66
{% include header.html %}
77
<div class="large-3 sidebar columns">
8-
<input type="text" class="algolia__input js-algolia__input" autocomplete="off" name="query" placeholder="Search in this site..." />
9-
108
<ul class="vertical menu docs-menu nav1">
119
{% assign current_path = page.url %}
12-
1310
{% for nav in site.data.navigation %}
1411
{% if page.section == nav.section %}
1512
{% capture current_nav %}{{nav.href}}{% endcapture %}
@@ -18,7 +15,6 @@
1815
{% else %}
1916
{% assign active = "" %}
2017
{% endif %}
21-
2218
<li class="docs-menu-title {{active}}">
2319
<a href="{{nav.href}}">{{nav.title}}</a>
2420
{% if nav.subnav2 != empty %}
@@ -34,7 +30,7 @@
3430
<div id="main-content" class="large-9 main-content columns">
3531
<div class="algolia__initial-content js-algolia__initial-content">{{ content }}</div>
3632
<div class="algolia__search-content js-algolia__search-content">
37-
<h2 class="page-title">Search</h2>
33+
<h3 class="page-title algolia">Search Results <span>powered by <a href="https://algolia.com/"><img alt="Algolia Search" title="Algolia Search" src="/assets/images/Algolia_logo_bg-white.svg"></a></span></h3>
3834
<div class="posts algolia__results"></div>
3935
</div>
4036
</div>

_layouts/startpage.html

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,14 @@
88
<div class="large-4 columns card-1" >
99
<div class="inner" data-equalizer-watch>
1010
<h3>Extended functionality</h3>
11-
<p>Beside all the great functionalities Capistrano provides out of the box, <b>dkdeploy</b> gives you
11+
<p>Beside all the great functionalities Capistrano provides out of the box, <b>dkdeploy</b> gives you </p>
1212
<ul>
1313
<li>Granular file permissions</li>
1414
<li>an extended Rollback Manager</li>
1515
<li>a Maintenance page during deployment</li>
1616
<li>a Copy strategy like on Capistrano 2.x</li>
1717
<li>Bower Integration</li>
1818
</ul>... and many more great features.
19-
</p>
2019
</div>
2120
</div>
2221
<div class="large-4 columns card-2">
@@ -39,20 +38,7 @@ <h3>PHP Ready!</h3>
3938
</div>
4039
</div>
4140
</div>
42-
<input type="text" class="algolia__input js-algolia__input" autocomplete="off" name="query" placeholder="Search in this site..." />
43-
44-
<div class="algolia__initial-content js-algolia__initial-content"></div>
45-
<div class="algolia__search-content js-algolia__search-content" style="background: #fff">
46-
<h2 class="page-title">Search</h2>
47-
<div class="posts algolia__results"></div>
48-
</div>
49-
</div>
50-
5141
</div>
52-
5342
{% include footer.html %}
54-
</div>
55-
5643
</body>
57-
5844
</html>

0 commit comments

Comments
 (0)