Skip to content
Snippets Groups Projects
Commit 8897b066 authored by Séamus O'Sullivan's avatar Séamus O'Sullivan
Browse files

Add just-the-docs Gem.

Remove all the old just-the-docs components, and replace with a
dependency on the just-the-docs Ruby Gem (v0.10).
There is an outstanding issue with the flip cards on the home page, due
to modifications to JTD's scss which enabled this.
parent 1ed64bec
No related branches found
No related tags found
1 merge request!28Update Jekyll setup
Showing
with 4 additions and 413 deletions
---
layout: default
title: 404
permalink: /404
nav_exclude: true
search_exclude: true
---
<h1>Page not found</h1>
<p>The page you requested could not be found. Try using the navigation {% if site.search_enabled != false %}or search {% endif %}to find what you're looking for or go to this <a href="{{ '/' | relative_url }}">site's home page</a>.</p>
source "https://rubygems.org" source "https://rubygems.org"
gemspec
gem "webrick", "~> 1.7" gem "jekyll", "~> 4.3.0" # installed by `gem jekyll`
gem "just-the-docs", " ~> 0.10.0" # pinned to the current release
Dir.glob('lib/tasks/*.rake').each {|r| import r}
...@@ -177,3 +177,5 @@ compress_html: ...@@ -177,3 +177,5 @@ compress_html:
profile: false profile: false
# ignore: # ignore:
# envs: all # envs: all
theme: just-the-docs
<nav aria-label="Auxiliary" class="aux-nav">
<ul class="aux-nav-list">
{% for link in site.aux_links %}
<li class="aux-nav-list-item">
<a href="{{ link.last }}" class="site-button"
{% if site.aux_links_new_tab %}
target="_blank" rel="noopener noreferrer"
{% endif %}
>
{{ link.first }}
</a>
</li>
{% endfor %}
</ul>
</nav>
{% unless page.url == "/" %}
{% if page.parent %}
<nav aria-label="Breadcrumb" class="breadcrumb-nav">
<ol class="breadcrumb-nav-list">
{% if page.grand_parent %}
<li class="breadcrumb-nav-list-item"><a href="{{ first_level_url }}">{{ page.grand_parent }}</a></li>
<li class="breadcrumb-nav-list-item"><a href="{{ second_level_url }}">{{ page.parent }}</a></li>
{% else %}
<li class="breadcrumb-nav-list-item"><a href="{{ first_level_url }}">{{ page.parent }}</a></li>
{% endif %}
<li class="breadcrumb-nav-list-item"><span>{{ page.title }}</span></li>
</ol>
</nav>
{% endif %}
{% endunless %}
<hr>
{% include toc_heading_custom.html %}
<ul>
{% for child in include.toc_list %}
<li>
<a href="{{ child.url | relative_url }}">{{ child.title }}</a>{% if child.summary %} - {{ child.summary }}{% endif %}
</li>
{% endfor %}
</ul>
{% capture footer_custom %}
{%- include footer_custom.html -%}
{% endcapture %}
{% if footer_custom != "" or site.last_edit_timestamp or site.gh_edit_link %}
<hr>
<footer>
{% if site.back_to_top %}
<p><a href="#top" id="back-to-top">{{ site.back_to_top_text }}</a></p>
{% endif %}
{{ footer_custom }}
{% if site.last_edit_timestamp or site.gh_edit_link %}
<div class="d-flex mt-2">
{% if site.last_edit_timestamp and site.last_edit_time_format and page.last_modified_date %}
<p class="text-small text-grey-dk-000 mb-0 mr-2">
Page last modified: <span class="d-inline-block">{{ page.last_modified_date | date: site.last_edit_time_format }}</span>.
</p>
{% endif %}
{% if
site.gh_edit_link and
site.gh_edit_link_text and
site.gh_edit_repository and
site.gh_edit_branch and
site.gh_edit_view_mode
%}
<p class="text-small text-grey-dk-000 mb-0">
<a href="{{ site.gh_edit_repository }}/{{ site.gh_edit_view_mode }}/{{ site.gh_edit_branch }}{% if site.gh_edit_source %}/{{ site.gh_edit_source }}{% endif %}{% if page.collection and site.collections_dir %}/{{ site.collections_dir }}{% endif %}/{{ page.path }}" id="edit-this-page">{{ site.gh_edit_link_text }}</a>
</p>
{% endif %}
</div>
{% endif %}
</footer>
{% endif %}
<div id="main-header" class="main-header">
{% if site.search_enabled != false %}
{% include components/search_header.html %}
{% else %}
<div></div>
{% endif %}
{% include header_custom.html %}
{% if site.aux_links %}
{% include components/aux_nav.html %}
{% endif %}
</div>
<script>
var config = {% include mermaid_config.js %};
mermaid.initialize(config);
window.mermaid.init(undefined, document.querySelectorAll('.language-mermaid'));
</script>
{% if site.search.button %}
<a href="#" id="search-button" class="search-button">
<svg viewBox="0 0 24 24" class="icon"><use xlink:href="#svg-search"></use></svg>
</a>
{% endif %}
<div class="search-overlay"></div>
{% capture search_placeholder %}{% include search_placeholder_custom.html %}{% endcapture %}
<div class="search">
<div class="search-input-wrap">
<input type="text" id="search-input" class="search-input" tabindex="0" placeholder="{{ search_placeholder | strip_html | strip }}" aria-label="{{ search_placeholder | strip_html| strip }}" autocomplete="off">
<label for="search-input" class="search-label"><svg viewBox="0 0 24 24" class="search-icon"><use xlink:href="#svg-search"></use></svg></label>
</div>
<div id="search-results" class="search-results"></div>
</div>
<div class="side-bar">
<div class="site-header">
<a href="{{ '/' | relative_url }}" class="site-title lh-tight">{% include title.html %}</a>
<a href="#" id="menu-button" class="site-button">
<svg viewBox="0 0 24 24" class="icon"><use xlink:href="#svg-menu"></use></svg>
</a>
</div>
<nav aria-label="Main" id="site-nav" class="site-nav">
{% assign pages_top_size = site.html_pages
| where_exp:"item", "item.title != nil"
| where_exp:"item", "item.parent == nil"
| where_exp:"item", "item.nav_exclude != true"
| size %}
{% if pages_top_size > 0 %}
{% include nav.html pages=site.html_pages key=nil %}
{% endif %}
{%- if site.nav_external_links -%}
<ul class="nav-list">
{%- for node in site.nav_external_links -%}
<li class="nav-list-item external">
<a href="{{ node.url | absolute_url }}" class="nav-list-link external">
{{ node.title }}
{% unless node.hide_icon %}<svg viewBox="0 0 24 24" aria-labelledby="svg-external-link-title"><use xlink:href="#svg-external-link"></use></svg>{% endunless %}
</a>
</li>
{%- endfor -%}
</ul>
{%- endif -%}
{% if site.just_the_docs.collections %}
{% assign collections_size = site.just_the_docs.collections | size %}
{% for collection_entry in site.just_the_docs.collections %}
{% assign collection_key = collection_entry[0] %}
{% assign collection_value = collection_entry[1] %}
{% assign collection = site[collection_key] %}
{% if collection_value.nav_exclude != true %}
{% if collections_size > 1 or pages_top_size > 0 %}
{% if collection_value.nav_fold == true %}
<ul class="nav-list nav-category-list">
<li class="nav-list-item{% if page.collection == collection_key %} active{% endif %}">
{%- if collection.size > 0 -%}
<a href="#" class="nav-list-expander"><svg viewBox="0 0 24 24"><use xlink:href="#svg-arrow-right"></use></svg></a>
{%- endif -%}
<div class="nav-category">{{ collection_value.name }}</div>
{% include nav.html pages=collection key=collection_key %}
</li>
</ul>
{% else %}
<div class="nav-category">{{ collection_value.name }}</div>
{% include nav.html pages=collection key=collection_key %}
{% endif %}
{% else %}
{% include nav.html pages=collection key=collection_key %}
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
</nav>
{% capture nav_footer_custom %}
{%- include nav_footer_custom.html -%}
{% endcapture %}
{% if nav_footer_custom != "" %}
{{ nav_footer_custom }}
{% else %}
<footer class="site-footer">
This site uses <a href="https://github.com/just-the-docs/just-the-docs">Just the Docs</a>, a documentation theme for Jekyll.
</footer>
{% endif %}
</div>
{%- comment -%}
{% include css/callouts.scss.liquid color_scheme = string %}
produces SCSS for all the callouts in site.callouts. For the "dark"
color scheme, the levels of the text and background colors are reversed.
{%- endcomment -%}
{%- assign callout_background_hue = "000" -%}
{%- assign callout_color_hue = "300" -%}
{%- if site.callouts_level == "loud" or include.color_scheme == "dark" and site.callouts_level != "quiet" -%}
{%- assign callout_background_hue = "300" -%}
{%- assign callout_color_hue = "000" -%}
{%- endif -%}
div.opaque {
background-color: $body-background-color;
}
{%- for callout in site.callouts %}
{%- assign callout_opacity = callout[1].opacity | default: site.callouts_opacity | default: 0.2 -%}
p.{{ callout[0] }}, blockquote.{{ callout[0] }} {
background: rgba(${{ callout[1].color }}-{{ callout_background_hue }}, {{ callout_opacity }});
border-left: $border-radius solid ${{ callout[1].color }}-{{ callout_color_hue }};
border-radius: $border-radius;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 3px 10px rgba(0, 0, 0, 0.08);
padding: .8rem;
{% if callout[1].title %}
&::before {
color: ${{ callout[1].color }}-{{ callout_color_hue }};
content: "{{ callout[1].title }}";
display: block;
font-weight: bold;
text-transform: uppercase;
font-size: .75em;
padding-bottom: .125rem;
}
{% endif %}
> .{{ callout[0] }}-title {
color: ${{ callout[1].color }}-{{ callout_color_hue }};
display: block;
font-weight: bold;
text-transform: uppercase;
font-size: .75em;
padding-bottom: .125rem;
}
}
p.{{ callout[0] }}-title, blockquote.{{ callout[0] }}-title {
background: rgba(${{ callout[1].color }}-{{ callout_background_hue }}, {{ callout_opacity }});
border-left: $border-radius solid ${{ callout[1].color }}-{{ callout_color_hue }};
border-radius: $border-radius;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 3px 10px rgba(0, 0, 0, 0.08);
padding: .8rem;
> p:first-child {
margin-top: 0;
margin-bottom: 0;
color: ${{ callout[1].color }}-{{ callout_color_hue }};
display: block;
font-weight: bold;
text-transform: uppercase;
font-size: .75em;
padding-bottom: .125rem;
}
}
blockquote.{{ callout[0] }} {
margin-left: 0;
margin-right: 0;
> p:first-child {
margin-top: 0;
}
> p:last-child {
margin-bottom: 0;
}
}
blockquote.{{ callout[0] }}-title {
margin-left: 0;
margin-right: 0;
> p:nth-child(2) {
margin-top: 0;
}
> p:last-child {
margin-bottom: 0;
}
}
{% endfor -%}
@import "./custom/custom";
{% if site.logo %}
$logo: "{{ site.logo | relative_url }}";
{% endif %}
@import "./support/support";
@import "./custom/setup";
@import "./color_schemes/light";
@import "./color_schemes/{{ include.color_scheme }}";
@import "./modules";
{% include css/callouts.scss.liquid color_scheme = include.color_scheme %}
{% include css/custom.scss.liquid %}
{%- comment -%}
This file can be used to fix the HTML produced by Jekyll for highlighted
code with line numbers.
It works with `{% highlight some_language linenos %}...{% endhighlight %}`
and with the Kramdown option to add line numbers to fenced code.
The implementation was derived from the workaround provided by
Dmitry Hrabrov (DeXP) at
https://github.com/penibelst/jekyll-compress-html/issues/71#issuecomment-188144901
EXPLANATION
The HTML produced by Rouge highlighting with lie numbers is of the form
`code table`. Jekyll (<= 4.1.1) always wraps the highlighted HTML
with `pre`. This wrapping is not only unnecessary, but also transforms
the conforming HTML produced by Rouge to non-conforming HTML, which
results in HTML validation error reports.
The fix removes the outer `pre` tags whenever they contain the pattern
`<table class="rouge-table">`.
Apart from avoiding HTML validation errors, the fix allows the use of
the [Jekyll layout for compressing HTML](http://jch.penibelst.de),
which relies on `pre` tags not being nested, according to
https://github.com/penibelst/jekyll-compress-html/issues/71#issuecomment-172069842
USAGE
(Any names can be used for `some_var` and `some_language`.)
{% capture some_var %}
{% highlight some_language linenos %}
Some code
{% endhighlight %}
{% endcapture %}
{% include fix_linenos.html code=some_var %}
For code fences:
{% capture some_var %}
```some_language
Some code
```
{% endcapture %}
{% assign some_var = some_var | markdownify %}
{% include fix_linenos.html code=some_var %}
CAVEATS
The above does not work when `Some code` happens to contain the matched string
`<table class="rouge-table">`.
The use of this file overwrites the variable `fix_linenos_code` with `nil`.
{%- endcomment -%}
{% assign fix_linenos_code = include.code %}
{% if fix_linenos_code contains '<table class="rouge-table">' %}
{% assign fix_linenos_code = fix_linenos_code | replace: '<pre class="highlight">', '<pre>' %}
{% assign fix_linenos_code = fix_linenos_code | replace: "<pre><code", "<code" %}
{% assign fix_linenos_code = fix_linenos_code | replace: "</code></pre>", "</code>" %}
{% endif %}
{{ fix_linenos_code }}
{% assign fix_linenos_code = nil %}
{%- if site.footer_content -%}
<p class="text-small text-grey-dk-100 mb-0">{{ site.footer_content }}</p>
{%- endif -%}
<head>
<!-- <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> -->
<link href="//use.fontawesome.com/releases/v5.15.4/css/all.css" rel="stylesheet">
<!-- <link href="https://cdn.jsdelivr.net/npm/@fontawesome/fontawesome-free@5.15.4/css/fontawesome.min.css" rel="stylesheet"> -->
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<link rel="stylesheet" href="{{ '/assets/css/just-the-docs-default.css' | relative_url }}">
{% if site.ga_tracking != nil %}
{% assign ga_tracking_ids = site.ga_tracking | split: "," %}
<script async src="https://www.googletagmanager.com/gtag/js?id={{ ga_tracking_ids.first }}"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
{% for ga_property in ga_tracking_ids %}
gtag('config', '{{ ga_property }}'{% unless site.ga_tracking_anonymize_ip == nil %}, { 'anonymize_ip': true }{% endunless %});
{% endfor %}
</script>
{% endif %}
{% if site.search_enabled != false %}
<script src="{{ '/assets/js/vendor/lunr.min.js' | relative_url }}"></script>
{% endif %}
{% if site.mermaid %}
{% if site.mermaid.path %}
<script src="{{ site.mermaid.path | relative_url }}"></script>
{% else %}
<script src="https://cdn.jsdelivr.net/npm/mermaid@{{ site.mermaid.version }}/dist/mermaid.min.js"></script>
{% endif %}
{% endif %}
<script src="{{ '/assets/js/just-the-docs.js' | relative_url }}"></script>
<meta name="viewport" content="width=device-width, initial-scale=1">
{% for file in site.static_files %}
{% if file.path == site.favicon_ico or file.path == '/favicon.ico' %}
{% assign favicon = true %}
{% endif %}
{% endfor %}
{% if favicon %}
<link rel="icon" href="{{ site.favicon_ico | default: '/favicon.ico' | relative_url }}" type="image/x-icon">
{% endif %}
{% seo %}
{% include head_custom.html %}
</head>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment