c5180656cc
Steps to building docs locally: 1. Install Jekyll 2. cd docs 3. bundle exec jekyll serve --incremental 4. open local docs site at http://127.0.0.1:4000/ * basic Jekyll site * Add docs to documentation site * Update javadoc to allow for error free builds * Remove docs for rust dependencies * Better display examples, about and contributing documentation for Mentat * Version docs
46 lines
1.4 KiB
JavaScript
Executable file
46 lines
1.4 KiB
JavaScript
Executable file
window.jazzy = {'docset': false}
|
|
if (typeof window.dash != 'undefined') {
|
|
document.documentElement.className += ' dash'
|
|
window.jazzy.docset = true
|
|
}
|
|
if (navigator.userAgent.match(/xcode/i)) {
|
|
document.documentElement.className += ' xcode'
|
|
window.jazzy.docset = true
|
|
}
|
|
|
|
// On doc load, toggle the URL hash discussion if present
|
|
$(document).ready(function() {
|
|
if (!window.jazzy.docset) {
|
|
var linkToHash = $('a[href="' + window.location.hash +'"]');
|
|
linkToHash.trigger("click");
|
|
}
|
|
});
|
|
|
|
// On token click, toggle its discussion and animate token.marginLeft
|
|
$(".token").click(function(event) {
|
|
if (window.jazzy.docset) {
|
|
return;
|
|
}
|
|
var link = $(this);
|
|
var animationDuration = 300;
|
|
var tokenOffset = "15px";
|
|
var original = link.css('marginLeft') == tokenOffset;
|
|
link.animate({'margin-left':original ? "0px" : tokenOffset}, animationDuration);
|
|
$content = link.parent().parent().next();
|
|
$content.slideToggle(animationDuration);
|
|
|
|
// Keeps the document from jumping to the hash.
|
|
var href = $(this).attr('href');
|
|
if (history.pushState) {
|
|
history.pushState({}, '', href);
|
|
} else {
|
|
location.hash = href;
|
|
}
|
|
event.preventDefault();
|
|
});
|
|
|
|
// Dumb down quotes within code blocks that delimit strings instead of quotations
|
|
// https://github.com/realm/jazzy/issues/714
|
|
$("code q").replaceWith(function () {
|
|
return ["\"", $(this).contents(), "\""];
|
|
});
|