Skip to content

Commit

Permalink
Unify README.md and docs/_index.md (#5380)
Browse files Browse the repository at this point in the history
Signed-off-by: Doğukan Teber <dogukanteber1@hotmail.com>
  • Loading branch information
dogukanteber committed Jul 6, 2023
1 parent 81fcf88 commit b91664e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 150 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ should read:
1. [Getting started with Cortex](https://cortexmetrics.io/docs/getting-started/)
1. [Information regarding configuring Cortex](https://cortexmetrics.io/docs/configuration/)

There are also individual [guides](https://cortexmetrics.io/docs/guides/) to many tasks.
Please review the important [security advice](https://cortexmetrics.io/docs/guides/security/) before deploying.

For a guide to contributing to Cortex, see the [contributor guidelines](https://cortexmetrics.io/docs/contributing/).

## Further reading
Expand Down
149 changes: 0 additions & 149 deletions docs/_index.md

This file was deleted.

20 changes: 19 additions & 1 deletion tools/website/web-pre.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ cp -r code-of-conduct.md CHANGELOG.md ${OUTPUT_CONTENT_DIR}
cp GOVERNANCE.md ${OUTPUT_CONTENT_DIR}/contributing/governance.md
cp images/* ${WEBSITE_DIR}/static/images

# Add headers to special CODE_OF_CONDUCT.md and CHANGELOG.md files.
# Add headers to special CODE_OF_CONDUCT.md, CHANGELOG.md and README.md files.
echo "$(cat <<EOT
---
title: Code of Conduct
Expand Down Expand Up @@ -52,6 +52,24 @@ EOT
)" > ${OUTPUT_CONTENT_DIR}/contributing/governance.md
tail -n +2 GOVERNANCE.md >> ${OUTPUT_CONTENT_DIR}/contributing/governance.md

echo "$(cat <<EOT
---
title: "Documentation"
linkTitle: "Documentation"
weight: 1
menu:
main:
weight: 1
---
EOT
)" > ${OUTPUT_CONTENT_DIR}/_index.md

# Ignore the header and some of the badges.
head -6 README.md | tail +2 >> ${OUTPUT_CONTENT_DIR}/_index.md

# Ignore another header and write the rest of the file.
tail +12 README.md >> ${OUTPUT_CONTENT_DIR}/_index.md

ALL_DOC_CONTENT_FILES=`echo "${OUTPUT_CONTENT_DIR}/**/*.md ${OUTPUT_CONTENT_DIR}/*.md"`
for file in $(find ${OUTPUT_CONTENT_DIR} -name '*.md')
do
Expand Down

0 comments on commit b91664e

Please sign in to comment.