chore(docs): lints some docs, uses front-matter instead of # h1, and fix list items in changelog (#16589)

**Description**
<!--
Please include a summary of the change and which issue is fixed. Please
also include relevant motivation and context. List any dependencies that
are required for this change.
-->
⚒️ Fixes  # <!--(issue)-->

front matter is supported by all doc sites (including github markdown
rendering
and is easier to add extra metadata later on, if we want to.

```
---
title: sometitle
---
```

**⚙️ Type of change**

- [ ] ⚙️ Feature/App addition
- [ ] 🪛 Bugfix
- [ ] ⚠️ Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] 🔃 Refactor of current code

**🧪 How Has This Been Tested?**
<!--
Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration
-->

**📃 Notes:**
<!-- Please enter any other relevant information here -->

**✔️ Checklist:**

- [ ] ⚖️ My code follows the style guidelines of this project
- [ ] 👀 I have performed a self-review of my own code
- [ ] #️⃣ I have commented my code, particularly in hard-to-understand
areas
- [ ] 📄 I have made corresponding changes to the documentation
- [ ] ⚠️ My changes generate no new warnings
- [ ] 🧪 I have added tests to this description that prove my fix is
effective or that my feature works
- [ ] ⬆️ I increased versions for any altered app according to semantic
versioning

** App addition**

If this PR is an app addition please make sure you have done the
following.

- [ ] 🪞 I have opened a PR on
[truecharts/containers](https://github.com/truecharts/containers) adding
the container to TrueCharts mirror repo.
- [ ] 🖼️ I have added an icon in the Chart's root directory called
`icon.png`

---

_Please don't blindly check all the boxes. Read them and only check
those that apply.
Those checkboxes are there for the reviewer to see what is this all
about and
the status of this PR with a quick glance._
This commit is contained in:
Stavros Kois
2023-12-31 16:24:05 +02:00
committed by GitHub
parent f51b52481b
commit 12b5c56b24
989 changed files with 210187 additions and 357196 deletions
+17 -6
View File
@@ -168,7 +168,11 @@ jobs:
else
echo "helm-security not found, starting with empty helm-security..."
touch "website/docs/charts/${train}/${chart}/helm-security.md"
echo "# Helm Security" >> website/docs/charts/${train}/${chart}/helm-security.md
(
echo "---"
echo "title: Helm Security"
echo "---"
) > website/docs/charts/${train}/${chart}/helm-security.md
fi
if [[ -f "website/docs/charts/${train}/${chart}/container-security.md" ]]; then
echo "container-security found..."
@@ -176,7 +180,11 @@ jobs:
else
echo "container-security not found, starting with empty container-security..."
touch "website/docs/charts/${train}/${chart}/container-security.md"
echo "# Helm Security" >> website/docs/charts/${train}/${chart}/container-security.md
(
echo "---"
echo "title: Container Security"
echo "---"
) > website/docs/charts/${train}/${chart}/container-security.md
fi
# keep some docs safe
mv -f website/docs/charts/${train}/${chart}/CHANGELOG.md tmp/website/docs/charts/${train}/${chart}/CHANGELOG.md || :
@@ -198,10 +206,14 @@ jobs:
# Append SCALE changelog to actual changelog
sed -i '1d' "website/docs/charts/${train}/${chart}/CHANGELOG.md" || echo "failed to sed 1d changelog..."
cat "charts/${train}/${chart}/app-changelog.md" | cat - "website/docs/charts/${train}/${chart}/CHANGELOG.md" > temp && mv temp "website/docs/charts/${train}/${chart}/CHANGELOG.md"
sed -i '1s/^/# Changelog\n\n/' "website/docs/charts/${train}/${chart}/CHANGELOG.md" || echo "failed to add changelog header..."
sed -i '1s/^/---\ntitle: Changelog\n---\n\n/' "website/docs/charts/${train}/${chart}/CHANGELOG.md" || echo "failed to add changelog header..."
touch website/docs/charts/${train}/${chart}/index.md
echo "# ${chart}" >> website/docs/charts/${train}/${chart}/index.md
(
echo "---"
echo "title: ${chart}"
echo "---"
) >> website/docs/charts/${train}/${chart}/index.md
echo "" >> website/docs/charts/${train}/${chart}/index.md
version=$(cat charts/${train}/${chart}/Chart.yaml | grep "^version: " | awk -F" " '{ print $2 }')
appversion=$(cat charts/${train}/${chart}/Chart.yaml | grep "^appVersion: " | awk -F" " '{ print $2 }')
@@ -220,8 +232,7 @@ jobs:
for file in website/docs/charts/${train}/${chart}/*.md; do
# Extract the file name and first line from each file
filename=$(basename "${file}")
title=$(head -n 1 "${file}" | sed 's/# //')
title=$(cat "${file}" | grep "title: " | sed 's/title: //')
# Create a markdown link using the file name and title
link="[**${title}**](${filename%.md})"
if [ ${filename} != "index.md" ]; then