{% include vars.html %} {% if jekyll.environment == "development" or include.render %} {% include utils/page-vars.html page=include.page %} {% capture vars %} page : {{page | inspect}} layout : {{layout | inspect}} page.layout : {{page.layout | inspect}} page.dir : {{page.dir | inspect}} page.name : {{page.name | inspect}} page.path : {{page.path | inspect}} page.url : {{page.url | inspect}} page:lang : {{page_lang | inspect}} page:url_base : {{page_url_base | inspect}} page:url_lang : {{page_url_lang | inspect}} page:url_relative : {{page_url_relative | inspect}} page:title : {{page_title | inspect}} page:description : {{page_description | inspect}} page:guide : {{page_guide | inspect}} {% endcapture %} {% if page.layout == "guide" %}

{% if include.title %} {{include.page.url}} - {{i18n[page_url_relative].title}} {% endif %}

{{vars | strip}}
{% unless page_title and page_title != "" %}
Internal Developer Warning: Missing Page Title

This page needs a title within the _data/i18n/:lang.yml file, like this:

"{{page_url_relative}}":
  title: "Example Title"
  description: "Example Description"
{% endunless %} {% unless page_description and page_description != "" %}
Internal Developer Warning: Missing Page Description

This page needs a description within the _data/i18n/:lang.yml file, like this:

"{{page_url_relative}}":
  title: "Example Title"
  description: "Example Description"
{% endunless %} {% endif %} {% if include.page.content contains '[TODO' %} {% if include.page.content %}
Internal Developer Info: [TODO] on page

This page contains some [TODO]'s, if you have time, please complete them

{% assign lines = include.page.content | newline_to_br | strip_newlines | split: '
' %} {% assign total = lines | size %} {% for i in (0..total) %} {% assign line = lines[i] %} {% if line contains '[TODO' %} {% assign message = '' %} {% assign start = i | minus: 3 %} {% assign end = i | plus: 3 %} {% if start < 0 %}{% assign start = 0 %}{% endif %} {% if end > total %}{% assign end = total %}{% endif %}
{% for n in (start..end) %}{{n}}: {{lines[n] | escape}}
{% endfor %}
{% endif %} {% endfor %}
{% endif %} {% endif %} {% if lang.tag == 'en' %} {% assign lines = include.page.content | newline_to_br | strip_newlines | split: '
' %} {% assign insideCodeBlock = false %} {% for line in lines %} {% assign threeChar = line | slice: 0, 3 %} {% assign firstChar = line | slice: 0, 1 %} {% if threeChar == '```' %} {% if insideCodeBlock %} {% assign insideCodeBlock = false %} {% else %} {% assign insideCodeBlock = true %} {% endif %} {% endif %} {% unless insideCodeBlock %} {% if firstChar == '#' %} {% assign stripped = line | strip_liquid_tags | strip_html %} {% assign slug = stripped | slugify | prepend: 'toc-' %} {% assign link = '' %} {% assign full = stripped | append: ' ' | append: link %} {% unless line contains link %}

Internal Developer Warning: Invalid TOC

This page contains this heading:

{{line | escape}}

All headings need a table of contents "toc" link, please use this exact one:

{{link | escape}}
{% endunless %} {% endif %} {% endunless %} {% endfor %} {% endif %} {% endif %}