ClickHouse/website/main.html

75 lines
2.8 KiB
HTML
Raw Normal View History

2020-03-30 08:25:29 +00:00
{# This file is an entrypoint for mkdocs theme, not an actual website page #}
{% set language = config.theme.language %}
{% set direction = config.theme.direction %}
{% set is_amp = config.extra.is_amp %}
{% set is_blog = config.extra.is_blog %}
2020-03-30 08:25:29 +00:00
{% set single_page = config.extra.single_page %}
{% set no_footer = True %}
{% set og_type = 'article' %}
2020-03-30 08:25:29 +00:00
{% if page and page.abs_url %}
{% set url = 'https://clickhouse.tech' + page.abs_url %}
{% endif %}
{% if page and page.canonical_url %}
{% set canonical_url = page.canonical_url %}
{% endif %}
2020-03-30 08:25:29 +00:00
{% if page and page.meta and page.meta.title %}
{% set title = page.meta.title %}
2020-06-22 18:27:15 +00:00
{% elif page and page.title and not page.is_homepage and (not page.title.startswith('hidden-')) %}
2020-05-22 11:16:24 +00:00
{% set title = page.title + ' | ' + config.site_name %}
2020-06-22 18:27:15 +00:00
{% elif page and page.title and not page.is_homepage and (not page.title.startswith('hidden-')) and page.ancestors %}
2020-05-22 11:16:24 +00:00
{% set title = (page.ancestors | first).title + ' | ' + config.site_name %}
2020-03-30 08:25:29 +00:00
{% else %}
{% set title = config.site_name %}
{% endif %}
{% set title = title.strip() %}
2020-03-30 08:25:29 +00:00
{% if page and page.content and not single_page %}
{% set description = page.content|striptags %}
{% set description = description.replace('¶','')[0:120] %}
{% endif %}
{% set data_version = config.extra.version_prefix or 'master' %}
{% set data_single_page = 'true' if config.extra.single_page else 'false' %}
{% if is_amp %}
{% include "templates/docs/amp.html" %}
{% else %}
{% if not is_blog %}
{% set extra_html_attrs = 'data-version="' + data_version + '" data-single-page="' + data_single_page + '"' %}
{% set extra_body_attrs = 'data-spy="scroll" data-target="#toc" data-offset="80"' %}
{% else %}
{% set extra_body_attrs = 'class="blog"' %}
{% endif %}
{% extends "templates/base.html" %}
{% block content %}
{% if not is_blog %}
{% include "templates/docs/nav.html" %}
<div class="container-fluid{% if direction == 'rtl' %} text-right{% endif %}">
<div class="row justify-content-end{% if not single_page %} justify-content-xl-center{% endif %}">
{% include "templates/docs/sidebar.html" %}
{% include "templates/docs/content.html" %}
{% if not config.extra.single_page %}
{% include "templates/docs/toc.html" %}
{% endif %}
</div>
</div>
{% else %}
{% include "templates/blog/nav.html" %}
<div class="container">
<div class="row">
{% include "templates/blog/content.html" %}
</div>
</div>
{% if page and page.meta.is_index %}
{% include "templates/index/community.html" %}
{% include "templates/blog/footer.html" %}
{% endif %}
{% endif %}
2020-03-30 08:25:29 +00:00
{% endblock %}
{% endif %}