mirror of https://github.com/ByConity/ByConity
Work in progress on CLICKHOUSE-2720 & CLICKHOUSE-3067 (#1046)
* update presentations * CLICKHOUSE-2936: redirect from clickhouse.yandex.ru and clickhouse.yandex.com * update submodule * lost files * CLICKHOUSE-2981: prefer sphinx docs over original reference * CLICKHOUSE-2981: docs styles more similar to main website + add flags to switch language links * update presentations * Less confusing directory structure (docs -> doc/reference/) * Minify sphinx docs too * Website release script: fail fast + pass docker hash on deploy * Do not underline links in docs * shorter * cleanup docker images * tune nginx config * CLICKHOUSE-3043: get rid of habrastorage links * Lost translation * CLICKHOUSE-2936: temporary client-side redirect * behaves weird in test * put redirect back * CLICKHOUSE-3047: copy docs txts to public too * move to proper file * remove old pages to avoid confusion * Remove reference redirect warning for now * Refresh README.md * Yellow buttons in docs * Use svg flags instead of unicode ones in docs * fix test website instance * Put flags to separate files * wrong flag * Copy Yandex.Metrica introduction from main page to docs * Yet another home page structure change, couple new blocks (CLICKHOUSE-3045) * Update Contacts section * CLICKHOUSE-2849: more detailed legal information * CLICKHOUSE-2978 preparation - split by files * More changes in Contacts block * Tune texts on index page * update presentations * One more benchmark * Add usage sections to index page, adapted from slides * Get the roadmap started, based on slides from last ClickHouse Meetup * CLICKHOUSE-2977: some rendering tuning * Get rid of excessive section in the end of getting started * Make headers linkable * CLICKHOUSE-2981: links to editing reference - https://github.com/yandex/ClickHouse/issues/849 * CLICKHOUSE-2981: fix mobile styles in docs * Ban crawling of duplicating docs * Open some external links in new tab * Ban old docs too * Lots of trivial fixes in english docs * Lots of trivial fixes in russian docs * Remove getting started copies in markdown * Add Yandex.Webmaster * Fix some sphinx warnings * More warnings fixed in english docs * More sphinx warnings fixed * Add code-block:: text * More code-block:: text * These headers look not that well * Better switch between documentation languages * merge use_case.rst into ya_metrika_task.rst * Edit the agg_functions.rst texts * Add lost empty lines * Lost blank lines * Add new logo sizes * update presentations * Next step in migrating to new documentation * Fix all warnings in en reference * Fix all warnings in ru reference * Re-arrange existing reference * Move operation tips to main reference * Fix typos noticed by milovidov@ * Get rid of zookeeper.md * Looks like duplicate of tutorial.html * Fix some mess with html tags in tutorial * No idea why nobody noticed this before, but it was completely not clear whet to get the data * Match code block styling between main and tutorial pages (in favor of the latter) * Get rid of some copypaste in tutorial * Normalize header styles * Move example_datasets to sphinx * Move presentations submodule to website * Move and update README.md * No point in duplicating articles from habrahabr here * Move development-related docs as is for now * doc/reference/ -> docs/ (to match the URL on website) * Adapt links to match the previous commit * Adapt development docs to rst (still lacks translation and strikethrough support) * clean on release * blacklist presentations in gulp * strikethrough support in sphinx * just copy development folder for now * fix weird introduction in style article * Style guide translation (WIP) * Finish style guide translation to English * gulp clean separately * Update year in LICENSE * Initial CONTRIBUTING.md * Fix remaining links to old docs in tutorial * Some tutorial fixes * Typo * Another typo * Update list of authors from yandex-team accoding to git log * Fix diff with master * couple fixes in en what_is_clickhouse.rst * Try different link to blog in Russian * Swap words * Slightly larger line height * CLICKHOUSE-3089: disable hyphenation in docs * update presentations * Fix copying of txt files * update submodule * CLICKHOUSE-3108: fix overflow issues in mobile version * Less weird tutorial header in mobile version * CLICKHOUSE-3073: skip sourcemaps by default * CLICKHOUSE-3067: rename item in docs navigation * fix list markup * CLICKHOUSE-3067: some documentation style tuning * CLICKHOUSE-3067: less laggy single page documentation
This commit is contained in:
parent
10c14cfccb
commit
515a0f061f
|
@ -24,8 +24,8 @@ I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) ru
|
|||
default:
|
||||
$(SPHINXBUILD) -b html $(SPHINXOPTS) ru $(BUILDDIR)/docs/ru
|
||||
$(SPHINXBUILD) -b html $(SPHINXOPTS) en $(BUILDDIR)/docs/en
|
||||
SPHINX_TEMPLATES=../_singlehtml_templates $(SPHINXBUILD) -b singlehtml $(SPHINXOPTS) ru $(BUILDDIR)/docs/ru/single
|
||||
SPHINX_TEMPLATES=../_singlehtml_templates $(SPHINXBUILD) -b singlehtml $(SPHINXOPTS) en $(BUILDDIR)/docs/en/single
|
||||
$(SPHINXBUILD) -b singlehtml $(SPHINXOPTS) ru $(BUILDDIR)/docs/ru/single
|
||||
$(SPHINXBUILD) -b singlehtml $(SPHINXOPTS) en $(BUILDDIR)/docs/en/single
|
||||
|
||||
help:
|
||||
@echo "Please use \`make <target>' where <target> is one of"
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
<h3>{{ _('Navigation') }}</h3>
|
||||
{{ toctree(includehidden=theme_sidebar_includehidden, collapse=False) }}
|
||||
{% if theme_extra_nav_links %}
|
||||
<hr />
|
||||
<ul>
|
||||
{% for text, uri in theme_extra_nav_links.items() %}
|
||||
<li class="toctree-l1"><a href="{{ uri }}">{{ text }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
|
@ -1,23 +1,65 @@
|
|||
div.document, div.footer {
|
||||
div.document {
|
||||
margin: 20px auto 0 auto;
|
||||
}
|
||||
div.document,
|
||||
div.footer {
|
||||
width: 1240px;
|
||||
}
|
||||
div.sphinxsidebarwrapper {
|
||||
padding: 2px 10px;
|
||||
}
|
||||
div.body dd, div.body li, div.body p {
|
||||
div.body p {
|
||||
line-height: 1.6em;
|
||||
}
|
||||
div.body blockquote, div.body dd, div.body li, div.body p {
|
||||
div.body dd,
|
||||
div.body li {
|
||||
line-height: 1.2em;
|
||||
margin-bottom: 0.4em;
|
||||
}
|
||||
div.body blockquote,
|
||||
div.body dd,
|
||||
div.body li,
|
||||
div.body p {
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
-webkit-hyphens: none;
|
||||
hyphens: none;
|
||||
}
|
||||
input {
|
||||
padding: 2px;
|
||||
}
|
||||
div.sphinxsidebar #searchbox input[type="text"] {
|
||||
width: 190px;
|
||||
}
|
||||
div.sphinxsidebar #searchbox input[type="submit"],
|
||||
#search-form input[type="submit"] {
|
||||
padding: 4px 8px;
|
||||
}
|
||||
#searchbox, #extra-nav-links {
|
||||
margin: 20px 0;
|
||||
}
|
||||
ol ol ul,
|
||||
ol ul ul,
|
||||
ul ol ul,
|
||||
ul ul ul,
|
||||
ul ul,
|
||||
ol ul,
|
||||
div.sphinxsidebar ul ul,
|
||||
div.sphinxsidebar ul.want-points
|
||||
{
|
||||
list-style-type: disc;
|
||||
}
|
||||
blockquote {
|
||||
line-height: 1.4em;
|
||||
border-left: 4px solid #ccc;
|
||||
margin: 0;
|
||||
padding: 0 0 0 20px;
|
||||
}
|
||||
|
||||
div.sphinxsidebarwrapper p.logo {
|
||||
float: left;
|
||||
text-align: left;
|
||||
margin: -4px 4px 0 0;
|
||||
margin: -2px 6px 0 0;
|
||||
}
|
||||
|
||||
div.sphinxsidebar a {
|
||||
|
@ -26,7 +68,10 @@ div.sphinxsidebar a {
|
|||
}
|
||||
|
||||
pre {
|
||||
padding: 4px;
|
||||
padding: 6px;
|
||||
}
|
||||
code {
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
input {
|
||||
|
|
|
@ -72,7 +72,7 @@
|
|||
clickmap:true,
|
||||
trackLinks:true,
|
||||
accurateTrackBounce:true,
|
||||
webvisor:true
|
||||
webvisor: {% if builder != "singlehtml" %}true{% else %}false{% endif %}
|
||||
});
|
||||
} catch(e) { }
|
||||
});
|
||||
|
@ -93,5 +93,11 @@
|
|||
<div><img src="https://mc.yandex.ru/watch/18343495" style="position:absolute; left:-9999px;" alt=""/></div>
|
||||
</noscript>
|
||||
<!-- /Yandex.Metrika counter -->
|
||||
|
||||
{% if builder == "singlehtml" %}
|
||||
<script type="text/javascript" async="async">
|
||||
$(function() {
|
||||
$(".body").html({{ body|escapejs }});
|
||||
});
|
||||
</script>
|
||||
{% endif %}
|
||||
{%- endblock %}
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
{% if theme_extra_nav_links %}
|
||||
<ul id="extra-nav-links">
|
||||
{% for text, uri in theme_extra_nav_links.items() %}
|
||||
<li class="toctree-l1"><a href="{{ uri }}">{{ text }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{{ toctree(includehidden=theme_sidebar_includehidden, collapse=builder != "singlehtml") }}
|
|
@ -0,0 +1,6 @@
|
|||
{%- extends "layout.html" %}
|
||||
{% block body %}
|
||||
{% if builder != "singlehtml" %}
|
||||
{{ body }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
|
@ -0,0 +1,50 @@
|
|||
{%- extends "layout.html" %}
|
||||
{% set title = _('Search') %}
|
||||
{% set script_files = script_files + ['_static/searchtools.js'] %}
|
||||
{% block extrahead %}
|
||||
<script type="text/javascript">
|
||||
jQuery(function() { Search.loadIndex("{{ pathto('searchindex.js', 1) }}"); });
|
||||
</script>
|
||||
{# this is used when loading the search index using $.ajax fails,
|
||||
such as on Chrome for documents on localhost #}
|
||||
<script type="text/javascript" id="searchindexloader"></script>
|
||||
{{ super() }}
|
||||
{% endblock %}
|
||||
{% block body %}
|
||||
<h1 id="search-documentation">{{ _('Search') }}</h1>
|
||||
<div id="fallback" class="admonition warning">
|
||||
<script type="text/javascript">$('#fallback').hide();</script>
|
||||
<p>
|
||||
{% trans %}Please activate JavaScript to enable the search
|
||||
functionality.{% endtrans %}
|
||||
</p>
|
||||
</div>
|
||||
<p>
|
||||
{% trans %}From here you can search these documents. Enter your search
|
||||
words into the box below and click "search". Note that the search
|
||||
function will automatically search for all of the words. Pages
|
||||
containing fewer words won't appear in the result list.{% endtrans %}
|
||||
</p>
|
||||
<form id="search-form" action="" method="get">
|
||||
<input type="text" name="q" value="" />
|
||||
<input type="submit" value="{{ _('Search') }}" />
|
||||
<span id="search-progress" style="padding-left: 10px"></span>
|
||||
</form>
|
||||
{% if search_performed %}
|
||||
<h2>{{ _('Search Results') }}</h2>
|
||||
{% if not search_results %}
|
||||
<p>{{ _('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.') }}</p>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<div id="search-results">
|
||||
{% if search_results %}
|
||||
<ul>
|
||||
{% for href, caption, context in search_results %}
|
||||
<li><a href="{{ pathto(item.href) }}">{{ caption }}</a>
|
||||
<div class="context">{{ context|e }}</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
|
@ -0,0 +1,11 @@
|
|||
{%- if pagename != "search" and builder != "singlehtml" %}
|
||||
<div id="searchbox" style="display: none" role="search">
|
||||
<form class="search" action="{{ pathto('search') }}" method="get">
|
||||
<div><input type="text" name="q" placeholder="{{ _('Quick search') }}" /></div>
|
||||
<div><input type="submit" value="{{ _('Go') }}" /></div>
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">$('#searchbox').show(0);</script>
|
||||
{%- endif %}
|
|
@ -128,7 +128,7 @@ html_theme_options = {
|
|||
('Switch to Russian <img id="svg-flag" src="/docs/en/_static/ru.svg" width="20" height="12" />', '#ru'),
|
||||
('Single page documentation', '/docs/en/single/'),
|
||||
('Website home', '/'),
|
||||
('ClickHouse repository', 'https://github.com/yandex/ClickHouse'),
|
||||
('Source code', 'https://github.com/yandex/ClickHouse'),
|
||||
('Edit this page', '#edit'),
|
||||
])
|
||||
}
|
||||
|
@ -174,9 +174,9 @@ html_static_path = ['../_static']
|
|||
html_sidebars = {
|
||||
'**': [
|
||||
'about.html',
|
||||
'searchbox.html',
|
||||
'navigation.html',
|
||||
'relations.html',
|
||||
'searchbox.html',
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -292,5 +292,10 @@ texinfo_documents = [
|
|||
# If true, do not generate a @detailmenu in the "Top" node's menu.
|
||||
#texinfo_no_detailmenu = False
|
||||
|
||||
def add_filters(app):
|
||||
import json
|
||||
app.builder.templates.environment.filters[str('escapejs')] = lambda x: json.dumps(unicode(x))
|
||||
|
||||
def setup(app):
|
||||
app.add_javascript('custom.js')
|
||||
app.connect(str('builder-inited'), add_filters)
|
||||
|
|
|
@ -373,6 +373,7 @@ As an alternative, you can manually copy data from the ``/var/lib/clickhouse/dat
|
|||
``ALTER TABLE ... FREEZE PARTITION`` only copies data, not table metadata. To make a backup of table metadata, copy the file ``/var/lib/clickhouse/metadata/database/table.sql``
|
||||
|
||||
To restore from a backup:
|
||||
|
||||
* Use the CREATE query to create the table if it doesn't exist. The query can be taken from an .sql file (replace ATTACH in it with CREATE).
|
||||
* Copy data from the ``data/database/table/`` directory inside the backup to the ``/var/lib/clickhouse/data/database/table/detached/`` directory.
|
||||
* Run ``ALTER TABLE ... ATTACH PARTITION YYYYMM``queries where ``YYYYMM`` is the month, for every month.
|
||||
|
|
|
@ -128,7 +128,7 @@ html_theme_options = {
|
|||
('Switch to English <img id="svg-flag" src="/docs/ru/_static/en.svg" width="20" height="12" />', '#en'),
|
||||
('Документация на одной странице', '/docs/ru/single/'),
|
||||
('Главная страница сайта', '/'),
|
||||
('Репозиторий ClickHouse', 'https://github.com/yandex/ClickHouse'),
|
||||
('Исходный код', 'https://github.com/yandex/ClickHouse'),
|
||||
('Редактировать страницу', '#edit'),
|
||||
])
|
||||
}
|
||||
|
@ -174,9 +174,9 @@ html_static_path = ['../_static']
|
|||
html_sidebars = {
|
||||
'**': [
|
||||
'about.html',
|
||||
'searchbox.html',
|
||||
'navigation.html',
|
||||
'relations.html',
|
||||
'searchbox.html',
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -292,5 +292,10 @@ texinfo_documents = [
|
|||
# If true, do not generate a @detailmenu in the "Top" node's menu.
|
||||
#texinfo_no_detailmenu = False
|
||||
|
||||
def add_filters(app):
|
||||
import json
|
||||
app.builder.templates.environment.filters[str('escapejs')] = lambda x: json.dumps(unicode(x))
|
||||
|
||||
def setup(app):
|
||||
app.add_javascript('custom.js')
|
||||
app.connect(str('builder-inited'), add_filters)
|
||||
|
|
|
@ -379,6 +379,7 @@ ALTER
|
|||
``ALTER TABLE ... FREEZE PARTITION`` копирует только данные, но не метаданные таблицы. Чтобы сделать бэкап метаданных таблицы, скопируйте файл ``/var/lib/clickhouse/metadata/database/table.sql``
|
||||
|
||||
Для восстановления из бэкапа:
|
||||
|
||||
* создайте таблицу, если её нет, с помощью запроса CREATE. Запрос можно взять из .sql файла (замените в нём ``ATTACH`` на ``CREATE``);
|
||||
* скопируйте данные из директории data/database/table/ внутри бэкапа в директорию ``/var/lib/clickhouse/data/database/table/detached/``
|
||||
* выполните запросы ``ALTER TABLE ... ATTACH PARTITION YYYYMM``, где ``YYYYMM`` - месяц, для каждого месяца.
|
||||
|
|
|
@ -82,7 +82,7 @@ gulp.task('htmls', ['docs', 'docstxt'], function () {
|
|||
.pipe(gulp.dest(outputDir))
|
||||
});
|
||||
|
||||
gulp.task('scripts', ['docs'], function () {
|
||||
gulp.task('sourcemaps', ['docs'], function () {
|
||||
return gulp.src(paths.scripts)
|
||||
.pipe(sourcemaps.init())
|
||||
.pipe(uglify())
|
||||
|
@ -90,6 +90,12 @@ gulp.task('scripts', ['docs'], function () {
|
|||
.pipe(gulp.dest(outputDir))
|
||||
});
|
||||
|
||||
gulp.task('scripts', ['docs'], function () {
|
||||
return gulp.src(paths.scripts)
|
||||
.pipe(uglify())
|
||||
.pipe(gulp.dest(outputDir))
|
||||
});
|
||||
|
||||
gulp.task('styles', ['docs'], function () {
|
||||
return gulp.src(paths.styles)
|
||||
.pipe(cleanCss({inline: ['none']}))
|
||||
|
|
|
@ -244,12 +244,6 @@ a:hover, a:active {
|
|||
color: #ededed;
|
||||
}
|
||||
|
||||
#ubuntu-install {
|
||||
overflow: auto;
|
||||
overflow-y: hidden;
|
||||
-ms-overflow-y: hidden;
|
||||
}
|
||||
|
||||
#footer {
|
||||
text-align: right;
|
||||
padding: 8px 0 0 0;
|
||||
|
@ -266,6 +260,7 @@ pre {
|
|||
border-left: 5px solid #ffdb4d;
|
||||
padding: 5px 10px;
|
||||
background-color: #fff8e8;
|
||||
overflow: scroll;
|
||||
}
|
||||
|
||||
ul {
|
||||
|
@ -287,6 +282,10 @@ ul.dashed > li:before {
|
|||
text-indent: 1em;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.warranty {
|
||||
margin-top: 6em;
|
||||
font-size: 50%;
|
||||
|
@ -306,6 +305,13 @@ ul.dashed > li:before {
|
|||
border-bottom: 1px solid #08f;
|
||||
}
|
||||
|
||||
#tutorial_logo {
|
||||
float: left;
|
||||
margin-right: -100%;
|
||||
margin-top: 34px;
|
||||
margin-left: 3px;
|
||||
}
|
||||
|
||||
#tutorial_title {
|
||||
font: normal 100px 'Yandex Sans Display Web', Arial, sans-serif;
|
||||
margin-top: 25px;
|
||||
|
@ -460,4 +466,18 @@ ul.dashed > li:before {
|
|||
width: 100%;
|
||||
float: none;
|
||||
}
|
||||
|
||||
#tutorial_logo, #tutorial_title, #tutorial_subtitle {
|
||||
float: none;
|
||||
text-align: left;
|
||||
margin: 10px 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#tutorial_title {
|
||||
font-size: 75px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<div class="page">
|
||||
|
||||
<div>
|
||||
<div style="float: left; margin-right: -100%; margin-top: 34px; margin-left: 3px;">
|
||||
<div id="tutorial_logo">
|
||||
<a href="/">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="90" height="80" viewBox="0 0 9 8">
|
||||
<path class="red" d="M0,7 h1 v1 h-1 z"></path>
|
||||
|
|
Loading…
Reference in New Issue