Skip to content

Commit 5d57a8d

Browse files
committed
First HTML jekyll setup
1 parent 14e73a1 commit 5d57a8d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+2644
-88
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
bin
2+
src
3+
dep
4+
doc

_config.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
auto: true
2+
server: true
3+
pygments: true
4+
markdown: redcarpet2

_includes/footer.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<div id="empty">&nbsp;</div>
2+
<div id="footer">
3+
</div>

_includes/guide_menu.html

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{{menu_item}}
2+
<ul id="top_left_menu">
3+
<h4>Guide</h4>
4+
<li><a href="/">Introduction</a></li>
5+
<li><a href="/connection">Connecting</a></li>
6+
<li><a href="/connection">Searching</a></li>
7+
<li><a href="/connection">Query DSL</a></li>
8+
<h4>Core</h4>
9+
<ul>
10+
<li><a href="/introduction">Index</a></li>
11+
<li><a href="/introduction">Delete</a></li>
12+
<li><a href="/introduction">Get</a></li>
13+
<li><a href="/introduction">Multi Get</a></li>
14+
<li><a href="/introduction">Update</a></li>
15+
<li><a href="/introduction">Search</a></li>
16+
<li><a href="/introduction">Multi Search</a></li>
17+
<li><a href="/introduction">Percolate</a></li>
18+
<li><a href="/introduction">Bulk</a></li>
19+
<li><a href="/introduction">Count</a></li>
20+
<li><a href="/introduction">Delete By Query</a></li>
21+
<li><a href="/introduction">More Like This</a></li>
22+
</ul>
23+
<h4>Indices</h4>
24+
<ul>
25+
<li><a href="">Aliases</a></li>
26+
<li><a href="">Analyze</a></li>
27+
<li><a href="">Create Index</a></li>
28+
<li><a href="">Delete Index</a></li>
29+
<li><a href="">Open/Close Index</a></li>
30+
<li><a href="">Get Settings</a></li>
31+
<li><a href="">Get Mapping</a></li>
32+
<li><a href="">Put Mapping</a></li>
33+
<li><a href="">Delete Mapping</a></li>
34+
<li><a href="">Refresh</a></li>
35+
<li><a href="">Optimize</a></li>
36+
<li><a href="">Flush</a></li>
37+
<li><a href="">Snapshot</a></li>
38+
<li><a href="">Update Settings</a></li>
39+
<li><a href="">Templates</a></li>
40+
<li><a href="">Stats</a></li>
41+
<li><a href="">Status</a></li>
42+
<li><a href="">Segments</a></li>
43+
<li><a href="">Clear Cache</a></li>
44+
<li><a href="">Indices Exists</a></li>
45+
</ul>
46+
<h4>Cluster</h4>
47+
<ul>
48+
<li><a href="">Health</a></li>
49+
<li><a href="">State</a></li>
50+
<li><a href="">Update Settings</a></li>
51+
<li><a href="">Nodes Info</a></li>
52+
<li><a href="">Nodes Stats</a></li>
53+
<li><a href="">Nodes Shutdown</a></li>
54+
55+
</ul>
56+
</ul>

_includes/header.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<h1 id="header">
2+
<a id="elasticsearch" href="/" title="elasticsearch home page">
3+
<span>elasticsearch.</span>
4+
</a>
5+
{% if page.cat %}
6+
<a id="section" href="/{{ page.cat }}" title="elasticsearch {{ page.cat }}">
7+
{{ page.cat }}
8+
</a>
9+
{% endif %}
10+
</h1>
11+
{% include top_left_menu.html %}

_includes/introduction.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# NEST
2+
3+
*Strongly typed Elasticsearch client*
4+
5+
NEST aims to be a .net client with a very concise API.
6+
7+
Indexing is as simple as:
8+
9+
var post = new Post() { Id = 12, ... }
10+
client.Index(post);
11+
12+
Indexing asynchronously is as easy as:
13+
14+
client.IndexAsync(post, (c) => /* called later */);
15+
16+
Searching is fluid:
17+
18+
var results = this.ConnectedClient.Search<ElasticSearchProject>(s => s
19+
.From(0)
20+
.Size(10)
21+
.Fields(f => f.Id, f => f.Name)
22+
.SortAscending(f => f.LOC)
23+
.SortDescending(f => f.Name)
24+
.Query(q=>q.Term(f=>f.Name, "NEST", Boost: 2.0))
25+
);
26+
27+
For more examples please refer to the [Wiki](https://github.com/Mpdreamz/NEST/wiki "Read more about NEST's interface")
28+
29+
* [Connecting](https://github.com/Mpdreamz/NEST/wiki/Connecting)
30+
* [Indexing](https://github.com/Mpdreamz/NEST/wiki/Index)
31+
* [Searching](https://github.com/Mpdreamz/NEST/wiki/Search)
32+
* [Faceting] (https://github.com/Mpdreamz/NEST/wiki/Faceting)
33+
* [Deleting](https://github.com/Mpdreamz/NEST/wiki/Delete)
34+
* [Mapping](https://github.com/Mpdreamz/NEST/wiki/Mapping)
35+
36+
37+
To get a good overview of the status of NEST please keep an eye out on the public [Roadmap](https://github.com/Mpdreamz/NEST/wiki/RoadMap)
38+
39+
## Copyright
40+
41+
Copyright (c) 2010 Martijn Laarman and everyone wonderful enough to contribute to [NEST](https://github.com/Mpdreamz/NEST)
42+
43+
A special shoutout to [@stephenpope](http://github.com/stephenpope) for allowing his port
44+
of the java factory based dsl [Rubber](http://github.com/stephenpope/Rubber) to be merged into NEST.
45+
NEST now has **two types of query dsl's** (lambda and factory based)!
46+
47+
Some of the other wonderful features in NEST were pushed by these wonderful folks:
48+
49+
* [@nordbergm](https://github.com/nordbergm/NEST)
50+
* [@kevingessner](https://github.com/kevingessner/NEST)
51+
* [@EFJoseph](https://github.com/EFJoseph/NEST)
52+
* [@pkrakowiak](https://github.com/pkrakowiak/NEST)
53+
* [@q42jaap] (https://github.com/q42jaap/NEST)
54+
55+
## License
56+
57+
NEST is licensed under [MIT](http://www.opensource.org/licenses/mit-license.php "Read more about the MIT license form"). Refer to [license.txt](https://github.com/Mpdreamz/NEST/blob/master/src/license.txt) for more information.

_includes/top_left_menu.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<ul id="top_left_menu">
2+
<h4>External</h4>
3+
<li><a href="http://www.elasticsearch.org" target="_blank">Elasticsearch Docs</a></li>
4+
<li><a href="http://mpdreamz.mit-license.org/" target="_blank">MIT license</a></li>
5+
</ul>

_layouts/default.html

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<!DOCTYPE html>
2+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
3+
<head>
4+
<title>NEST - {{ page.title }}</title>
5+
<meta http-equiv="cache-control" content="no-cache" />
6+
<meta http-equiv="pragma" content="no-cache" />
7+
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
8+
<meta http-equiv="expires" content="0">
9+
<meta name="description" content="elasticsearch" />
10+
<meta name="keywords" content="elastic, search, cloud, elasticsearch, indexing, lucene, distributed lucene, shay banon, .net, nest" />
11+
<meta name="author" content="martijn laarman" />
12+
13+
<link rel="stylesheet" type="text/css" href="/styles/layout.css">
14+
<link rel="stylesheet" type="text/css" href="/styles/pygments.css">
15+
<link href='http://fonts.googleapis.com/css?family=Ubuntu+Mono|Ubuntu' rel='stylesheet' type='text/css'>
16+
<link href="/prettify/prettify.css" type="text/css" rel="stylesheet" />
17+
<link href="/prettify/sunburst.css" type="text/css" rel="stylesheet" />
18+
<script type="text/javascript" src="/prettify/prettify.js"></script>
19+
<script src="http://code.jquery.com/jquery.min.js" type="text/javascript"></script>
20+
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery.templates/beta1/jquery.tmpl.js"></script>
21+
22+
</head>
23+
24+
<body onload="prettyPrint()">
25+
<section id="site">
26+
<aside>
27+
{% include top_left_menu.html %}
28+
</aside>
29+
30+
<section id="content" class="{{ page.cat}}">
31+
<aside id="menu">
32+
{% include guide_menu.html %}
33+
</aside>
34+
<article>
35+
<div id="content-margin-fix">
36+
{{content}}
37+
</div>
38+
<section>
39+
</article>
40+
</section>
41+
<a href="http://github.com/mpdreamz/nest"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png" alt="Fork me on GitHub" /></a>
42+
43+
44+
</body>
45+
</html>

_plugins/pre_to_code_hack.rb

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
require 'rubygems'
2+
require 'redcarpet'
3+
require 'fileutils'
4+
require 'digest/md5'
5+
require 'redcarpet'
6+
require 'albino'
7+
8+
class PreIsCode < Redcarpet::Render::HTML
9+
def block_quote(quote)
10+
quote.gsub!(/<pre>/,'<pre class="prettyprint"><code class="language-cs">')
11+
quote.gsub!(/<\/pre>/,'</code></pre>')
12+
end
13+
end
14+
15+
def from_markdown(text)
16+
markdown = Redcarpet::Markdown.new(PreIsCode,
17+
:fenced_code_blocks => true,
18+
:no_intra_emphasis => true,
19+
:autolink => true,
20+
:strikethrough => true,
21+
:lax_html_blocks => true,
22+
:superscript => true,
23+
:hard_wrap => false,
24+
:tables => true,
25+
:xhtml => false)
26+
27+
html = markdown.render(text)
28+
end
29+
30+
31+
PYGMENTS_CACHE_DIR = File.expand_path('../../_cache', __FILE__)
32+
FileUtils.mkdir_p(PYGMENTS_CACHE_DIR)
33+
34+
class Redcarpet2Markdown < Redcarpet::Render::HTML
35+
36+
end
37+
38+
class Jekyll::MarkdownConverter
39+
def extensions
40+
Hash[ *@config['redcarpet']['extensions'].map {|e| [e.to_sym, true] }.flatten ]
41+
end
42+
43+
def markdown
44+
@markdown ||= Redcarpet::Markdown.new(Redcarpet2Markdown.new(extensions), extensions)
45+
end
46+
47+
def convert(content)
48+
return super unless @config['markdown'] == 'redcarpet2'
49+
x = markdown.render(content)
50+
x.gsub!(/<pre>/,'<pre class="prettyprint"><code class="language-cs">')
51+
x.gsub!(/<\/pre>/,'</code></pre>')
52+
end
53+
end

0 commit comments

Comments
 (0)