github.com/thanos-io/thanos@v0.32.5/scripts/website/mdoxpostprocess.sh (about)

     1  #!/usr/bin/env bash
     2  
     3  OUTPUT_CONTENT_DIR=$1
     4  TOP_WEIGHT=$2
     5  COMMIT_SHA=$(git rev-parse HEAD)
     6  
     7  echo ">> postprocessing content of dir ${OUTPUT_CONTENT_DIR}"
     8  
     9  # Create an _index.md in this dir to enable sorting capabilities and make this version appear top in version picker
    10  echo "$(
    11    cat <<EOF
    12  ---
    13  weight: ${TOP_WEIGHT}
    14  ---
    15  EOF
    16  )" >${OUTPUT_CONTENT_DIR}/_index.md
    17  
    18  # Create a thanos/_index.md file to make sure links work.
    19  echo "$(
    20    cat <<EOF
    21  ---
    22  title: 'Thanos General Documents:'
    23  ---
    24  EOF
    25  )" >${OUTPUT_CONTENT_DIR}/thanos/_index.md