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.

0 commit comments

Comments
 (0)