mirror of
https://github.com/snachodog/just-the-docs.git
synced 2025-04-15 15:42:24 -06:00
This PR has a bit of scope creep! This PR now: - changes the mermaid opt-in logic to only check for the existence of a `mermaid` key instead of `mermaid != false`: this resolves the follow-up in #857 - changes the behaviour of mermaid configuration - instead of using `mermaid_init.html` with default settings, makes the include `mermaid_config.js` - the include is loaded directly into the contents of `mermaid_initialize` - by default, it is an empty object (i.e. `{}`), triggering the defaults - updates docs - adds an example to the markdown kitchen sink It does significantly change the interface provided in #857, and I apologize for the confusion. However, given the discussion in this PR, I think it's the best move forward!
46 lines
1.4 KiB
HTML
46 lines
1.4 KiB
HTML
<head>
|
|
<meta charset="UTF-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
|
|
|
{% unless site.plugins contains "jekyll-seo-tag" %}
|
|
<title>{{ page.title }} - {{ site.title }}</title>
|
|
|
|
{% if page.description %}
|
|
<meta name="Description" content="{{ page.description }}">
|
|
{% endif %}
|
|
{% endunless %}
|
|
|
|
{% include favicon.html %}
|
|
|
|
<link rel="stylesheet" href="{{ '/assets/css/just-the-docs-default.css' | relative_url }}">
|
|
|
|
{% if site.ga_tracking != nil %}
|
|
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.ga_tracking }}"></script>
|
|
<script>
|
|
window.dataLayer = window.dataLayer || [];
|
|
function gtag(){dataLayer.push(arguments);}
|
|
gtag('js', new Date());
|
|
|
|
gtag('config', '{{ site.ga_tracking }}'{% unless site.ga_tracking_anonymize_ip == nil %}, { 'anonymize_ip': true }{% endunless %});
|
|
</script>
|
|
|
|
{% endif %}
|
|
|
|
{% if site.search_enabled != false %}
|
|
<script type="text/javascript" src="{{ '/assets/js/vendor/lunr.min.js' | relative_url }}"></script>
|
|
{% endif %}
|
|
|
|
{% if site.mermaid %}
|
|
<script src="https://cdn.jsdelivr.net/npm/mermaid@{{ site.mermaid.version }}/dist/mermaid.min.js"></script>
|
|
{% endif %}
|
|
|
|
<script type="text/javascript" src="{{ '/assets/js/just-the-docs.js' | relative_url }}"></script>
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
{% seo %}
|
|
|
|
{% include head_custom.html %}
|
|
|
|
</head>
|