Merge pull request #1919 from BayoNet/master

Redirects and single_page -> single.
This commit is contained in:
alexey-milovidov 2018-02-16 23:08:31 +03:00 committed by GitHub
commit 9891c5379f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 7 deletions

View File

@ -7,16 +7,16 @@
<li class="md-nav__item md-nav__item--active">
<script type="text/javascript">
if (window.location.pathname.indexOf('/ru/') >= 0) {
if (window.location.pathname.indexOf('/single_page/') >= 0){
if (window.location.pathname.indexOf('/single/') >= 0){
document.write("<a href=\"{{ base_url }}/../index.html\" class=\"md-nav__link md-nav__link--active\">Многостраничная версия документации</a>")
}else{
document.write("<a href=\"{{ base_url }}/single_page/index.html\" class=\"md-nav__link md-nav__link--active\">Одностраничная версия документации</a>")
document.write("<a href=\"{{ base_url }}/single/index.html\" class=\"md-nav__link md-nav__link--active\">Одностраничная версия документации</a>")
}
}else{
if (window.location.pathname.indexOf('/single_page/') >= 0){
if (window.location.pathname.indexOf('/single/') >= 0){
document.write("<a href=\"{{ base_url }}/../index.html\" class=\"md-nav__link md-nav__link--active\">Multi page version of the document</a>")
}else{
document.write("<a href=\"{{ base_url }}/single_page/index.html\" class=\"md-nav__link md-nav__link--active\">Single page version of the document</a>")
document.write("<a href=\"{{ base_url }}/single/index.html\" class=\"md-nav__link md-nav__link--active\">Single page version of the document</a>")
}
}
</script>

View File

@ -1,7 +1,7 @@
site_name: ClickHouse docs
docs_dir: en_single_page
site_dir: build/docs/en/single_page
site_dir: build/docs/en/single
use_directory_urls: false
repo_name: 'yandex/ClickHouse'

View File

@ -1,7 +1,7 @@
site_name: Документация ClickHouse
docs_dir: ru_single_page
site_dir: build/docs/ru/single_page
site_dir: build/docs/ru/single
use_directory_urls: false
repo_name: 'yandex/ClickHouse'

View File

@ -1,6 +1,6 @@
server {
listen 80 default;
listen [::]:80 default ipv6only=on;
listen [::]:80 default ipv6only=on;
server_name localhost clickhouse.yandex test.clickhouse.yandex;
root /usr/share/nginx/html;
@ -16,6 +16,10 @@ server {
rewrite ^/docs/$ https://clickhouse.yandex/docs/en/ permanent;
rewrite ^/reference_en.html$ https://clickhouse.yandex/docs/en/single/ permanent;
rewrite ^/reference_ru.html$ https://clickhouse.yandex/docs/ru/single/ permanent;
if ( $uri !~ .*/index.html ){
rewrite ^/docs/(.*)/(.+)\.html$ /docs/$1/$2/ permanent;
}
}
server {