Skip to content

Commit 10e0b2c

Browse files
committed
chore: replace RSS and sitemap generation with simplified scripts
1 parent 6f6502f commit 10e0b2c

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

.github/workflows/deploy.yml

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,38 +27,39 @@ jobs:
2727
- name: Generate SEO files (simple)
2828
run: |
2929
mkdir -p public
30-
POSTS=$(find content/posts -type f -name '*.mdx' | sed 's|content/posts/||;s|.mdx||')
30+
POSTS=$(find posts -type f -name '*.mdx' | sed 's|posts/||;s|.mdx||')
3131
32+
# sitemap.xml 생성
3233
echo '<?xml version="1.0" encoding="UTF-8"?>' > public/sitemap.xml
3334
echo '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' >> public/sitemap.xml
34-
3535
for POST in $POSTS; do
3636
echo " <url>" >> public/sitemap.xml
3737
echo " <loc>https://eottabom.github.io/post/$POST</loc>" >> public/sitemap.xml
3838
echo " <changefreq>weekly</changefreq>" >> public/sitemap.xml
3939
echo " <priority>0.7</priority>" >> public/sitemap.xml
4040
echo " </url>" >> public/sitemap.xml
4141
done
42-
4342
echo '</urlset>' >> public/sitemap.xml
4443
45-
echo '<?xml version="1.0" encoding="UTF-8"?>' > public/rss.xml
46-
echo '<rss version="2.0"><channel>' >> public/rss.xml
47-
echo '<title>eottabom.github.io</title>' >> public/rss.xml
48-
echo '<link>https://eottabom.github.io</link>' >> public/rss.xml
49-
echo '<description>Blog RSS Feed</description>' >> public/rss.xml
50-
echo "<lastBuildDate>$(date -u +"%a, %d %b %Y %H:%M:%S +0000")</lastBuildDate>" >> public/rss.xml
44+
# feed.xml 생성
45+
echo '<?xml version="1.0" encoding="UTF-8"?>' > public/feed.xml
46+
echo '<rss version="2.0"><channel>' >> public/feed.xml
47+
echo '<title>eottabom.github.io</title>' >> public/feed.xml
48+
echo '<link>https://eottabom.github.io</link>' >> public/feed.xml
49+
echo '<description>Blog RSS Feed</description>' >> public/feed.xml
50+
echo "<lastBuildDate>$(date -u +"%a, %d %b %Y %H:%M:%S +0000")</lastBuildDate>" >> public/feed.xml
5151
5252
for POST in $POSTS; do
53-
echo "<item>" >> public/feed.xml
54-
echo "<title>$POST</title>" >> public/feed.xml
55-
echo "<link>https://eottabom.github.io/post/$POST</link>" >> public/rss.xml
56-
echo "<guid>https://eottabom.github.io/post/$POST</guid>" >> public/rss.xml
57-
echo "<pubDate>$(date -u +"%a, %d %b %Y %H:%M:%S +0000")</pubDate>" >> public/rss.xml
58-
echo "</item>" >> public/rss.xml
53+
echo " <item>" >> public/feed.xml
54+
echo " <title>$POST</title>" >> public/feed.xml
55+
echo " <link>https://eottabom.github.io/post/$POST</link>" >> public/feed.xml
56+
echo " <guid>https://eottabom.github.io/post/$POST</guid>" >> public/feed.xml
57+
echo " <pubDate>$(date -u +"%a, %d %b %Y %H:%M:%S +0000")</pubDate>" >> public/feed.xml
58+
echo " </item>" >> public/feed.xml
5959
done
6060
61-
echo '</channel></rss>' >> public/rss.xml
61+
echo '</channel></rss>' >> public/feed.xml
62+
6263
6364
- name: Build and Export
6465
run: |

0 commit comments

Comments
 (0)