Skip to content

Commit 23db787

Browse files
committed
Add sitemap and favicon
1 parent 8118211 commit 23db787

File tree

5 files changed

+56
-3
lines changed

5 files changed

+56
-3
lines changed

.github/workflows/main.yaml

+5-3
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,19 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@v2
1717
name: Checkout repository
18-
18+
1919
- name: Login to registry
2020
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
21-
21+
2222
- name: Get streaming activity
2323
run: docker run -v $PWD/templates:/app/templates -v $PWD/index.md:/app/index.md -v $PWD/inactive.md:/app/inactive.md -v $PWD/streamers.csv:/app/streamers.csv ghcr.io/infosecstreams/secinfo:latest
2424

2525
- name: Commit index.md
2626
run: |
27+
current_time=$(date +"%Y-%m-%d")
28+
awk -f .github/workflows/replace_lastmod_sort.awk sitemap.xml | tee sitemap_new.xml && mv sitemap_new.xml sitemap.xml
2729
git config user.name "${GITHUB_ACTOR}"
2830
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
29-
git add index.md inactive.md
31+
git add index.md inactive.md sitemap.xml
3032
git commit -am "🤖 Updated and sorted markdown files"
3133
git push --all -f https://${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/awk -f
2+
3+
BEGIN {
4+
counter = 0
5+
replacement = strftime("%Y-%m-%dT%H:%M:%S%z")
6+
}
7+
8+
/<lastmod>/ && counter < 1 {
9+
counter++
10+
sub("<lastmod>.*</lastmod>", "<lastmod>" replacement "</lastmod>", $0)
11+
}
12+
13+
{
14+
print
15+
}
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/awk -f
2+
3+
BEGIN {
4+
counter = 0
5+
replacement = strftime("%Y-%m-%dT%H:%M:%S%z")
6+
}
7+
8+
/<lastmod>/ && counter < 2 {
9+
counter++
10+
sub("<lastmod>.*</lastmod>", "<lastmod>" replacement "</lastmod>", $0)
11+
}
12+
13+
{
14+
print
15+
}

favicon.ico

15 KB
Binary file not shown.

sitemap.xml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
3+
<url>
4+
<lastmod></lastmod>
5+
<loc>https://infosecstreams.com/</loc>
6+
<changefreq>hourly</changefreq>
7+
<priority>1.0</priority>
8+
</url>
9+
<url>
10+
<lastmod></lastmod>
11+
<loc>https://infosecstreams.com/inactive</loc>
12+
<changefreq>daily</changefreq>
13+
<priority>0.5</priority>
14+
</url>
15+
<url>
16+
<loc>https://infosecstreams.com/resources</loc>
17+
<changefreq>monthly</changefreq>
18+
<priority>0.8</priority>
19+
<lastmod>2022-04-12</lastmod>
20+
</url>
21+
</urlset>

0 commit comments

Comments
 (0)