#!/bin/bash set -xe if sed --version 2>/dev/null | grep -q GNU; then SED_INPLACE="sed -i" else SED_INPLACE="sed -i ''" fi $SED_INPLACE 's/}}//' $file $SED_INPLACE 's/{{< version >}}/main-nightly/g' $file $SED_INPLACE 's/{{< relref "doc/i18n\/en\/docusaurus-plugin-content-docs\/current/g' $file $SED_INPLACE 's/" >}}//g' $file $SED_INPLACE 's/\*\*Table of Contents\*\*//' $file $SED_INPLACE 's/weight:/sidebar_position:/g' $file #sed -i 's/^slug:.*//' $file done for file in docs/*; do if [ -d $file ]; then continue fi if [ "$file" == "docs/intro.md" ]; then continue fi rm $file || true done for file in `find ./docs/ -name "*.en-us.md"`; do mv "${file}" "${file/.en-us/}" done