Skip to content

Commit

Permalink
Add parts of new Jekyll site.
Browse files Browse the repository at this point in the history
  • Loading branch information
rcurtin committed Mar 9, 2019
1 parent 73e7a3e commit 7320b0f
Show file tree
Hide file tree
Showing 104 changed files with 44,951 additions and 0 deletions.
7 changes: 7 additions & 0 deletions 404.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
layout: default
title: 404 - Page not found
---
404 - Page not found
====================
Sorry, we couldn’t find the requested URL. You can try again by going [back to the homepage]({{ site.baseurl }}).
17 changes: 17 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# frozen_string_literal: true

source "https://rubygems.org"

git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }

# gem "rails"

gem "jekyll", "~> 3.8"
gem "jekyll-paginate"
gem "jekyll-sitemap"
gem "jekyll-redirect-from"


gem "jekyll-watch", "~> 2.1"

gem "ruby_dep", "~> 1.5"
73 changes: 73 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.6.0)
public_suffix (>= 2.0.2, < 4.0)
colorator (1.1.0)
concurrent-ruby (1.1.4)
em-websocket (0.5.1)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
eventmachine (1.2.7)
ffi (1.10.0)
forwardable-extended (2.6.0)
http_parser.rb (0.6.0)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
jekyll (3.8.5)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (~> 0.7)
jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 2.0)
kramdown (~> 1.14)
liquid (~> 4.0)
mercenary (~> 0.3.3)
pathutil (~> 0.9)
rouge (>= 1.7, < 4)
safe_yaml (~> 1.0)
jekyll-paginate (1.1.0)
jekyll-redirect-from (0.14.0)
jekyll (~> 3.3)
jekyll-sass-converter (1.5.2)
sass (~> 3.4)
jekyll-sitemap (1.2.0)
jekyll (~> 3.3)
jekyll-watch (2.1.2)
listen (~> 3.0)
kramdown (1.17.0)
liquid (4.0.1)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
mercenary (0.3.6)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (3.0.3)
rb-fsevent (0.10.3)
rb-inotify (0.10.0)
ffi (~> 1.0)
rouge (3.3.0)
ruby_dep (1.5.0)
safe_yaml (1.0.4)
sass (3.7.3)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)

PLATFORMS
ruby

DEPENDENCIES
jekyll (~> 3.8)
jekyll-paginate
jekyll-redirect-from
jekyll-sitemap
jekyll-watch (~> 2.1)
ruby_dep (~> 1.5)

BUNDLED WITH
1.17.1
100 changes: 100 additions & 0 deletions _includes/anchor_headings.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
{% capture headingsWorkspace %}
{% comment %}
Version 1.0.3
https://github.com/allejo/jekyll-anchor-headings

"Be the pull request you wish to see in the world." ~Ben Balter

Usage:
{% include anchor_headings.html html=content %}

Parameters:
* html (string) - the HTML of compiled markdown generated by kramdown in Jekyll

Optional Parameters:
* beforeHeading (bool) : false - Set to true if the anchor should be placed _before_ the heading's content
* anchorBody (string) : '' - The content that will be placed inside the anchor; the `%heading%` placeholder is available
* anchorClass (string) : '' - The class(es) that will be used for each anchor. Separate multiple classes with a space
* anchorTitle (string) : '' - The `title` attribute that will be used for anchors
* h_min (int) : 1 - The minimum header level to build an anchor for; any header lower than this value will be ignored
* h_max (int) : 6 - The maximum header level to build an anchor for; any header greater than this value will be ignored
* bodyPrefix (string) : '' - Anything that should be inserted inside of the heading tag _before_ its anchor and content
* bodySuffix (string) : '' - Anything that should be inserted inside of the heading tag _after_ its anchor and content

Output:
The original HTML with the addition of anchors inside of all of the h1-h6 headings.
{% endcomment %}

{% assign minHeader = include.h_min | default: 1 %}
{% assign maxHeader = include.h_max | default: 6 %}
{% assign beforeHeading = include.beforeHeading %}
{% assign nodes = include.html | split: '<h' %}

{% capture edited_headings %}{% endcapture %}

{% for _node in nodes %}
{% capture node %}{{ _node | strip }}{% endcapture %}

{% if node == "" %}
{% continue %}
{% endif %}

{% assign nextChar = node | replace: '"', '' | strip | slice: 0, 1 %}
{% assign headerLevel = nextChar | times: 1 %}

<!-- If the level is cast to 0, it means it's not a h1-h6 tag, so let's try to fix it -->
{% if headerLevel == 0 %}
{% if nextChar != '<' and nextChar != '' %}
{% capture node %}<h{{ node }}{% endcapture %}
{% endif %}

{% capture edited_headings %}{{ edited_headings }}{{ node }}{% endcapture %}
{% continue %}
{% endif %}

{% assign _workspace = node | split: '</h' %}
{% assign _idWorkspace = _workspace[0] | split: 'id="' %}
{% assign _idWorkspace = _idWorkspace[1] | split: '"' %}
{% assign html_id = _idWorkspace[0] %}

{% capture _hAttrToStrip %}{{ _workspace[0] | split: '>' | first }}>{% endcapture %}
{% assign header = _workspace[0] | replace: _hAttrToStrip, '' %}

<!-- Build the anchor to inject for our heading -->
{% capture anchor %}{% endcapture %}

{% if html_id and headerLevel >= minHeader and headerLevel <= maxHeader %}
{% capture anchor %}href="#{{ html_id}}"{% endcapture %}

{% if include.anchorClass %}
{% capture anchor %}{{ anchor }} class="{{ include.anchorClass }}"{% endcapture %}
{% endif %}

{% if include.anchorTitle %}
{% capture anchor %}{{ anchor }} title="{{ include.anchorTitle | replace: '%heading%', header }}"{% endcapture %}
{% endif %}

{% capture anchor %}<a {{ anchor }}>{{ include.anchorBody | replace: '%heading%', header | default: '' }}</a>{% endcapture %}

<!-- In order to prevent adding extra space after a heading, we'll let the 'anchor' value contain it -->
{% if beforeHeading %}
{% capture anchor %}{{ anchor }} {% endcapture %}
{% else %}
{% capture anchor %} {{ anchor }}{% endcapture %}
{% endif %}
{% endif %}

{% capture new_heading %}
<h{{ _hAttrToStrip }}
{{ include.bodyPrefix }}
{% if beforeHeading %}
{{ anchor }}{{ header }}
{% else %}
{{ header }}{{ anchor }}
{% endif %}
{{ include.bodySuffix }}
</h{{ _workspace | last }}
{% endcapture %}
{% capture edited_headings %}{{ edited_headings }}{{ new_heading }}{% endcapture %}
{% endfor %}
{% endcapture %}{% assign headingsWorkspace = '' %}{{ edited_headings | strip }}
1 change: 1 addition & 0 deletions _includes/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<footer><span></span></footer>
20 changes: 20 additions & 0 deletions _includes/head-doc.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<head>
<!-- Meta -->
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="generator" content="Jekyll">

<title>{%if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
<meta name="description" content="{%if page.description %}{{ page.description }}{% else %}{{ site.description }}{% endif %}">

<!-- CSS & fonts -->
<link rel="stylesheet" href="{{ "/css/main.css" | prepend: site.baseurl | replace: '//', '/' }}">
<link rel="stylesheet" href="{{ "/css/docs.css" | prepend: site.baseurl | replace: '//', '/' }}">

<!-- RSS -->
<link href="/atom.xml" type="application/atom+xml" rel="alternate" title="ATOM Feed" />

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

</head>
19 changes: 19 additions & 0 deletions _includes/head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<head>
<!-- Meta -->
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="generator" content="Jekyll">

<title>{%if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
<meta name="description" content="{%if page.description %}{{ page.description }}{% else %}{{ site.description }}{% endif %}">

<!-- CSS & fonts -->
<link rel="stylesheet" href="{{ "/css/main.css" | prepend: site.baseurl | replace: '//', '/' }}">

<!-- RSS -->
<link href="/atom.xml" type="application/atom+xml" rel="alternate" title="ATOM Feed" />

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

</head>
5 changes: 5 additions & 0 deletions _includes/header-custom.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<header id="header">

<!-- Your custom header here -->

</header>
46 changes: 46 additions & 0 deletions _includes/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<div id="ens_header">
<div id="ens_header_row">
<div id="ens_header_cell_logo_img"><a href="{{ site.baseurl }}"><img
id="ens_logo_img" src="{{ site.baseurl }}/img/mlpack_logo.png" alt="ensmallen" align="top" border="0"></a></div>
<div id="ens_header_spacer"></div>
<div id="ens_header_cell_logo_txt"><big><big><b>mlpack</b></big><br>fast,
flexible C++ machine learning library</big></div>
</div>
</div>
<div id="nav-links">
<!-- Nav pages -->
{% assign sorted_pages = site.pages | sort:"order" %}
{% if page.layout == "docs" %}
{% for node in sorted_pages %}
{% if node.layout == "default-nav" or node.layout == "docs-nav" %}
{% if node.title == "Documentation" %}
<a href="{% if site.baseurl == "/" %}{{ node.url }}{% else %}{{ node.url | prepend: site.baseurl }}{% endif %}.html" class="active" title="{{ node.title }}">{{ node.title }}</a>
{% else %}
{% if node.title == "Home" %}
<a href="{% if site.baseurl == "/" %}{{ node.url }}{% else %}{{ node.url | prepend: site.baseurl }}{% endif %}" title="{{ node.title }}">{{ node.title }}</a>
{% else %}
<a href="{% if site.baseurl == "/" %}{{ node.url }}{% else %}{{ node.url | prepend: site.baseurl }}{% endif %}.html" title="{{ node.title }}">{{ node.title }}</a>
{% endif %}
{% endif %}
{% endif %}
{% endfor %}
{% else %}
{% for node in sorted_pages %}
{% if node.layout == "default-nav" or node.layout == "docs-nav" %}
{% if node.url == page.url %}
{% if node.title == "Home" %}
<a href="{% if site.baseurl == "/" %}{{ node.url }}{% else %}{{ node.url | prepend: site.baseurl }}{% endif %}" class="active" title="{{ node.title }}">{{ node.title }}</a>
{% else %}
<a href="{% if site.baseurl == "/" %}{{ node.url }}{% else %}{{ node.url | prepend: site.baseurl }}{% endif %}.html" class="active" title="{{ node.title }}">{{ node.title }}</a>
{% endif %}
{% else %}
{% if node.title == "Home" %}
<a href="{% if site.baseurl == "/" %}{{ node.url }}{% else %}{{ node.url | prepend: site.baseurl }}{% endif %}" title="{{ node.title }}">{{ node.title }}</a>
{% else %}
<a href="{% if site.baseurl == "/" %}{{ node.url }}{% else %}{{ node.url | prepend: site.baseurl }}{% endif %}.html" title="{{ node.title }}">{{ node.title }}</a>
{% endif %}
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
</div>
22 changes: 22 additions & 0 deletions _includes/mathjax.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{% if page.mathjax %}
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
processEscapes: true
}
});
</script>
<script
type="text/javascript"
charset="utf-8"
src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"
>
</script>
<script
type="text/javascript"
charset="utf-8"
src="https://vincenttam.github.io/javascripts/MathJaxLocal.js"
>
</script>
{% endif %}
30 changes: 30 additions & 0 deletions _includes/menu.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<nav {% if site.reverse == true %}id="nav-left"{% else %}id="nav"{% endif %}>
<div id="nav-list">
<!-- Nav pages -->
{% assign sorted_pages = site.pages | sort:"order" %}
{% for node in sorted_pages %}
{% if node.layout == "default-nav" %}
{% if node.url == page.url %}
{% if node.title == "Home" %}
<a href="{% if site.baseurl == "/" %}{{ node.url }}{% else %}{{ node.url | prepend: site.baseurl }}{% endif %}" class="active" title="{{ node.title }}">{{ node.title }}</a>
{% else %}
<a href="{% if site.baseurl == "/" %}{{ node.url }}{% else %}{{ node.url | prepend: site.baseurl }}{% endif %}.html" class="active" title="{{ node.title }}">{{ node.title }}</a>
{% endif %}
{% else %}
{% if node.title == "Home" %}
<a href="{% if site.baseurl == "/" %}{{ node.url }}{% else %}{{ node.url | prepend: site.baseurl }}{% endif %}" title="{{ node.title }}">{{ node.title }}</a>
{% else %}
<a href="{% if site.baseurl == "/" %}{{ node.url }}{% else %}{{ node.url | prepend: site.baseurl }}{% endif %}.html" title="{{ node.title }}">{{ node.title }}</a>
{% endif %}
{% endif %}
{% endif %}
{% endfor %}
</div>

<!-- Nav footer -->
{% if site.custom_nav_footer == true %}
{% include nav-footer-custom.html %}
{% else %}
{% include nav-footer.html %}
{% endif %}
</nav>
5 changes: 5 additions & 0 deletions _includes/nav-footer-custom.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<footer>

<!-- Your custom nav footer here -->

</footer>
5 changes: 5 additions & 0 deletions _includes/nav-footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<footer>

<span>version {{ site.version }}</span>

</footer>
1 change: 1 addition & 0 deletions _includes/script.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<script src="{{ "/js/main.js" | prepend: site.baseurl | replace: '//', '/' }}"></script>
Loading

0 comments on commit 7320b0f

Please sign in to comment.