Clean up docs folder by moving all build-related tools to subdirectory
6
.gitignore
vendored
@ -10,10 +10,8 @@
|
||||
*.logrt
|
||||
|
||||
/build
|
||||
/docs/en_single_page/
|
||||
/docs/ru_single_page/
|
||||
/docs/venv/
|
||||
/docs/build/
|
||||
/docs/build
|
||||
/docs/tools/venv/
|
||||
/docs/en/development/build/
|
||||
/docs/ru/development/build/
|
||||
|
||||
|
@ -1,19 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
LANGS="ru en"
|
||||
elif [[ $# -eq 1 ]]; then
|
||||
LANGS=$1
|
||||
fi
|
||||
|
||||
for lang in $LANGS; do
|
||||
echo -e "\n\nLANG=$lang. Creating single page source"
|
||||
mkdir $lang'_single_page' 2>/dev/null || true
|
||||
cp -r $lang/images $lang'_single_page'
|
||||
./concatenate.py $lang
|
||||
echo -e "\n\nLANG=$lang. Building multipage..."
|
||||
mkdocs build -f mkdocs_$lang.yml
|
||||
echo -e "\n\nLANG=$lang. Building single page..."
|
||||
mkdocs build -f mkdocs_$lang'_single_page.yml'
|
||||
done
|
@ -19,7 +19,7 @@ markdown_extensions:
|
||||
|
||||
theme:
|
||||
name: null
|
||||
custom_dir: 'mkdocs-material-theme'
|
||||
custom_dir: 'tools/mkdocs-material-theme'
|
||||
language: 'en'
|
||||
feature:
|
||||
tabs: false
|
||||
|
@ -17,7 +17,7 @@ markdown_extensions:
|
||||
|
||||
theme:
|
||||
name: null
|
||||
custom_dir: 'mkdocs-material-theme'
|
||||
custom_dir: 'tools/mkdocs-material-theme'
|
||||
language: 'en'
|
||||
feature:
|
||||
tabs: false
|
||||
|
@ -18,7 +18,7 @@ markdown_extensions:
|
||||
|
||||
theme:
|
||||
name: null
|
||||
custom_dir: 'mkdocs-material-theme'
|
||||
custom_dir: 'tools/mkdocs-material-theme'
|
||||
language: 'ru'
|
||||
feature:
|
||||
tabs: false
|
||||
|
@ -17,7 +17,7 @@ markdown_extensions:
|
||||
|
||||
theme:
|
||||
name: null
|
||||
custom_dir: 'mkdocs-material-theme'
|
||||
custom_dir: 'tools/mkdocs-material-theme'
|
||||
language: 'ru'
|
||||
feature:
|
||||
tabs: false
|
||||
|
22
docs/tools/build.sh
Executable file
@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null && pwd)"
|
||||
DOCS_DIR="${BASE_DIR}/.."
|
||||
if [ $# -lt 1 ]; then
|
||||
LANGS="ru en"
|
||||
elif [[ $# -eq 1 ]]; then
|
||||
LANGS=$1
|
||||
fi
|
||||
|
||||
for lang in $LANGS; do
|
||||
cd ${DOCS_DIR}
|
||||
echo -e "\n\nLANG=$lang. Creating single page source"
|
||||
mkdir $lang'_single_page' 2>/dev/null || true
|
||||
cp -r $lang/images $lang'_single_page'
|
||||
./tools/concatenate.py $lang
|
||||
echo -e "\n\nLANG=$lang. Building multipage..."
|
||||
mkdocs build -f mkdocs_$lang.yml
|
||||
echo -e "\n\nLANG=$lang. Building single page..."
|
||||
mkdocs build -f mkdocs_$lang'_single_page.yml'
|
||||
rm -rf $lang'_single_page'
|
||||
done
|
Before Width: | Height: | Size: 171 B After Width: | Height: | Size: 171 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 991 B After Width: | Height: | Size: 991 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
@ -58,7 +58,7 @@ gulp.task('reference', [], function () {
|
||||
});
|
||||
|
||||
gulp.task('docs', [], function () {
|
||||
run('cd ' + docsDir + '; ./build.sh');
|
||||
run('cd ' + docsDir + '/tools; ./build.sh');
|
||||
return gulp.src(paths.docs)
|
||||
.pipe(gulp.dest(outputDir + '/../docs'))
|
||||
});
|
||||
|