Skip to content

Commit b91664e

Browse files
authored
Unify README.md and docs/_index.md (#5380)
Signed-off-by: Doğukan Teber <[email protected]>
1 parent 81fcf88 commit b91664e

File tree

3 files changed

+22
-150
lines changed

3 files changed

+22
-150
lines changed

Diff for: README.md

+3
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ should read:
3939
1. [Getting started with Cortex](https://cortexmetrics.io/docs/getting-started/)
4040
1. [Information regarding configuring Cortex](https://cortexmetrics.io/docs/configuration/)
4141

42+
There are also individual [guides](https://cortexmetrics.io/docs/guides/) to many tasks.
43+
Please review the important [security advice](https://cortexmetrics.io/docs/guides/security/) before deploying.
44+
4245
For a guide to contributing to Cortex, see the [contributor guidelines](https://cortexmetrics.io/docs/contributing/).
4346

4447
## Further reading

Diff for: docs/_index.md

-149
This file was deleted.

Diff for: tools/website/web-pre.sh

+19-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ cp -r code-of-conduct.md CHANGELOG.md ${OUTPUT_CONTENT_DIR}
1818
cp GOVERNANCE.md ${OUTPUT_CONTENT_DIR}/contributing/governance.md
1919
cp images/* ${WEBSITE_DIR}/static/images
2020

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

55+
echo "$(cat <<EOT
56+
---
57+
title: "Documentation"
58+
linkTitle: "Documentation"
59+
weight: 1
60+
menu:
61+
main:
62+
weight: 1
63+
---
64+
EOT
65+
)" > ${OUTPUT_CONTENT_DIR}/_index.md
66+
67+
# Ignore the header and some of the badges.
68+
head -6 README.md | tail +2 >> ${OUTPUT_CONTENT_DIR}/_index.md
69+
70+
# Ignore another header and write the rest of the file.
71+
tail +12 README.md >> ${OUTPUT_CONTENT_DIR}/_index.md
72+
5573
ALL_DOC_CONTENT_FILES=`echo "${OUTPUT_CONTENT_DIR}/**/*.md ${OUTPUT_CONTENT_DIR}/*.md"`
5674
for file in $(find ${OUTPUT_CONTENT_DIR} -name '*.md')
5775
do

0 commit comments

Comments
 (0)