Skip to content

Commit bf45275

Browse files
committed
WIP: Grand site structure refactoring
* Getting rid of Pelican - merge codebases (css, js). removed a lot of garbage - ported pages from pelican to sphinx - /en and /ru now, rules must be configurated in nginx - Create plugins for dropdown menus and sections () * Extract theme to separate directory (for reuse in other projects) * Add Less for CSS preprocessing * A lot of little style refactoring and fixes * Embed try page into site (using iframe) * Embed rocks page into site (using custom python gen + lupa extension) TODO: * Review mobile and tablet design, again A lot of style fixes. sphinx-webserver, sphinx-linkcheck. becnhmarks/careers/doc pages. page buttons. closes gh-78 closes gh-55 closes gh-82 closes gh-81 closes gh-66 closes gh-68 closes gh-2
1 parent 40ce9ef commit bf45275

File tree

355 files changed

+8407
-25850
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

355 files changed

+8407
-25850
lines changed

.gitignore

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@ CMakeCache.txt
22
CMakeFiles
33
Makefile
44
cmake_install.cmake
5-
sphinx/locale/ru/LC_MESSAGES/*.mo
5+
locale/ru/LC_MESSAGES/*.mo
66
.DS_Store
7-
sphinx/_html_ru_build/
8-
sphinx/_single_ru_build/
7+
_*_build/
98
deploy_key
9+
.venv
10+
output
11+
*.pyc
12+
_theme/tarantool/static/design.css.map

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "rocks"]
2+
path = rocks
3+
url = https://github.com/tarantool/rocks
File renamed without changes.

.travis.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,21 @@
11
language: generic # don't install any environment
2+
sudo: true
3+
4+
addons:
5+
apt:
6+
sources:
7+
- george-edison55-precise-backports
8+
packages:
9+
- cmake
10+
- cmake-data
11+
- lua5.1
12+
213
install:
3-
- pip install sphinx==1.4.4 pelican BeautifulSoup sphinx-intl PyYAML --user
14+
- cmake --version
15+
- pip install -r requirements.txt --upgrade
16+
417
script: bash ./documentation.sh
18+
519
env:
620
global:
721
- ENCRYPTION_LABEL: "cc37864fc395"
8-

CMakeLists.txt

Lines changed: 120 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
cmake_minimum_required(VERSION 2.8)
1+
cmake_minimum_required(VERSION 2.8.12)
22

3-
project(tarantoold-doc)
3+
project(tarantool-doc)
44

55
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
66
set(CMAKE_INCLUDE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_INCLUDE_PATH})
@@ -9,11 +9,9 @@ include(FindOptionalPackage)
99
include(FindPackageMessage)
1010

1111
include(cmake/FindSphinx.cmake)
12+
find_package(Sphinx REQUIRED)
1213

13-
#
1414
# Get version
15-
#
16-
1715
set (PACKAGE_VERSION "")
1816
set (TARANTOOL_VERSION "")
1917

@@ -30,9 +28,7 @@ if (NOT TARANTOOL_VERSION)
3028
message (FATAL_ERROR "Unable to retrive version from git or ${VERSION_FILE} file.")
3129
endif()
3230

33-
#
3431
# Split full version (git describe --long) to get components
35-
#
3632
string(REPLACE "-" "." TARANTOOL_VERSION_LIST ${TARANTOOL_VERSION})
3733
string(REPLACE "." ";" TARANTOOL_VERSION_LIST ${TARANTOOL_VERSION_LIST})
3834
LIST(GET TARANTOOL_VERSION_LIST 0 CPACK_PACKAGE_VERSION_MAJOR)
@@ -47,5 +43,120 @@ find_package_message(TARANTOOL_VERSION
4743
"Tarantool version is ${TARANTOOL_VERSION} (${PACKAGE_VERSION})"
4844
"${PACKAGE_VERSION}")
4945

50-
add_subdirectory(sphinx)
51-
add_subdirectory(www)
46+
set(SPHINX_BUILD_SINGLEHTML_DIR "${CMAKE_CURRENT_BINARY_DIR}/_single_build/")
47+
set(SPHINX_BUILD_HTML_DIR "${CMAKE_CURRENT_BINARY_DIR}/_html_build/")
48+
set(SPHINX_BUILD_LOCALE_DIR "${CMAKE_CURRENT_BINARY_DIR}/_locale_build/")
49+
set(SPHINX_BUILD_SINGLEHTML_RU_DIR "${CMAKE_CURRENT_BINARY_DIR}/_single_ru_build/")
50+
set(SPHINX_BUILD_HTML_RU_DIR "${CMAKE_CURRENT_BINARY_DIR}/_html_ru_build/")
51+
set(SPHINX_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/output")
52+
set(SPHINX_EN_HTML_DIR "${SPHINX_OUTPUT_DIR}/en/")
53+
set(SPHINX_RU_HTML_DIR "${SPHINX_OUTPUT_DIR}/ru/")
54+
55+
add_custom_target(update-submodules ALL
56+
COMMAND git submodule update --init --recursive
57+
COMMENT "Update submodules before building docs"
58+
)
59+
add_custom_target(sphinx-html ALL
60+
COMMAND "${SPHINX_EXECUTABLE}"
61+
-b html
62+
-d "${SPHINX_BUILD_HTML_DIR}"
63+
-c html/
64+
"${CMAKE_CURRENT_SOURCE_DIR}"
65+
"${SPHINX_EN_HTML_DIR}"
66+
COMMENT "Building HTML documentation with Sphinx"
67+
DEPENDS update-submodules
68+
)
69+
70+
add_custom_target(sphinx-singlehtml ALL
71+
COMMAND "${SPHINX_EXECUTABLE}"
72+
-b singlehtml
73+
-d "${SPHINX_BUILD_SINGLEHTML_DIR}"
74+
-c singlehtml/
75+
"${CMAKE_CURRENT_SOURCE_DIR}"
76+
"${SPHINX_EN_HTML_DIR}/doc"
77+
doc/singlehtml.rst
78+
COMMENT "Building HTML documentation with Sphinx"
79+
DEPENDS update-submodules
80+
)
81+
82+
add_custom_target(sphinx-html-ru ALL
83+
COMMAND "${SPHINX_EXECUTABLE}"
84+
-b html
85+
-d "${SPHINX_BUILD_HTML_RU_DIR}"
86+
-c html/
87+
"${CMAKE_CURRENT_SOURCE_DIR}"
88+
"${SPHINX_RU_HTML_DIR}"
89+
-Dlanguage=ru
90+
COMMENT "Building HTML documentation with Sphinx"
91+
DEPENDS update-submodules
92+
)
93+
94+
add_custom_target(sphinx-singlehtml-ru ALL
95+
COMMAND "${SPHINX_EXECUTABLE}"
96+
-b singlehtml
97+
-d "${SPHINX_BUILD_SINGLEHTML_RU_DIR}"
98+
-c singlehtml/
99+
"${CMAKE_CURRENT_SOURCE_DIR}"
100+
"${SPHINX_RU_HTML_DIR}/doc"
101+
doc/singlehtml.rst
102+
-Dlanguage=ru
103+
COMMENT "Building HTML documentation with Sphinx"
104+
DEPENDS update-submodules
105+
)
106+
107+
add_custom_target(sphinx-update-pot
108+
COMMAND "${SPHINX_EXECUTABLE}"
109+
-b gettext
110+
-d "${SPHINX_BUILD_LOCALE_DIR}"
111+
-c locale/
112+
"${CMAKE_CURRENT_SOURCE_DIR}"
113+
"${CMAKE_CURRENT_SOURCE_DIR}/locale"
114+
COMMENT "Generate localization templates"
115+
)
116+
117+
add_custom_target(sphinx-update-po
118+
COMMAND "${SPHINX_INTL_EXECUTABLE}"
119+
update
120+
-p ${CMAKE_CURRENT_SOURCE_DIR}/locale
121+
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
122+
COMMENT "Regenerate localization files from templates"
123+
DEPENDS sphinx-update-pot
124+
)
125+
126+
add_custom_target(sphinx-linkcheck
127+
COMMAND "${SPHINX_EXECUTABLE}"
128+
-b linkcheck
129+
-d "${SPHINX_BUILD_LOCALE_DIR}"
130+
-c html
131+
"${CMAKE_CURRENT_SOURCE_DIR}"
132+
"${SPHINX_BUILD_HTML_DIR}"
133+
COMMENT "Linkcheck filter"
134+
)
135+
136+
add_custom_target(sphinx-webserver
137+
COMMAND screen -dmS sphinx-webserver python -m SimpleHTTPServer 8000
138+
WORKING_DIRECTORY ${SPHINX_OUTPUT_DIR})
139+
140+
set(STATIC_FILES
141+
.nojekyll
142+
CNAME
143+
robots.txt
144+
_downloads/license.docx
145+
_downloads/license_eng.docx
146+
_downloads/terms.docx
147+
_downloads/terms_eng.docx
148+
)
149+
150+
add_custom_target(copy-static ALL
151+
COMMENT "Copy static files")
152+
foreach(FILE_PATH ${STATIC_FILES})
153+
get_filename_component(FILE_DIR ${FILE_PATH} DIRECTORY)
154+
add_custom_command(TARGET copy-static PRE_BUILD
155+
COMMAND ${CMAKE_COMMAND} -E make_directory
156+
${SPHINX_OUTPUT_DIR}/${FILE_DIR})
157+
add_custom_command(TARGET copy-static PRE_BUILD
158+
COMMAND ${CMAKE_COMMAND} -E copy
159+
${CMAKE_CURRENT_SOURCE_DIR}/${FILE_PATH}
160+
${SPHINX_OUTPUT_DIR}/${FILE_PATH}
161+
)
162+
endforeach()

www/content/CNAME renamed to CNAME

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

_theme/tarantool/_less/Makefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
all:
2+
lessc --source-map --source-map-less-inline --strict-imports \
3+
--autoprefix="last 3 versions" \
4+
design.less design.css
5+
cleancss --s1 design.css > design.min.css
6+
mv design.min.css design.css
7+
mv design.css** ../static/
8+
9+
debug:
10+
lessc --source-map --source-map-less-inline --strict-imports \
11+
--autoprefix="last 3 versions" \
12+
design.less ../static/design.css

_theme/tarantool/_less/base.less

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
html {
2+
height:100%;
3+
font-size:100%;
4+
overflow-y: scroll;
5+
-webkit-text-size-adjust:100%;
6+
-ms-text-size-adjust:100%;
7+
-webkit-font-smoothing:antialiased;
8+
}
9+
body {
10+
font-family: "Helvetica Neue", Arial, Tahoma, Verdana;
11+
font-size:1em;
12+
font-style:normal;
13+
font-weight: 300;
14+
color: #262626;
15+
position:relative;
16+
height:100%;
17+
background:#FFF;
18+
margin:0;
19+
}
20+
a, img, input, textarea, select {
21+
outline:none;
22+
}
23+
label {
24+
cursor:pointer;
25+
}
26+
img {
27+
border:0;
28+
vertical-align:bottom;
29+
}
30+
form {
31+
margin:0;
32+
}
33+
header, nav, section, article, aside, footer {
34+
display:block;
35+
}
36+
a {
37+
color: #168de2;
38+
text-decoration: underline;
39+
}
40+
a:hover {
41+
color:#168de2;
42+
text-decoration: none;
43+
}
44+
textarea, input {
45+
font: inherit;
46+
resize:none;
47+
}
48+
p {
49+
margin:0;
50+
padding:0 0 20px 0;
51+
}
52+
table {
53+
border-collapse: collapse;
54+
}
55+
h1, h2, h3, h4, h5 {
56+
margin-top:0;
57+
font-weight:normal;
58+
}
59+
@font-face {
60+
font-family: 'helvetica-r';
61+
src: url('fonts/HelveticaNeue.eot');
62+
src: url('fonts/HelveticaNeue.eot?#iefix') format('embedded-opentype'),
63+
url('fonts/HelveticaNeue.woff') format('woff'),
64+
url('fonts/HelveticaNeue.ttf') format('truetype'),
65+
url('fonts/HelveticaNeue.svg#helveticaneuecyrroman') format('svg');
66+
font-weight: normal;
67+
font-style: normal;
68+
}
69+
@font-face {
70+
font-family: 'helvetica-b';
71+
src: url('fonts/HelveticaNeue-Bold.eot');
72+
src: url('fonts/HelveticaNeue-Bold.eot?#iefix') format('embedded-opentype'),
73+
url('fonts/HelveticaNeue-Bold.woff') format('woff'),
74+
url('fonts/HelveticaNeue-Bold.ttf') format('truetype'),
75+
url('fonts/HelveticaNeue-Bold.svg#helioscompressedregular') format('svg');
76+
font-weight: normal;
77+
font-style: normal;
78+
}

_theme/tarantool/_less/design.less

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// @import (less, once) "font-awesome/font-awesome.less";
2+
@import (inline) "font-awesome.min.css";
3+
4+
@import (less, once) "base.less";
5+
@import (less, once) "page-base.less";
6+
@import (less, once) "page-index.less";
7+
@import (less, once) "page-download.less";
8+
@import (less, once) "page-job.less";
9+
@import (less, once) "page-rocks.less";
10+
@import (less, once) "page-try.less";
11+
@import (less, once) "page-doc.less";
12+
@import (less, once) "page-benchmark.less";
13+
14+
@import (less, once) "pygmentize.less";
15+
@import (less, once) "dropdown.less";
16+
17+
/* TODO: port them too */
18+
@import (inline) "old_design.css";
19+
@import (inline) "sphinx_design.css";
20+
21+
/* @import "obsolete.less"; */

0 commit comments

Comments
 (0)