mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-14 03:25:15 +00:00
bff05fa7ff
* s/ch/zh/g as it is the correct ISO code * Add new languages to easy_edit.sh * Better site_name in docs * Fix a bunch of links in zh docs * remove extra trailing slashes
28 lines
675 B
Bash
Executable File
28 lines
675 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Creates symlinks to docs in ClickHouse/docs/edit/
|
|
# that are easy to open in both languages simultaneously
|
|
# for example, with `vim -O docs/edit/my_article/*`
|
|
|
|
set -ex
|
|
BASE_DIR="$(dirname $(readlink -f $0))/.."
|
|
DOCS_DIR="${BASE_DIR}"
|
|
EDIT_DIR="${BASE_DIR}/edit"
|
|
|
|
pushd "${DOCS_DIR}/en"
|
|
ARTICLES=$(find . -name '*.md' | sed -e 's/\.md$//g' -e 's/^\.\/en\///g')
|
|
popd
|
|
|
|
rm -rf "${EDIT_DIR}" || true
|
|
|
|
for DOCS_LANG in en ru zh fa
|
|
do
|
|
for ARTICLE in ${ARTICLES}
|
|
do
|
|
ARTICLE_DIR="${EDIT_DIR}/${ARTICLE}"
|
|
mkdir -p $ARTICLE_DIR || true
|
|
ln -s "${DOCS_DIR}/${DOCS_LANG}/${ARTICLE}.md" "${ARTICLE_DIR}/${DOCS_LANG}.md"
|
|
done
|
|
done
|
|
|
|
|