diff --git a/public/rss.xml b/public/rss.xml deleted file mode 100644 index ca73afd..0000000 --- a/public/rss.xml +++ /dev/null @@ -1,191 +0,0 @@ - - - - - Umair Jibran's Blog - - - https://umairjibran.com/blogs - - - Latest articles from Umair Jibran's blog. - - - - en-us - - - Tue, 14 Jan 2025 17:53:31 GMT - - - - Mastering Local Backend Development: Docker & NGINX as a Reverse Proxy for Efficient Testing - - - https://umairjibran.com/writings/docker-nginx-reverse-proxy-local-dev - - - Learn how to set up a local backend environment using Docker and NGINX as a reverse proxy. Streamline your development and testing with this step-by-step guide, optimized for efficient scaling and traffic management. - - - Sun, 20 Oct 2024 18:13:00 GMT - - - https://umairjibran.com/writings/docker-nginx-reverse-proxy-local-dev - - - - - GitHub CODEOWNERS: A Comprehensive Guide - - - https://umairjibran.com/writings/github-codeowners - - - Learn how to use GitHub's CODEOWNERS file to streamline your project's workflow. This guide covers everything you need to know about CODEOWNERS, including how to create and use it effectively. - - - Sat, 12 Oct 2024 18:13:00 GMT - - - https://umairjibran.com/writings/github-codeowners - - - - - LocalStack: Your Gateway to Seamless Cloud Testing Locally - - - https://umairjibran.com/writings/localstack-your-gateway-to-cloud-testing - - - Discover how LocalStack enables you to emulate AWS services locally, saving time and costs while improving productivity. - - - Sun, 22 Dec 2024 18:13:00 GMT - - - https://umairjibran.com/writings/localstack-your-gateway-to-cloud-testing - - - - - Make it your own - - - https://umairjibran.com/writings/make-it-your-own - - - Learn how you can customize this template to make it your own. This guide will help you understand how the template is organized and how to add new content. - - - Thu, 22 Aug 2024 19:29:00 GMT - - - https://umairjibran.com/writings/make-it-your-own - - - - - Ultimate Guide to Removing Sensitive Data from Git History: Protect Your Codebase - - - https://umairjibran.com/writings/removing-historic-commits - - - Discover the definitive methods to remove sensitive data like API keys from Git history. Learn how to safeguard your repository, rewrite commit history, and prevent future leaks using best practices. - - - Sun, 08 Dec 2024 18:13:00 GMT - - - https://umairjibran.com/writings/removing-historic-commits - - - - - Mastering Local Backend Development: Docker & NGINX as a Reverse Proxy for Efficient Testing - - - https://umairjibran.com/case-studies/docker-nginx-reverse-proxy-local-dev - - - Learn how to set up a local backend environment using Docker and NGINX as a reverse proxy. Streamline your development and testing with this step-by-step guide, optimized for efficient scaling and traffic management. - - - Sun, 20 Oct 2024 18:13:00 GMT - - - https://umairjibran.com/case-studies/docker-nginx-reverse-proxy-local-dev - - - - - GitHub CODEOWNERS: A Comprehensive Guide - - - https://umairjibran.com/case-studies/github-codeowners - - - Learn how to use GitHub's CODEOWNERS file to streamline your project's workflow. This guide covers everything you need to know about CODEOWNERS, including how to create and use it effectively. - - - Sat, 12 Oct 2024 18:13:00 GMT - - - https://umairjibran.com/case-studies/github-codeowners - - - - - LocalStack: Your Gateway to Seamless Cloud Testing Locally - - - https://umairjibran.com/case-studies/localstack-your-gateway-to-cloud-testing - - - Discover how LocalStack enables you to emulate AWS services locally, saving time and costs while improving productivity. - - - Sun, 22 Dec 2024 18:13:00 GMT - - - https://umairjibran.com/case-studies/localstack-your-gateway-to-cloud-testing - - - - - Make it your own - - - https://umairjibran.com/case-studies/make-it-your-own - - - Learn how you can customize this template to make it your own. This guide will help you understand how the template is organized and how to add new content. - - - Thu, 22 Aug 2024 19:29:00 GMT - - - https://umairjibran.com/case-studies/make-it-your-own - - - - - Ultimate Guide to Removing Sensitive Data from Git History: Protect Your Codebase - - - https://umairjibran.com/case-studies/removing-historic-commits - - - Discover the definitive methods to remove sensitive data like API keys from Git history. Learn how to safeguard your repository, rewrite commit history, and prevent future leaks using best practices. - - - Sun, 08 Dec 2024 18:13:00 GMT - - - https://umairjibran.com/case-studies/removing-historic-commits - - - - \ No newline at end of file diff --git a/scripts/generate-rss.js b/scripts/generate-rss.js index 2bc4f09..286f43d 100644 --- a/scripts/generate-rss.js +++ b/scripts/generate-rss.js @@ -19,8 +19,28 @@ function escapeXML(str) { } function generateRSS() { - const blogFiles = fs.readdirSync(BLOGS_DIR); - const caseStudyFiles = fs.readdirSync(CASE_STUDIES_DIR); + let blogFiles = []; + let caseStudyFiles = []; + + try { + if (fs.existsSync(BLOGS_DIR)) { + blogFiles = fs.readdirSync(BLOGS_DIR); + } else { + console.warn("Blogs directory does not exist:", BLOGS_DIR); + } + } catch (error) { + console.error("Error reading blogs directory:", error); + } + + try { + if (fs.existsSync(CASE_STUDIES_DIR)) { + caseStudyFiles = fs.readdirSync(CASE_STUDIES_DIR); + } else { + console.warn("Case studies directory does not exist:", CASE_STUDIES_DIR); + } + } catch (error) { + console.error("Error reading case studies directory:", error); + } const posts = blogFiles.map((file) => { const filePath = path.join(BLOGS_DIR, file);