forked from acmcsufoss/1st
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
73 lines (60 loc) · 1.87 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/usr/bin/env bash
# Dependencies:
# - [Pandoc](https://pandoc.org/installing.html)
#
output_file="index.html"
# Remove the output file if it exists.
if [ -f "$output_file" ]; then
rm "$output_file"
fi
# Create the output file.
echo "<!DOCTYPE html>
<html lang=\"en\">
<head>
<meta charset=\"UTF-8\" />
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />
<link rel=\"stylesheet\" href=\"style.css\" />
<link rel=\"icon\" href=\"favicon.ico\" />
<title>1st | acmcsufoss</title>
</head>
<body>
<h1>Welcome to First Contributions!</h1>
<p>
This is a repository dedicated for new members of the ACM at CSUF
<b class=\"oss\">Open Source Software Team</b> to make their first
contributions to the acmcsufoss org! Let us walk through the steps so you
can make your first commit, pull request, or issue closing to become a
contributor of our beloved community!
</p>
<p>
Instructions on how to contribute can be found in the
<a href=\"https://github.com/acmcsufoss/1st#readme\">README</a>. If you have
any questions, feel free to ask in the
<a href=\"https://acmcsuf.com/discord\">#first-contributions</a> channel in
our Discord server.
</p>
<h2>References</h2>
<ul>
<li><a href=\"https://acmcsuf.com/1st\">acmcsuf.com/1st</a></li>
<li>
<a
href=\"https://github.com/firstcontributions/first-contributions#readme\"
>First contributions
</a>
</li>
</ul>
<h2>List of contributors</h2>
<ul>" >>"$output_file"
# Loop through all GFM files.
for file in collaborators/*.md; do
# Open the li element.
echo " <li>" >>"$output_file"
# Convert GFM files to HTML and append to output file.
pandoc -f gfm -t html "$file" >>"$output_file"
# Close the li element.
echo " </li>" >>"$output_file"
done
# Finish the output file.
echo " </ul>
</body>
</html>" >>"$output_file"