@@ -57,28 +57,28 @@ jobs:
5757 # Templates
5858
5959 Copy these templates to your project and customize them.
60+
61+ <div class="templates-list">
6062 HEADER
6163 sed -i 's/^ //' github-pages/templates.md
6264
6365 for file in docs/templates/*.md; do
6466 if [ -f "$file" ]; then
6567 filename=$(basename "$file")
6668 name="${filename%.md}"
67- title=$(head -1 "$file" | sed 's/^#* *//')
68- desc=$(sed -n '2,10p' "$file" | grep -v '^$' | grep -v '^#' | head -1)
69-
70- echo "" >> github-pages/templates.md
71- echo "---" >> github-pages/templates.md
72- echo "" >> github-pages/templates.md
73- echo "## ${title:-$name}" >> github-pages/templates.md
74- echo "" >> github-pages/templates.md
75- echo "${desc:-Template file for your project.}" >> github-pages/templates.md
76- echo "" >> github-pages/templates.md
77- echo "[View on GitHub](https://github.com/managedcode/MCAF/blob/main/docs/templates/${filename}){: .btn .btn-primary }" >> github-pages/templates.md
78- echo "[Download](https://raw.githubusercontent.com/managedcode/MCAF/main/docs/templates/${filename}){: .btn }" >> github-pages/templates.md
69+
70+ echo "<div class=\"template-item\">" >> github-pages/templates.md
71+ echo "<span class=\"template-name\">${name}</span>" >> github-pages/templates.md
72+ echo "<div class=\"template-links\">" >> github-pages/templates.md
73+ echo "<a href=\"https://github.com/managedcode/MCAF/blob/main/docs/templates/${filename}\">View</a>" >> github-pages/templates.md
74+ echo "<a href=\"https://raw.githubusercontent.com/managedcode/MCAF/main/docs/templates/${filename}\" download>Download</a>" >> github-pages/templates.md
75+ echo "</div>" >> github-pages/templates.md
76+ echo "</div>" >> github-pages/templates.md
7977 fi
8078 done
8179
80+ echo "</div>" >> github-pages/templates.md
81+
8282 - name : Copy README to github-pages with TOC
8383 run : |
8484 printf '%s\n' '---' 'layout: default' 'title: MCAF Guide' 'nav_order: 1' '---' '' > github-pages/index.md
0 commit comments