├── .markdownlint.json ├── public ├── robots.txt ├── images │ ├── logo.png │ ├── logo1.png │ ├── Keeper.png │ ├── avatar.png │ ├── banner1.png │ ├── favicon.png │ ├── imagenew.jpg │ ├── og-image.png │ ├── umesh123.png │ ├── algorithms.png │ ├── avatar-sm.png │ ├── download.jpeg │ ├── javascript.png │ ├── service-0.png │ ├── service-1.png │ ├── service-10.png │ ├── service-2.png │ ├── service-3.png │ ├── Network IPs.png │ ├── aboutprfile.png │ ├── aboutprofile.jpg │ ├── ai_engineer.jpeg │ ├── contribution.png │ ├── logo-darkmode.png │ ├── call-to-action.png │ ├── contribution-2.png │ ├── contribution-3.png │ ├── image-placeholder.png │ ├── quantum_computing.jpg │ ├── snakes-ransomware.png │ └── metaverse blog image.png └── .htaccess ├── .vscode ├── settings.json └── extensions.json ├── src ├── env.d.ts ├── content │ ├── authors │ │ ├── english │ │ │ ├── -index.md │ │ │ ├── ManiAuthor.md │ │ │ ├── EkSandy.md │ │ │ ├── lok.md │ │ │ ├── Admin.md │ │ │ └── JohnDoe.md │ │ └── french │ │ │ └── -index.md │ ├── blog │ │ ├── english │ │ │ ├── -index.md │ │ │ ├── post-4.md │ │ │ ├── siddharth.md │ │ │ ├── post-5.md │ │ │ ├── teja.md │ │ │ ├── Time-Complexity.md │ │ │ ├── Chitesh.md │ │ │ ├── Metaverse.md │ │ │ ├── post-3.md │ │ │ ├── quantam-computing.md │ │ │ ├── deepak.md │ │ │ └── khc.md │ │ └── french │ │ │ └── -index.md │ ├── contact │ │ ├── french │ │ │ └── -index.md │ │ └── english │ │ │ └── -index.md │ ├── sections │ │ └── english │ │ │ ├── call-to-action.md │ │ │ └── testimonial.md │ ├── about │ │ ├── english │ │ │ └── -index.md │ │ └── french │ │ │ └── -index.md │ ├── pages │ │ └── english │ │ │ └── privacy-policy.md │ ├── homepage │ │ ├── french │ │ │ └── -index.md │ │ └── english │ │ │ └── -index.md │ └── config.ts ├── layouts │ ├── shortcodes │ │ ├── Tab.tsx │ │ ├── Youtube.tsx │ │ ├── Video.tsx │ │ ├── Button.tsx │ │ ├── Accordion.tsx │ │ ├── Tabs.tsx │ │ └── Notice.tsx │ ├── helpers │ │ ├── Disqus.tsx │ │ ├── DynamicIcon.tsx │ │ └── LanguageSwitcher.tsx │ ├── partials │ │ ├── PageHeader.astro │ │ ├── CallToAction.astro │ │ ├── Footer.astro │ │ └── PostSidebar.astro │ ├── components │ │ ├── TwSizeIndicator.astro │ │ ├── Social.astro │ │ ├── AuthorCard.astro │ │ ├── Breadcrumbs.astro │ │ ├── Share.astro │ │ ├── Logo.astro │ │ ├── ImageMod.astro │ │ ├── BlogCard.astro │ │ ├── ThemeSwitcher.astro │ │ └── Pagination.astro │ └── PostSingle.astro ├── config │ ├── language.json │ ├── menu.en.json │ ├── social.json │ ├── menu.fr.json │ ├── theme.json │ └── config.json ├── lib │ ├── utils │ │ ├── taxonomyFilter.ts │ │ ├── dateFormat.ts │ │ ├── sortFunctions.ts │ │ ├── readingTime.ts │ │ ├── similarItems.ts │ │ ├── bgImageMod.ts │ │ ├── textConverter.ts │ │ └── languageParser.ts │ ├── taxonomyParser.astro │ └── contentParser.astro ├── types │ └── index.d.ts ├── styles │ ├── main.scss │ ├── utilities.scss │ ├── buttons.scss │ ├── base.scss │ ├── navigation.scss │ └── search.scss ├── hooks │ └── useTheme.ts ├── i18n │ ├── en.json │ └── fr.json └── pages │ ├── [...lang] │ ├── blog │ │ ├── [single].astro │ │ ├── index.astro │ │ └── page │ │ │ └── [slug].astro │ ├── authors │ │ ├── index.astro │ │ └── [single].astro │ ├── [regular].astro │ ├── about.astro │ ├── tags │ │ ├── index.astro │ │ └── [tag].astro │ ├── categories │ │ ├── index.astro │ │ └── [category].astro │ ├── contact.astro │ └── index.astro │ └── 404.astro ├── .dockerignore ├── netlify.toml ├── postcss.config.js ├── harsh.txt ├── .prettierrc ├── .editorconfig ├── .gitignore ├── .github ├── ISSUE_TEMPLATE │ └── feature_request.md ├── FUNDING.yml └── workflows │ └── greetings.yml ├── tsconfig.json ├── config └── nginx │ └── nginx.conf ├── LICENSE ├── SECURITY.md ├── Dockerfile ├── astro.config.mjs ├── package.json ├── scripts ├── removeMultilang.js ├── jsonGenerator.js └── removeDarkmode.js ├── tailwind.config.js └── CONTRIBUTING.md /.markdownlint.json: -------------------------------------------------------------------------------- 1 | { 2 | "MD033": false, 3 | "MD013": false 4 | } 5 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Allow: / 3 | 4 | Disallow: /api/* -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.associations": { 3 | "*.mdx": "markdown" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /public/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Developer-Blogs/Dev-blogs/HEAD/public/images/logo.png -------------------------------------------------------------------------------- /public/images/logo1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Developer-Blogs/Dev-blogs/HEAD/public/images/logo1.png -------------------------------------------------------------------------------- /src/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | Dockerfile 2 | .dockerignore 3 | node_modules 4 | npm-debug.log 5 | README.md 6 | .next 7 | .git -------------------------------------------------------------------------------- /public/images/Keeper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Developer-Blogs/Dev-blogs/HEAD/public/images/Keeper.png -------------------------------------------------------------------------------- /public/images/avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Developer-Blogs/Dev-blogs/HEAD/public/images/avatar.png -------------------------------------------------------------------------------- /public/images/banner1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Developer-Blogs/Dev-blogs/HEAD/public/images/banner1.png -------------------------------------------------------------------------------- /public/images/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Developer-Blogs/Dev-blogs/HEAD/public/images/favicon.png -------------------------------------------------------------------------------- /public/images/imagenew.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Developer-Blogs/Dev-blogs/HEAD/public/images/imagenew.jpg -------------------------------------------------------------------------------- /public/images/og-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Developer-Blogs/Dev-blogs/HEAD/public/images/og-image.png -------------------------------------------------------------------------------- /public/images/umesh123.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Developer-Blogs/Dev-blogs/HEAD/public/images/umesh123.png -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["astro-build.astro-vscode","bradlc.vscode-tailwindcss"] 3 | } 4 | -------------------------------------------------------------------------------- /public/images/algorithms.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Developer-Blogs/Dev-blogs/HEAD/public/images/algorithms.png -------------------------------------------------------------------------------- /public/images/avatar-sm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Developer-Blogs/Dev-blogs/HEAD/public/images/avatar-sm.png -------------------------------------------------------------------------------- /public/images/download.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Developer-Blogs/Dev-blogs/HEAD/public/images/download.jpeg -------------------------------------------------------------------------------- /public/images/javascript.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Developer-Blogs/Dev-blogs/HEAD/public/images/javascript.png -------------------------------------------------------------------------------- /public/images/service-0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Developer-Blogs/Dev-blogs/HEAD/public/images/service-0.png -------------------------------------------------------------------------------- /public/images/service-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Developer-Blogs/Dev-blogs/HEAD/public/images/service-1.png -------------------------------------------------------------------------------- /public/images/service-10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Developer-Blogs/Dev-blogs/HEAD/public/images/service-10.png -------------------------------------------------------------------------------- /public/images/service-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Developer-Blogs/Dev-blogs/HEAD/public/images/service-2.png -------------------------------------------------------------------------------- /public/images/service-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Developer-Blogs/Dev-blogs/HEAD/public/images/service-3.png -------------------------------------------------------------------------------- /public/images/Network IPs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Developer-Blogs/Dev-blogs/HEAD/public/images/Network IPs.png -------------------------------------------------------------------------------- /public/images/aboutprfile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Developer-Blogs/Dev-blogs/HEAD/public/images/aboutprfile.png -------------------------------------------------------------------------------- /public/images/aboutprofile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Developer-Blogs/Dev-blogs/HEAD/public/images/aboutprofile.jpg -------------------------------------------------------------------------------- /public/images/ai_engineer.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Developer-Blogs/Dev-blogs/HEAD/public/images/ai_engineer.jpeg -------------------------------------------------------------------------------- /public/images/contribution.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Developer-Blogs/Dev-blogs/HEAD/public/images/contribution.png -------------------------------------------------------------------------------- /public/images/logo-darkmode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Developer-Blogs/Dev-blogs/HEAD/public/images/logo-darkmode.png -------------------------------------------------------------------------------- /netlify.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | publish = "dist" 3 | command = "yarn build" 4 | 5 | [build.environment] 6 | NODE_VERSION = "20" 7 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /public/images/call-to-action.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Developer-Blogs/Dev-blogs/HEAD/public/images/call-to-action.png -------------------------------------------------------------------------------- /public/images/contribution-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Developer-Blogs/Dev-blogs/HEAD/public/images/contribution-2.png -------------------------------------------------------------------------------- /public/images/contribution-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Developer-Blogs/Dev-blogs/HEAD/public/images/contribution-3.png -------------------------------------------------------------------------------- /public/images/image-placeholder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Developer-Blogs/Dev-blogs/HEAD/public/images/image-placeholder.png -------------------------------------------------------------------------------- /public/images/quantum_computing.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Developer-Blogs/Dev-blogs/HEAD/public/images/quantum_computing.jpg -------------------------------------------------------------------------------- /public/images/snakes-ransomware.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Developer-Blogs/Dev-blogs/HEAD/public/images/snakes-ransomware.png -------------------------------------------------------------------------------- /public/images/metaverse blog image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Developer-Blogs/Dev-blogs/HEAD/public/images/metaverse blog image.png -------------------------------------------------------------------------------- /src/content/authors/english/-index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Authors" 3 | meta_title: "" 4 | description: "this is meta description" 5 | --- 6 | -------------------------------------------------------------------------------- /src/content/authors/french/-index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Auteurs" 3 | meta_title: "" 4 | description: "this is meta description" 5 | --- 6 | -------------------------------------------------------------------------------- /src/content/blog/english/-index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Blog Posts" 3 | meta_title: "" 4 | description: "this is meta description" 5 | --- 6 | -------------------------------------------------------------------------------- /src/content/blog/french/-index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Articles de blog" 3 | meta_title: "" 4 | description: "Ceci est une méta-description" 5 | --- 6 | -------------------------------------------------------------------------------- /src/content/contact/french/-index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Contact" 3 | meta_title: "" 4 | description: "this is meta description" 5 | draft: false 6 | --- 7 | -------------------------------------------------------------------------------- /src/content/contact/english/-index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Contact" 3 | meta_title: "" 4 | description: "this is meta description" 5 | draft: false 6 | --- 7 | -------------------------------------------------------------------------------- /harsh.txt: -------------------------------------------------------------------------------- 1 | this is my first contribution i really don't know what to contribute just trying to get process how to pull a request on github so sorry if it is wrong my intensions are not wrong -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": ["prettier-plugin-astro"], 3 | "overrides": [ 4 | { 5 | "files": ["*.astro"], 6 | "options": { 7 | "parser": "astro" 8 | } 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /src/layouts/shortcodes/Tab.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | function Tab({ name, children }: { name: string; children: React.ReactNode }) { 4 | return
{children}
; 5 | } 6 | 7 | export default Tab; 8 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | ; https://editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | charset = utf-8 7 | end_of_line = lf 8 | indent_size = 2 9 | indent_style = space 10 | trim_trailing_whitespace = true 11 | insert_final_newline = true 12 | 13 | [*.md] 14 | trim_trailing_whitespace = false -------------------------------------------------------------------------------- /src/config/language.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "languageName": "En", 4 | "languageCode": "en", 5 | "contentDir": "english", 6 | "weight": 1 7 | }, 8 | { 9 | "languageName": "Fr", 10 | "languageCode": "fr", 11 | "contentDir": "french", 12 | "weight": 2 13 | } 14 | ] 15 | -------------------------------------------------------------------------------- /src/lib/utils/taxonomyFilter.ts: -------------------------------------------------------------------------------- 1 | import { slugify } from "@/lib/utils/textConverter"; 2 | 3 | const taxonomyFilter = (posts: any[], name: string, key: string) => 4 | posts.filter((post) => 5 | post.data[name].map((name: string) => slugify(name)).includes(key), 6 | ); 7 | 8 | export default taxonomyFilter; 9 | -------------------------------------------------------------------------------- /src/lib/utils/dateFormat.ts: -------------------------------------------------------------------------------- 1 | import { format } from "date-fns"; 2 | 3 | const dateFormat = ( 4 | date: Date | string, 5 | pattern: string = "dd MMM, yyyy", 6 | ): string => { 7 | const dateObj = new Date(date); 8 | const output = format(dateObj, pattern); 9 | return output; 10 | }; 11 | 12 | export default dateFormat; 13 | -------------------------------------------------------------------------------- /src/types/index.d.ts: -------------------------------------------------------------------------------- 1 | import type { ContentEntryMap } from "astro:content"; 2 | 3 | export type Feature = { 4 | button: button; 5 | image: string; 6 | bulletpoints: string[]; 7 | content: string; 8 | title: string; 9 | }; 10 | 11 | export type Button = { 12 | enable: boolean; 13 | label: string; 14 | link: string; 15 | }; 16 | -------------------------------------------------------------------------------- /src/styles/main.scss: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | @layer base { 6 | @import "base"; 7 | } 8 | 9 | @layer components { 10 | @import "components"; 11 | @import "navigation"; 12 | @import "buttons"; 13 | @import "search"; 14 | } 15 | 16 | @layer utilities { 17 | @import "utilities"; 18 | } 19 | -------------------------------------------------------------------------------- /src/hooks/useTheme.ts: -------------------------------------------------------------------------------- 1 | import { useEffect, useState } from "react"; 2 | 3 | const useTheme = (): string => { 4 | const [themeValue, setThemeValue] = useState(""); 5 | 6 | useEffect(() => { 7 | setThemeValue( 8 | document.documentElement.classList.contains("dark") ? "dark" : "light", 9 | ); 10 | }, []); 11 | 12 | return themeValue; 13 | }; 14 | 15 | export default useTheme; 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # build output 2 | dist/ 3 | .output/ 4 | .json/ 5 | 6 | # dependencies 7 | node_modules/ 8 | 9 | # logs 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | pnpm-debug.log* 14 | yarn.lock 15 | package-lock.json 16 | 17 | 18 | # environment variables 19 | .env 20 | .env.production 21 | 22 | # macOS-specific files 23 | .DS_Store 24 | 25 | # ignore .astro directory 26 | .astro 27 | -------------------------------------------------------------------------------- /src/content/authors/english/ManiAuthor.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Mani Shankar Tulabandu 3 | email: manishtulabandu@gmail.com 4 | image: "/images/avatar.png" 5 | description: this is my description 6 | social: 7 | - name: github 8 | icon: FaGithub 9 | link: https://github.com/manishtulabandu 10 | 11 | - name: linkedin 12 | icon: FaLinkedin 13 | link: https://www.linkedin.com/in/manishankartulabandu 14 | --- 15 | 16 | Contributer 17 | -------------------------------------------------------------------------------- /src/content/sections/english/call-to-action.md: -------------------------------------------------------------------------------- 1 | --- 2 | enable: true 3 | title: "If you're interested in creating your first blog, feel free to contact me!" 4 | image: "/images/logo1.png" 5 | description: "Ready to start your blogging journey? I can help you set up your first blog and guide you through the process. Reach out to me to get started!" 6 | button: 7 | enable: true 8 | label: "Contact" 9 | link: "https://discord.gg/wmuGFyaN" 10 | --- 11 | -------------------------------------------------------------------------------- /src/content/authors/english/EkSandy.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: eksandy 3 | email: 2021cse.r61@svec.edu.in 4 | image: "/images/avatar.png" 5 | description: hello 6 | social: 7 | - name: github 8 | icon: FaGithub 9 | link: https://github.com/eksandy 10 | 11 | - name: twitter 12 | icon: FaTwitter 13 | link: https://twitter.com 14 | 15 | - name: linkedin 16 | icon: FaLinkedin 17 | link: https://linkedin.com 18 | --- 19 | 20 | Admin at https://developersblogs.netlify.app 21 | -------------------------------------------------------------------------------- /src/styles/utilities.scss: -------------------------------------------------------------------------------- 1 | .bg-gradient { 2 | @apply bg-gradient-to-b from-[rgba(249,249,249,1)] from-[0.53%] to-white to-[83.28%] dark:from-darkmode-theme-light dark:to-darkmode-body; 3 | } 4 | 5 | .rounded-sm { 6 | @apply rounded-[4px]; 7 | } 8 | .rounded { 9 | @apply rounded-[6px]; 10 | } 11 | .rounded-lg { 12 | @apply rounded-[12px]; 13 | } 14 | .rounded-xl { 15 | @apply rounded-[16px]; 16 | } 17 | 18 | .shadow { 19 | box-shadow: 0px 4px 40px rgba(0, 0, 0, 0.05); 20 | } 21 | -------------------------------------------------------------------------------- /src/content/authors/english/lok.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Cv Lokesh Kumar 3 | email: lokeshkumarcv41@gmail.com.com 4 | image: "/images/avatar.png" 5 | description: this is meta description 6 | social: 7 | - name: github 8 | icon: FaGithub 9 | link: https://github.com/lokeshkumarcv 10 | 11 | - name: twitter 12 | icon: FaTwitter 13 | link: https://twitter.com 14 | 15 | - name: linkedin 16 | icon: FaLinkedin 17 | link: https://www.linkedin.com/in/lokesh-kumar-cv-7841aa24a/ 18 | --- 19 | 20 | Contributer 21 | -------------------------------------------------------------------------------- /src/layouts/helpers/Disqus.tsx: -------------------------------------------------------------------------------- 1 | import config from "@/config/config.json"; 2 | import { DiscussionEmbed } from "disqus-react"; 3 | import React from "react"; 4 | 5 | const Disqus = ({ className }: { className?: string }) => { 6 | const { disqus } = config; 7 | return ( 8 |
9 | {disqus.enable && ( 10 | 14 | )} 15 |
16 | ); 17 | }; 18 | 19 | export default Disqus; 20 | -------------------------------------------------------------------------------- /src/layouts/shortcodes/Youtube.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import LiteYouTubeEmbed from "react-lite-youtube-embed"; 3 | import "react-lite-youtube-embed/dist/LiteYouTubeEmbed.css"; 4 | 5 | const Youtube = ({ 6 | id, 7 | title, 8 | ...rest 9 | }: { 10 | id: string; 11 | title: string; 12 | [key: string]: any; 13 | }) => { 14 | return ( 15 | 21 | ); 22 | }; 23 | 24 | export default Youtube; 25 | -------------------------------------------------------------------------------- /src/styles/buttons.scss: -------------------------------------------------------------------------------- 1 | .btn { 2 | @apply inline-block rounded border border-transparent px-5 py-2 font-semibold capitalize transition; 3 | } 4 | 5 | .btn-sm { 6 | @apply rounded-sm px-4 py-1.5 text-sm; 7 | } 8 | 9 | .btn-primary { 10 | @apply border-primary bg-primary dark:border-darkmode-primary dark:text-dark text-white dark:bg-darkmode-primary; 11 | } 12 | 13 | .btn-outline-primary { 14 | @apply border-dark text-dark hover:bg-dark dark:hover:text-dark bg-transparent hover:text-white dark:border-darkmode-primary dark:text-white dark:hover:bg-darkmode-primary; 15 | } 16 | -------------------------------------------------------------------------------- /src/layouts/partials/PageHeader.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import Breadcrumbs from "@/components/Breadcrumbs.astro"; 3 | import { humanize } from "@/lib/utils/textConverter"; 4 | 5 | const { title = "" }: { title?: string } = Astro.props; 6 | --- 7 | 8 |
9 |
10 |
13 |

14 | 15 |

16 |
17 |
18 | -------------------------------------------------------------------------------- /src/layouts/shortcodes/Video.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | function Video({ 3 | title, 4 | width = 500, 5 | height = "auto", 6 | src, 7 | ...rest 8 | }: { 9 | title: string; 10 | width: number; 11 | height: number | "auto"; 12 | src: string; 13 | [key: string]: any; 14 | }) { 15 | return ( 16 | 29 | ); 30 | } 31 | 32 | export default Video; 33 | -------------------------------------------------------------------------------- /src/i18n/en.json: -------------------------------------------------------------------------------- 1 | { 2 | "full_name": "Full Name", 3 | "full_name_placeholder": "Enter your full name", 4 | "mail_placeholder": "ekrishnachaitanya2004@gmail.com", 5 | "message": "Anything else?", 6 | "message_placeholder": "Your message here...", 7 | "submit": "Submit", 8 | "read_more": "Read More", 9 | "page_not_found": "Page Not Found", 10 | "working_mail": "Work Email", 11 | "anything_else": "Anything else?", 12 | "contact_message_placeholder": "Your message here...", 13 | "page_not_found_content": "The page you are looking for may have been removed, renamed, or is temporarily unavailable.", 14 | "back_to_home": "Back to Home", 15 | "get_started": "Get Started" 16 | } 17 | -------------------------------------------------------------------------------- /src/layouts/components/TwSizeIndicator.astro: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | 4 | { 5 | process.env.NODE_ENV === "development" && ( 6 |
7 | all 8 | 9 | 10 | 11 | 12 | 13 |
14 | ) 15 | } 16 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /src/layouts/shortcodes/Button.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | const Button = ({ 4 | label, 5 | link, 6 | style, 7 | rel, 8 | }: { 9 | label: string; 10 | link: string; 11 | style?: string; 12 | rel?: string; 13 | }) => { 14 | return ( 15 | 25 | {label} 26 | 27 | ); 28 | }; 29 | 30 | export default Button; 31 | -------------------------------------------------------------------------------- /src/layouts/components/Social.astro: -------------------------------------------------------------------------------- 1 | --- 2 | const { source, className } = Astro.props; 3 | import DynamicIcon from "@/helpers/DynamicIcon"; 4 | 5 | export interface ISocial { 6 | name: string; 7 | icon: string; 8 | link: string; 9 | } 10 | --- 11 | 12 | 29 | -------------------------------------------------------------------------------- /src/config/menu.en.json: -------------------------------------------------------------------------------- 1 | { 2 | "main": [ 3 | { "name": "Home", "url": "/" }, 4 | { "name": "About", "url": "/about" }, 5 | { "name": "Blog", "url": "/blog" }, 6 | { "name": "Authors", "url": "/authors" }, 7 | { 8 | "name": "Pages", 9 | "url": "", 10 | "hasChildren": true, 11 | "children": [ 12 | { "name": "Contact", "url": "/contact" }, 13 | { "name": "Elements", "url": "/elements" }, 14 | { "name": "Categories", "url": "/categories" }, 15 | { "name": "Tags", "url": "/tags" } 16 | ] 17 | } 18 | ], 19 | "footer": [ 20 | { "name": "Elements", "url": "/elements" }, 21 | { "name": "Privacy Policy", "url": "/privacy-policy" } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /src/content/authors/english/Admin.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Krishna Chaitanya Ethamukkala 3 | email: ekrishnachaitanya2004@gmail.com 4 | image: "/images/avatar.png" 5 | description: Creator of the Platform 6 | social: 7 | - name: github 8 | icon: FaGithub 9 | link: https://github.com/ekrishnachaitanya2004 10 | 11 | - name: twitter 12 | icon: FaTwitter 13 | link: https://x.com/ek020304net 14 | 15 | - name: linkedin 16 | icon: FaLinkedin 17 | link: https://www.linkedin.com/in/ethamukkala-krishna-chaitanya-440404222/ 18 | 19 | --- 20 | 21 | Dedicated to creating innovative projects and fostering a collaborative environment where contributors can share their knowledge and make a meaningful impact on the tech community. -------------------------------------------------------------------------------- /src/config/social.json: -------------------------------------------------------------------------------- 1 | { 2 | "main": [ 3 | { 4 | "name": "facebook", 5 | "icon": "FaFacebook", 6 | "link": "https://www.facebook.com/people/Ethamukkala-Krishna-Chaitanya/pfbid02zak1U9Kv9Uv6KuPP3h4EpipiCbFXJDCPuXAeenVffYwBvJzTkvcxX2Qaj5yPRFUPl/" 7 | }, 8 | { 9 | "name": "twitter", 10 | "icon": "FaTwitter", 11 | "link": "https://x.com/ek020304net" 12 | }, 13 | { 14 | "name": "github", 15 | "icon": "FaGithub", 16 | "link": "https://github.com/ekrishnachaitanya2004" 17 | }, 18 | { 19 | "name": "linkedin", 20 | "icon": "FaLinkedin", 21 | "link": "https://www.linkedin.com/in/ethamukkala-krishna-chaitanya-440404222/" 22 | } 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /src/i18n/fr.json: -------------------------------------------------------------------------------- 1 | { 2 | "full_name": "Nom complet", 3 | "full_name_placeholder": "Entrez votre nom complet", 4 | "mail_placeholder": "ekrishnachaitanya2004@gmail.com", 5 | "message": "Autre chose?", 6 | "message_placeholder": "Votre message ici...", 7 | "submit": "Soumettre", 8 | "read_more": "Lire la suite", 9 | "page_not_found": "Page non trouvée", 10 | "working_mail": "Courrier de travail", 11 | "anything_else": "Autre chose ?", 12 | "contact_message_placeholder": "Votre message ici...", 13 | "page_not_found_content": "La page que vous recherchez a peut-être été supprimée, changée de nom ou temporairement inaccessible.", 14 | "back_to_home": "Retour à l'accueil", 15 | "get_started": "Commencez à utiliser" 16 | } 17 | -------------------------------------------------------------------------------- /src/config/menu.fr.json: -------------------------------------------------------------------------------- 1 | { 2 | "main": [ 3 | { "name": "Accueil", "url": "/" }, 4 | { "name": "À propos", "url": "/about" }, 5 | { "name": "Éléments", "url": "/elements" }, 6 | { 7 | "name": "Pages", 8 | "url": "", 9 | "hasChildren": true, 10 | "children": [ 11 | { "name": "Contact", "url": "/contact" }, 12 | { "name": "Blog", "url": "/blog" }, 13 | { "name": "Auteurs", "url": "/authors" }, 14 | { "name": "Catégories", "url": "/categories" }, 15 | { "name": "Étiquettes", "url": "/tags" } 16 | ] 17 | } 18 | ], 19 | "footer": [ 20 | { "name": "Éléments", "url": "/elements" }, 21 | { "name": "Politique de confidentialité", "url": "/privacy-policy" } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "astro/tsconfigs/strict", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "target": "es6", 6 | "allowJs": true, 7 | "strict": true, 8 | "forceConsistentCasingInFileNames": true, 9 | "noEmit": true, 10 | "jsx": "react", 11 | "isolatedModules": true, 12 | "incremental": true, 13 | "allowSyntheticDefaultImports": true, 14 | "paths": { 15 | "@/components/*": ["./src/layouts/components/*"], 16 | "@/shortcodes/*": ["./src/layouts/shortcodes/*"], 17 | "@/helpers/*": ["./src/layouts/helpers/*"], 18 | "@/partials/*": ["./src/layouts/partials/*"], 19 | "@/*": ["./src/*"] 20 | } 21 | }, 22 | "include": ["**/*.ts", "**/*.tsx", "**/*.astro"], 23 | "exclude": ["node_modules"] 24 | } 25 | -------------------------------------------------------------------------------- /config/nginx/nginx.conf: -------------------------------------------------------------------------------- 1 | worker_processes 1; 2 | 3 | events { 4 | worker_connections 1024; 5 | } 6 | 7 | http { 8 | server { 9 | listen 80; 10 | server_name _; 11 | 12 | root /usr/share/nginx/html; 13 | index index.html index.htm; 14 | include /etc/nginx/mime.types; 15 | 16 | gzip on; 17 | gzip_min_length 1000; 18 | gzip_proxied expired no-cache no-store private auth; 19 | gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript; 20 | 21 | error_page 404 /404.html; 22 | location = /404.html { 23 | root /usr/share/nginx/html; 24 | internal; 25 | } 26 | 27 | location / { 28 | try_files $uri ${uri}.html $uri/index.html =404; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: ekrishnachaitanya2004 4 | #patreon: patreon.com/ekrishnachaitanya2004 5 | # open_collective: # ekrishnachaitanya2004 6 | #ko_fi: ko-fi.com/krishnachaitanya2004 7 | # tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | # community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | # liberapay: # Replace with a single Liberapay username 10 | # issuehunt: # Replace with a single IssueHunt username 11 | # lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 12 | # polar: # Replace with a single Polar username 13 | # buy_me_a_coffee: # Replace with a single Buy Me a Coffee username 14 | # thanks_dev: # Replace with a single thanks.dev username 15 | # custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 16 | -------------------------------------------------------------------------------- /src/styles/base.scss: -------------------------------------------------------------------------------- 1 | html { 2 | @apply text-base-sm md:text-base; 3 | } 4 | 5 | body { 6 | @apply bg-body dark:bg-darkmode-body font-primary font-normal leading-relaxed text-text dark:text-darkmode-text; 7 | } 8 | 9 | h1, 10 | h2, 11 | h3, 12 | h4, 13 | h5, 14 | h6 { 15 | @apply font-secondary font-bold leading-tight text-dark dark:text-darkmode-dark; 16 | } 17 | 18 | h1, 19 | .h1 { 20 | @apply text-h1-sm md:text-h1; 21 | } 22 | 23 | h2, 24 | .h2 { 25 | @apply text-h2-sm md:text-h2; 26 | } 27 | 28 | h3, 29 | .h3 { 30 | @apply text-h3-sm md:text-h3; 31 | } 32 | 33 | h4, 34 | .h4 { 35 | @apply text-h4; 36 | } 37 | 38 | h5, 39 | .h5 { 40 | @apply text-h5; 41 | } 42 | 43 | h6, 44 | .h6 { 45 | @apply text-h6; 46 | } 47 | 48 | b, 49 | strong { 50 | @apply font-semibold; 51 | } 52 | 53 | code { 54 | @apply after:border-none; 55 | } 56 | 57 | blockquote > p { 58 | @apply my-0 #{!important}; 59 | } 60 | -------------------------------------------------------------------------------- /src/lib/utils/sortFunctions.ts: -------------------------------------------------------------------------------- 1 | // sort by date 2 | export const sortByDate = (array: any[]) => { 3 | const sortedArray = array.sort( 4 | (a: any, b: any) => 5 | new Date(b.data.date && b.data.date).valueOf() - 6 | new Date(a.data.date && a.data.date).valueOf(), 7 | ); 8 | return sortedArray; 9 | }; 10 | 11 | // sort product by weight 12 | export const sortByWeight = (array: any[]) => { 13 | const withWeight = array.filter( 14 | (item: { data: { weight: any } }) => item.data.weight, 15 | ); 16 | const withoutWeight = array.filter( 17 | (item: { data: { weight: any } }) => !item.data.weight, 18 | ); 19 | const sortedWeightedArray = withWeight.sort( 20 | (a: { data: { weight: number } }, b: { data: { weight: number } }) => 21 | a.data.weight - b.data.weight, 22 | ); 23 | const sortedArray = [...new Set([...sortedWeightedArray, ...withoutWeight])]; 24 | return sortedArray; 25 | }; 26 | -------------------------------------------------------------------------------- /src/lib/utils/readingTime.ts: -------------------------------------------------------------------------------- 1 | // content reading 2 | const readingTime = (content: string): string => { 3 | const WPS = 275 / 60; 4 | 5 | let images = 0; 6 | const regex = /\w/; 7 | 8 | let words = content.split(" ").filter((word) => { 9 | if (word.includes(" 3) { 22 | imageFactor -= 1; 23 | } 24 | images -= 1; 25 | } 26 | 27 | const minutes = Math.ceil(((words - imageAdjust) / WPS + imageSecs) / 60); 28 | 29 | if (minutes < 10) { 30 | if (minutes < 2) { 31 | return "0" + minutes + ` Min read`; 32 | } else { 33 | return "0" + minutes + ` Mins read`; 34 | } 35 | } else { 36 | return minutes + ` Mins read`; 37 | } 38 | }; 39 | 40 | export default readingTime; 41 | -------------------------------------------------------------------------------- /src/layouts/components/AuthorCard.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import { getLangFromUrl, slugSelector } from "@/lib/utils/languageParser"; 3 | import { plainify } from "@/lib/utils/textConverter"; 4 | import ImageMod from "./ImageMod.astro"; 5 | import Social from "./Social.astro"; 6 | 7 | const { data } = Astro.props; 8 | const { title, image, social } = data.data; 9 | const lang = getLangFromUrl(Astro.url); 10 | --- 11 | 12 |
15 | { 16 | image && ( 17 | 25 | ) 26 | } 27 |

28 | {title} 29 |

30 |

31 | {plainify(data.body?.slice(0, 100))} 32 |

33 | 34 |
35 | -------------------------------------------------------------------------------- /src/content/authors/english/JohnDoe.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: John Doe 3 | email: john@email.com 4 | image: "/images/authors/john-doe.jpg" 5 | description: A technology enthusiast and software architect with years of experience in modern application development. 6 | social: 7 | - name: facebook 8 | icon: FaFacebook 9 | link: https://www.facebook.com 10 | 11 | - name: twitter 12 | icon: FaTwitter 13 | link: https://www.twitter.com 14 | 15 | - name: instagram 16 | icon: FaInstagram 17 | link: https://www.instagram.com 18 | 19 | --- 20 | 21 | John Doe is a seasoned software architect and technology enthusiast with a passion for building modern, scalable applications. With extensive experience in various technology stacks and architectural patterns, John helps organizations leverage cutting-edge technologies to create robust and efficient solutions. 22 | 23 | His expertise spans across cloud computing, microservices architecture, and modern development practices. Through his writing, John aims to share practical insights and best practices in software development and system design. -------------------------------------------------------------------------------- /src/config/theme.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors": { 3 | "default": { 4 | "theme_color": { 5 | "primary": "#121212", 6 | "body": "#fff", 7 | "border": "#eaeaea", 8 | "theme_light": "#f6f6f6", 9 | "theme_dark": "" 10 | }, 11 | "text_color": { 12 | "default": "#444444", 13 | "dark": "#040404", 14 | "light": "#717171" 15 | } 16 | }, 17 | "darkmode": { 18 | "theme_color": { 19 | "primary": "#fff", 20 | "body": "#1c1c1c", 21 | "border": "#3E3E3E", 22 | "theme_light": "#222222", 23 | "theme_dark": "" 24 | }, 25 | "text_color": { 26 | "default": "#B4AFB6", 27 | "dark": "#fff", 28 | "light": "#B4AFB6" 29 | } 30 | } 31 | }, 32 | "fonts": { 33 | "font_family": { 34 | "primary": "Heebo:wght@400;600", 35 | "primary_type": "sans-serif", 36 | "secondary": "Signika:wght@500;700", 37 | "secondary_type": "sans-serif" 38 | }, 39 | "font_size": { 40 | "base": "16", 41 | "scale": "1.2" 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/lib/utils/similarItems.ts: -------------------------------------------------------------------------------- 1 | // similar products 2 | const similarItems = (currentItem: any, allItems: any[]) => { 3 | let categories: string[] = []; 4 | let tags: string[] = []; 5 | 6 | // set categories 7 | if (currentItem.data.categories.length > 0) { 8 | categories = currentItem.data.categories; 9 | } 10 | 11 | // set tags 12 | if (currentItem.data.tags.length > 0) { 13 | tags = currentItem.data.tags; 14 | } 15 | 16 | // filter by categories 17 | const filterByCategories = allItems.filter((item: any) => 18 | categories.find((category) => item.data.categories.includes(category)), 19 | ); 20 | 21 | // filter by tags 22 | const filterByTags = allItems.filter((item: any) => 23 | tags.find((tag) => item.data.tags.includes(tag)), 24 | ); 25 | 26 | // merged after filter 27 | const mergedItems = [...new Set([...filterByCategories, ...filterByTags])]; 28 | 29 | // filter by slug 30 | const filterBySlug = mergedItems.filter( 31 | (product) => product.slug !== currentItem.slug, 32 | ); 33 | 34 | return filterBySlug; 35 | }; 36 | 37 | export default similarItems; 38 | -------------------------------------------------------------------------------- /src/content/about/english/-index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Hey, I am Krishna!" 3 | meta_title: "About" 4 | description: "developer " 5 | image: "https://avatars.githubusercontent.com/u/90260004?v=4" 6 | draft: false 7 | --- 8 | 9 | ### About the Creator 10 | 11 | Hi, I'm Krishna Chaitanya, the creator of this open-source blog platform and an enthusiastic developer passionate about building and sharing knowledge within the tech community. I believe in the power of open source, where collaboration fuels innovation and learning. My GitHub journey has been centered around contributing to projects that make a difference, whether it's through coding, developing tools, or mentoring others. 12 | 13 | Through this platform, I aim to create a space where developers from around the world can share their insights, ideas, and projects. I actively maintain my GitHub repository, welcoming contributors to fork, add their unique perspectives, and submit pull requests. Together, we're building something bigger than ourselves—a community of learners and creators dedicated to improving the open-source ecosystem. 14 | 15 | Feel free to explore, contribute, and connect! 16 | 17 | --- -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2023 - Present, Zeon Studio 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /.github/workflows/greetings.yml: -------------------------------------------------------------------------------- 1 | name: Greetings 2 | 3 | on: [pull_request_target, issues] 4 | 5 | jobs: 6 | greeting: 7 | runs-on: ubuntu-latest 8 | permissions: 9 | issues: write 10 | pull-requests: write 11 | steps: 12 | - uses: actions/first-interaction@v1 13 | with: 14 | repo-token: ${{ secrets.GITHUB_TOKEN }} 15 | issue-message: > 16 | Hello @${{ github.actor }}! 👋 17 | 18 | Thank you for opening your first issue in the **DevBlogs** repository. 19 | We're excited to have you join us on this journey of creating a vibrant community for sharing developer insights, tutorials, and projects. 20 | If you have any questions or need assistance, feel free to ask. Happy coding! 💻🚀 21 | 22 | pr-message: > 23 | Hello @${{ github.actor }}! 👋 24 | 25 | Thank you for submitting your first pull request to **DevBlogs**! 26 | Your contributions are incredibly valuable in building this platform for developers worldwide. 27 | We'll review your changes shortly. If you need help or have any suggestions, don't hesitate to let us know. Keep contributing and inspiring! 🌟💻 28 | -------------------------------------------------------------------------------- /src/pages/[...lang]/blog/[single].astro: -------------------------------------------------------------------------------- 1 | --- 2 | import Base from "@/layouts/Base.astro"; 3 | import PostSingle from "@/layouts/PostSingle.astro"; 4 | import { getSinglePage } from "@/lib/contentParser.astro"; 5 | import { supportedLang } from "@/lib/utils/languageParser"; 6 | import type { ContentEntryMap } from "astro:content"; 7 | 8 | export async function getStaticPaths() { 9 | const BLOG_FOLDER = "blog"; 10 | 11 | const paths = await Promise.all( 12 | supportedLang.map(async (lang) => { 13 | const posts = await getSinglePage( 14 | BLOG_FOLDER, 15 | lang as keyof ContentEntryMap 16 | ); 17 | 18 | return posts.map((post) => ({ 19 | params: { 20 | lang: lang || undefined, 21 | single: post.slug.split("/").pop(), 22 | }, 23 | props: { 24 | post, 25 | }, 26 | })); 27 | }) 28 | ); 29 | return paths.flat(); 30 | } 31 | 32 | const { post } = Astro.props; 33 | const { title, meta_title, description, image } = post.data; 34 | --- 35 | 36 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/content/about/french/-index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Hé, je suis Krishna !" 3 | meta_title: "About" 4 | description: "developer" 5 | image: "/images/avatar.png" 6 | draft: false 7 | --- 8 | ### À propos du créateur 9 | 10 | Bonjour, je suis Krishna Chaitanya, le créateur de cette plateforme de blogs open-source et un développeur passionné par la construction et le partage de connaissances au sein de la communauté technologique. Je crois en la puissance de l'open-source, où la collaboration nourrit l'innovation et l'apprentissage. Mon parcours sur GitHub est centré sur la contribution à des projets qui font la différence, que ce soit par le codage, le développement d'outils ou le mentorat. 11 | 12 | À travers cette plateforme, mon objectif est de créer un espace où les développeurs du monde entier peuvent partager leurs idées, leurs projets et leurs perspectives. Je maintiens activement mon dépôt GitHub et j'encourage les contributeurs à forker, à ajouter leurs idées uniques et à soumettre des pull requests. Ensemble, nous construisons quelque chose de plus grand que nous-mêmes—une communauté d'apprenants et de créateurs dévouée à l'amélioration de l'écosystème open-source. 13 | 14 | N'hésitez pas à explorer, contribuer et vous connecter ! -------------------------------------------------------------------------------- /src/layouts/shortcodes/Accordion.tsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | 3 | const Accordion = ({ 4 | title, 5 | children, 6 | className, 7 | }: { 8 | title: string; 9 | children: React.ReactNode; 10 | className?: string; 11 | }) => { 12 | const [show, setShow] = useState(false); 13 | 14 | return ( 15 |
16 | 31 |
{children}
32 |
33 | ); 34 | }; 35 | 36 | export default Accordion; 37 | -------------------------------------------------------------------------------- /src/lib/utils/bgImageMod.ts: -------------------------------------------------------------------------------- 1 | import { getImage } from "astro:assets"; 2 | 3 | const bgImageMod = async ( 4 | src: string, 5 | format?: "auto" | "avif" | "jpeg" | "png" | "svg" | "webp", 6 | ) => { 7 | src = `/public${src}`; 8 | const images = import.meta.glob("/public/images/**/*.{jpeg,jpg,png,gif}"); 9 | 10 | // Check if the source path is valid 11 | if (!src || !images[src]) { 12 | console.error( 13 | `\x1b[31mImage not found - ${src}.\x1b[0m Make sure the image is in the /public/images folder.`, 14 | ); 15 | 16 | return ""; // Return an empty string if the image is not found 17 | } 18 | 19 | // Function to get the image info like width, height, format, etc. 20 | const getImagePath = async (image: string) => { 21 | try { 22 | const imageData = (await images[image]()) as any; 23 | return imageData; 24 | } catch (error) { 25 | return `Image not found - ${src}. Make sure the image is in the /public/images folder.`; 26 | } 27 | }; 28 | 29 | // Get the image data for the specified source path 30 | const image = await getImagePath(src); 31 | 32 | // Optimize the image for development 33 | const ImageMod = await getImage({ 34 | src: image.default, 35 | format: format, 36 | }); 37 | 38 | return ImageMod.src; 39 | }; 40 | 41 | export default bgImageMod; 42 | -------------------------------------------------------------------------------- /src/layouts/helpers/DynamicIcon.tsx: -------------------------------------------------------------------------------- 1 | import React, { type FC } from "react"; 2 | import type { IconType } from "react-icons"; 3 | import * as FaIcons from "react-icons/fa6"; 4 | // import * as AiIcons from "react-icons/ai"; 5 | // import * as BsIcons from "react-icons/bs"; 6 | // import * as FiIcons from "react-icons/fi"; 7 | // import * as Io5Icons from "react-icons/io5"; 8 | // import * as RiIcons from "react-icons/ri"; 9 | // import * as TbIcons from "react-icons/tb"; 10 | // import * as TfiIcons from "react-icons/tfi"; 11 | 12 | type IconMap = Record; 13 | 14 | interface IDynamicIcon extends React.SVGProps { 15 | icon: string; 16 | className?: string; 17 | } 18 | 19 | const iconLibraries: { [key: string]: IconMap } = { 20 | fa: FaIcons, 21 | }; 22 | 23 | const DynamicIcon: FC = ({ icon, ...props }) => { 24 | const IconLibrary = getIconLibrary(icon); 25 | const Icon = IconLibrary ? IconLibrary[icon] : undefined; 26 | 27 | if (!Icon) { 28 | return Icon not found; 29 | } 30 | 31 | return ; 32 | }; 33 | 34 | const getIconLibrary = (icon: string): IconMap | undefined => { 35 | const libraryKey = icon.substring(0, 2).toLowerCase(); 36 | 37 | return iconLibraries[libraryKey]; 38 | }; 39 | 40 | export default DynamicIcon; 41 | -------------------------------------------------------------------------------- /src/pages/[...lang]/authors/index.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import AuthorCard from "@/components/AuthorCard.astro"; 3 | import Base from "@/layouts/Base.astro"; 4 | import { getListPage, getSinglePage } from "@/lib/contentParser.astro"; 5 | import { supportedLang } from "@/lib/utils/languageParser"; 6 | import PageHeader from "@/partials/PageHeader.astro"; 7 | import { type ContentEntryMap } from "astro:content"; 8 | 9 | const COLLECTION_FOLDER = "authors"; 10 | 11 | export function getStaticPaths() { 12 | const paths = supportedLang.map((lang) => ({ 13 | params: { lang: lang || undefined }, 14 | })); 15 | return paths; 16 | } 17 | 18 | const { lang } = Astro.params; 19 | const authorIndex = await getListPage( 20 | COLLECTION_FOLDER, 21 | lang as keyof ContentEntryMap 22 | ); 23 | const authors = await getSinglePage( 24 | COLLECTION_FOLDER, 25 | lang as keyof ContentEntryMap 26 | ); 27 | --- 28 | 29 | 30 | 31 |
32 |
33 |
34 | { 35 | authors.map((author) => ( 36 |
37 | 38 |
39 | )) 40 | } 41 |
42 |
43 |
44 | 45 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # **Security Policy** 2 | 3 | ## **Supported Versions** 4 | 5 | The following table shows which versions of **Dev-Blogs** are currently supported with security updates: 6 | 7 | | Version | Supported | 8 | | ------- | ------------------ | 9 | | 1.0.0 | Blogs | 10 | 11 | Only versions 1.0 and above are actively maintained and receive security updates. Please ensure that you are using a supported version to benefit from the latest security patches. 12 | 13 | --- 14 | 15 | ## **Reporting a Vulnerability** 16 | 17 | If you discover a security vulnerability in **Dev-Blogs**, we encourage you to help improve the security of the project by reporting it responsibly. Here’s how you can report a vulnerability: 18 | 19 | 1. **Contact**: Send an email to **[ekrishnachaitanya2004@gmail.com]** with details of the vulnerability. 20 | 2. **Response Time**: You can expect a response within **48 hours** after the report is received. 21 | 3. **Resolution**: Once the vulnerability is validated, we will work to resolve it as soon as possible. You will receive updates on the status of the issue periodically. 22 | 4. **Disclosure**: We follow a policy of responsible disclosure. Once the vulnerability is patched, we will credit you (if desired) in the release notes unless the reporter prefers anonymity. 23 | 24 | Your report will be handled with the highest priority, and we appreciate your contribution to keeping **Dev-Blogs** secure. 25 | -------------------------------------------------------------------------------- /src/config/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "site": { 3 | "title": "Dev Blogs", 4 | "base_url": "https://developersblogs.netlify.app", 5 | "base_path": "/", 6 | "trailing_slash": false, 7 | "favicon": "/images/favicon.png", 8 | "logo": "/images/logo.png", 9 | "logo_darkmode": "/images/logo-darkmode.png", 10 | "logo_width": "150", 11 | "logo_height": "30", 12 | "logo_text": "Developer blogs" 13 | }, 14 | 15 | "settings": { 16 | "search": true, 17 | "sticky_header": true, 18 | "theme_switcher": true, 19 | "default_theme": "system", 20 | "pagination": 12, 21 | "summary_length": 200, 22 | "blog_folder": "blog", 23 | "default_language": "en", 24 | "disable_languages": ["fr"], 25 | "default_language_in_subdir": false 26 | }, 27 | 28 | "params": { 29 | "contact_form_action": "#", 30 | "copyright": "© 2025 Developer Blogs. All rights open-sourced.
Built with ❤️ by the KHC community" 31 | }, 32 | 33 | "navigation_button": { 34 | "enable": true, 35 | "label": "Get Started", 36 | "link": "https://github.com/Snakes-n-Networks/Dev-blogs.git" 37 | }, 38 | 39 | "disqus": { 40 | "enable": true, 41 | "shortname": "themefisher-template", 42 | "settings": {} 43 | }, 44 | 45 | "metadata": { 46 | "meta_author": "ekrishnachaitanya2004", 47 | "meta_image": "/images/og-image.png", 48 | "meta_description": "Open Source Developers blogs" 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/pages/[...lang]/[regular].astro: -------------------------------------------------------------------------------- 1 | --- 2 | import Base from "@/layouts/Base.astro"; 3 | import { getSinglePage } from "@/lib/contentParser.astro"; 4 | import { supportedLang } from "@/lib/utils/languageParser"; 5 | import PageHeader from "@/partials/PageHeader.astro"; 6 | import type { ContentEntryMap } from "astro:content"; 7 | 8 | export async function getStaticPaths() { 9 | const paths = await Promise.all( 10 | supportedLang.map(async (lang) => { 11 | const pages = await getSinglePage("pages", lang as keyof ContentEntryMap); 12 | 13 | return pages.map((page) => ({ 14 | params: { 15 | lang: lang || undefined, 16 | regular: page.slug.split("/").pop(), 17 | }, 18 | props: { 19 | page, 20 | }, 21 | })); 22 | }) 23 | ); 24 | return paths.flat(); 25 | } 26 | 27 | const { page } = Astro.props; 28 | const { title, meta_title, description, image } = page.data; 29 | const { Content } = await page.render(); 30 | --- 31 | 32 | 38 | 39 |
40 |
41 |
42 |
43 |
44 | 45 |
46 |
47 |
48 |
49 |
50 | 51 | -------------------------------------------------------------------------------- /src/content/blog/english/post-4.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "How to build an Application with modern Technology" 3 | meta_title: "" 4 | description: "this is meta description" 5 | date: 2022-04-04T05:00:00Z 6 | image: "/images/image-placeholder.png" 7 | categories: ["Architecture"] 8 | author: "John Doe" 9 | tags: ["silicon", "technology"] 10 | draft: false 11 | --- 12 | 13 | Nemo vel ad consectetur namut rutrum ex, venenatis sollicitudin urna. Aliquam erat volutpat. Integer eu ipsum sem. Ut bibendum lacus vestibulum maximus suscipit. Quisque vitae nibh iaculis neque blandit euismod. 14 | 15 | Lorem ipsum dolor sit amet consectetur adipisicing elit. Nemo vel ad consectetur ut aperiam. Itaque eligendi natus aperiam? Excepturi repellendus consequatur quibusdam optio expedita praesentium est adipisci dolorem ut eius! 16 | 17 | ## Creative Design 18 | 19 | Nam ut rutrum ex, venenatis sollicitudin urna. Aliquam erat volutpat. Integer eu ipsum sem. Ut bibendum lacus vestibulum maximus suscipit. Quisque vitae nibh iaculis neque blandit euismod. 20 | 21 | > Lorem ipsum dolor sit amet consectetur adipisicing elit. Nemo vel ad consectetur ut aperiam. Itaque eligendi natus aperiam? Excepturi repellendus consequatur quibusdam optio expedita praesentium est adipisci dolorem ut eius! 22 | 23 | Lorem ipsum dolor sit amet consectetur adipisicing elit. Nemo vel ad consectetur ut aperiam. Itaque eligendi natus aperiam? Excepturi repellendus consequatur quibusdam optio expedita praesentium est adipisci dolorem ut eius! 24 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | ARG INSTALLER=yarn 2 | 3 | FROM node:20-alpine AS base 4 | 5 | # Install dependencies only when needed 6 | FROM base AS deps 7 | ARG INSTALLER 8 | 9 | # Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed. 10 | RUN apk add --no-cache libc6-compat 11 | WORKDIR /app 12 | 13 | # Install dependencies based on the preferred package manager 14 | COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./ 15 | RUN \ 16 | if [ "${INSTALLER}" == "yarn" ]; then yarn --frozen-lockfile; \ 17 | elif [ "${INSTALLER}" == "npm" ]; then npm ci; \ 18 | elif [ "${INSTALLER}" == "pnpm" ]; then yarn global add pnpm && pnpm i --frozen-lockfile; \ 19 | else echo "Valid installer not set." && exit 1; \ 20 | fi 21 | 22 | 23 | # Rebuild the source code only when needed 24 | FROM base AS builder 25 | WORKDIR /app 26 | COPY --from=deps /app/node_modules ./node_modules 27 | COPY . . 28 | 29 | # RUN chmod u+x ./installer && ./installer 30 | ARG INSTALLER 31 | RUN \ 32 | if [ "${INSTALLER}" == "yarn" ]; then yarn build; \ 33 | elif [ "${INSTALLER}" == "npm" ]; then npm run build; \ 34 | elif [ "${INSTALLER}" == "pnpm" ]; then pnpm run build; \ 35 | else echo "Valid installer not set." && exit 1; \ 36 | fi 37 | 38 | # Production image, copy all the files and run nginx 39 | FROM nginx:alpine AS runner 40 | COPY ./config/nginx/nginx.conf /etc/nginx/nginx.conf 41 | COPY --from=builder /app/dist /usr/share/nginx/html 42 | 43 | WORKDIR /usr/share/nginx/html 44 | -------------------------------------------------------------------------------- /src/pages/404.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import config from "@/config/config.json"; 3 | import Base from "@/layouts/Base.astro"; 4 | import { 5 | getLangFromUrl, 6 | getTranslations, 7 | supportedLang, 8 | slugSelector, 9 | } from "@/lib/utils/languageParser"; 10 | import type { ContentEntryMap } from "astro:content"; 11 | 12 | export function getStaticPaths() { 13 | const paths = supportedLang.map((lang) => ({ 14 | params: { lang: lang || undefined }, 15 | })); 16 | return paths; 17 | } 18 | 19 | let lang = getLangFromUrl(Astro.url); 20 | 21 | const disabledLanguages = config.settings.disable_languages as string[]; 22 | if (disabledLanguages.includes(lang)) { 23 | lang = config.settings.default_language; 24 | } 25 | 26 | const { page_not_found_content, page_not_found, back_to_home } = 27 | await getTranslations(lang as keyof ContentEntryMap); 28 | --- 29 | 30 | 31 |
32 |
33 |
34 |
35 | 38 | 404 39 | 40 |

{page_not_found}

41 |
42 |

{page_not_found_content}

43 |
44 | {back_to_home} 47 |
48 |
49 |
50 |
51 | 52 | -------------------------------------------------------------------------------- /src/pages/[...lang]/about.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import ImageMod from "@/components/ImageMod.astro"; 3 | import Base from "@/layouts/Base.astro"; 4 | import { getListPage } from "@/lib/contentParser.astro"; 5 | import { supportedLang } from "@/lib/utils/languageParser"; 6 | import { markdownify } from "@/lib/utils/textConverter"; 7 | import type { ContentEntryMap } from "astro:content"; 8 | 9 | export function getStaticPaths() { 10 | const paths = supportedLang.map((lang) => ({ 11 | params: { lang: lang || undefined }, 12 | })); 13 | return paths; 14 | } 15 | 16 | const { lang } = Astro.params; 17 | const about = await getListPage("about", lang as keyof ContentEntryMap); 18 | 19 | const { Content } = await about[0].render(); 20 | const { title, description, meta_title, image } = about[0].data; 21 | --- 22 | 23 | 29 |
30 |
31 |
32 |
33 | { 34 | image && ( 35 | 43 | ) 44 | } 45 |

46 |
47 | 48 |
49 |

50 |
51 |
52 |
53 | 54 | -------------------------------------------------------------------------------- /src/content/pages/english/privacy-policy.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Privacy" 3 | meta_title: "Privacy Policy - Dev Blogs" 4 | description: "Learn about how we handle personal information and contributor responsibility on Dev Blogs." 5 | draft: false 6 | --- 7 | #### Responsibility of Contributors 8 | 9 | At Dev Blogs, we emphasize the responsibility of all contributors to uphold community standards. Our contributors are expected to collaborate in a respectful and constructive manner, ensuring their content adheres to the ethical guidelines set forth by the platform. 10 | 11 | #### Gathering of Personal Information 12 | 13 | Dev Blogs is committed to transparency in collecting personal data. We only gather information that is necessary for enhancing the user experience, such as user preferences and email addresses for subscriptions. No sensitive information is collected without explicit consent. 14 | 15 | #### Protection of Personal Information 16 | 17 | We prioritize the security of personal information. Strict measures are implemented to prevent unauthorized access, including encryption protocols and secure storage. We ensure that user data remains confidential and is not shared with third parties. 18 | 19 | #### Privacy Policy Changes 20 | 21 | Our privacy policy may change periodically to reflect updates in technology or regulations. Key updates include: 22 | 23 | 1. Continuous updates to ensure compatibility with the latest web standards. 24 | 2. Restrictions on comments that harm the reputation of any individual or organization. 25 | 3. Safeguarding of personal information, such as email addresses and contact details. 26 | 4. Automatic notifications for customers regarding significant policy changes. 27 | 28 | --- -------------------------------------------------------------------------------- /src/layouts/partials/CallToAction.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import ImageMod from "@/components/ImageMod.astro"; 3 | import { markdownify } from "@/lib/utils/textConverter"; 4 | const { call_to_action } = Astro.props; 5 | --- 6 | 7 | { 8 | call_to_action.data.enable && ( 9 |
10 |
11 |
12 |
13 |
14 | 22 |
23 |
24 |

28 |

32 | {call_to_action.data.button.enable && ( 33 | 39 | {call_to_action.data.button.label} 40 | 41 | )} 42 |

43 |
44 |
45 |
46 |
47 | ) 48 | } 49 | -------------------------------------------------------------------------------- /src/layouts/components/Breadcrumbs.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import { supportedLang } from "@/lib/utils/languageParser"; 3 | import { humanize } from "@/lib/utils/textConverter"; 4 | 5 | const { className }: { className?: string } = Astro.props; 6 | 7 | const paths = Astro.url.pathname.split("/").filter((x) => x); 8 | 9 | let lang = ""; 10 | if (supportedLang.includes(paths[0])) { 11 | lang = paths.shift()!; 12 | } 13 | 14 | let baseHref = lang ? `/${lang}` : "/"; 15 | let parts = [ 16 | { 17 | label: "Home", 18 | href: baseHref, 19 | "aria-label": 20 | Astro.url.pathname === baseHref || Astro.url.pathname === `${baseHref}/` 21 | ? "page" 22 | : undefined, 23 | }, 24 | ]; 25 | 26 | paths.forEach((label: string, i: number) => { 27 | const href = `${baseHref}${paths.slice(0, i + 1).join("/")}`; 28 | label !== "page" && 29 | parts.push({ 30 | label: humanize(label.replace(".html", "").replace(/[-_]/g, " ")) || "", 31 | href, 32 | "aria-label": Astro.url.pathname === href ? "page" : undefined, 33 | }); 34 | }); 35 | --- 36 | 37 | 55 | -------------------------------------------------------------------------------- /src/layouts/partials/Footer.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import Logo from "@/components/Logo.astro"; 3 | import Social from "@/components/Social.astro"; 4 | import config from "@/config/config.json"; 5 | import social from "@/config/social.json"; 6 | import { 7 | getLangFromUrl, 8 | getTranslations, 9 | slugSelector, 10 | } from "@/lib/utils/languageParser"; 11 | import { markdownify } from "@/lib/utils/textConverter"; 12 | import type { ContentEntryMap } from "astro:content"; 13 | 14 | const lang = getLangFromUrl(Astro.url); 15 | const menu = await getTranslations(lang as keyof ContentEntryMap); 16 | let footer: any = []; 17 | if (menu) { 18 | footer = menu.footer; 19 | } 20 | --- 21 | 22 |
23 |
24 |
25 |
26 | 27 |
28 |
29 |
    30 | { 31 | footer.map((menu: any) => ( 32 |
  • 33 | {menu.name} 34 |
  • 35 | )) 36 | } 37 |
38 |
39 |
40 | 41 |
42 |
43 |
44 |
45 |
46 |

47 |

48 |
49 |
50 | -------------------------------------------------------------------------------- /src/layouts/components/Share.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import config from "@/config/config.json"; 3 | import { 4 | IoLogoFacebook, 5 | IoLogoLinkedin, 6 | IoLogoPinterest, 7 | IoLogoTwitter, 8 | } from "react-icons/io5"; 9 | 10 | const { base_url }: { base_url: string } = config.site; 11 | const { 12 | title, 13 | description, 14 | slug, 15 | className, 16 | }: { title?: string; description?: string; slug?: string; className?: string } = 17 | Astro.props; 18 | --- 19 | 20 | 62 | -------------------------------------------------------------------------------- /src/content/sections/english/testimonial.md: -------------------------------------------------------------------------------- 1 | --- 2 | enable: true 3 | title: "What Users Are Saying About **Developer Blogs**" 4 | description: "Don't just take our word for it - hear from some of our satisfied users! Check out some of our testimonials below to see what others are saying about Developer Blogs." 5 | 6 | # Testimonials 7 | testimonials: 8 | - name: "Diego Santos" 9 | designation: "Contributor" 10 | avatar: "https://avatars.githubusercontent.com/u/112042899?v=4" 11 | content: "Loved how simple it is to add blogs here! The clean design and contributor-friendly setup make it a great space for developers." 12 | 13 | - name: "Bhavantu Vadoliya" 14 | designation: "Contributor" 15 | avatar: "https://avatars.githubusercontent.com/u/167995869?v=4" 16 | content: "Developer Blogs made my first GitHub contribution so smooth! The platform is easy to use, and the community is super supportive. " 17 | 18 | - name: "Harsh Bopaliya" 19 | designation: "Contributor" 20 | avatar: "https://avatars.githubusercontent.com/u/119851222?v=4" 21 | content: "This site helped me publish my first blog and contribute to open source. The process was straightforward, and the UI is fantastic!" 22 | 23 | - name: "Muhammad Zubair" 24 | designation: "Contributor" 25 | avatar: "https://avatars.githubusercontent.com/u/59169211?v=4" 26 | content: "Developer Blogs has been an awesome place to share my knowledge. It’s helped many first-time contributors (including me!) get started with GitHub." 27 | 28 | - name: "Siddharth Kumar" 29 | designation: "Contributor" 30 | avatar: "https://avatars.githubusercontent.com/u/91362871?v=4" 31 | content: "A great platform for tech writers and open-source enthusiasts! The blog submission process is easy, and contributing here was a great experience." 32 | 33 | --- 34 | -------------------------------------------------------------------------------- /src/lib/utils/textConverter.ts: -------------------------------------------------------------------------------- 1 | import { slug } from "github-slugger"; 2 | import { marked } from "marked"; 3 | 4 | // slugify 5 | export const slugify = (content: string) => { 6 | return slug(content); 7 | }; 8 | 9 | // markdownify 10 | export const markdownify = (content: string, div?: boolean) => { 11 | return div ? marked.parse(content) : marked.parseInline(content); 12 | }; 13 | 14 | // humanize 15 | export const humanize = (content: string) => { 16 | return content 17 | .replace(/^[\s_]+|[\s_]+$/g, "") 18 | .replace(/[_\s]+/g, " ") 19 | .replace(/[-\s]+/g, " ") 20 | .replace(/^[a-z]/, function (m) { 21 | return m.toUpperCase(); 22 | }); 23 | }; 24 | 25 | // titleify 26 | export const titleify = (content: string) => { 27 | const humanized = humanize(content); 28 | return humanized 29 | .split(" ") 30 | .map((word) => word.charAt(0).toUpperCase() + word.slice(1)) 31 | .join(" "); 32 | }; 33 | 34 | // plainify 35 | export const plainify = (content: string) => { 36 | const parseMarkdown: any = marked.parse(content); 37 | const filterBrackets = parseMarkdown.replace(/<\/?[^>]+(>|$)/gm, ""); 38 | const filterSpaces = filterBrackets.replace(/[\r\n]\s*[\r\n]/gm, ""); 39 | const stripHTML = htmlEntityDecoder(filterSpaces); 40 | return stripHTML; 41 | }; 42 | 43 | // strip entities for plainify 44 | const htmlEntityDecoder = (htmlWithEntities: string) => { 45 | let entityList: { [key: string]: string } = { 46 | " ": " ", 47 | "<": "<", 48 | ">": ">", 49 | "&": "&", 50 | """: '"', 51 | "'": "'", 52 | }; 53 | let htmlWithoutEntities: string = htmlWithEntities.replace( 54 | /(&|<|>|"|')/g, 55 | (entity: string): string => { 56 | return entityList[entity]; 57 | }, 58 | ); 59 | return htmlWithoutEntities; 60 | }; 61 | -------------------------------------------------------------------------------- /src/styles/navigation.scss: -------------------------------------------------------------------------------- 1 | // navbar toggler 2 | input#nav-toggle:checked + label #show-button { 3 | @apply hidden; 4 | } 5 | 6 | input#nav-toggle:checked + label #hide-button { 7 | @apply block; 8 | } 9 | 10 | input#nav-toggle:checked ~ #nav-menu { 11 | @apply block; 12 | } 13 | 14 | .header { 15 | @apply bg-body py-6 dark:bg-darkmode-body; 16 | } 17 | 18 | // navbar items 19 | .navbar { 20 | @apply relative flex flex-wrap items-center justify-between; 21 | } 22 | 23 | .navbar-brand { 24 | @apply text-xl font-semibold text-dark dark:text-darkmode-dark; 25 | image { 26 | @apply max-h-full max-w-full; 27 | } 28 | } 29 | 30 | .navbar-nav { 31 | @apply text-center lg:text-left; 32 | } 33 | 34 | // .nav-item { 35 | // @apply mx-3; 36 | // } 37 | 38 | .nav-link { 39 | @apply text-dark hover:text-primary dark:text-darkmode-dark dark:hover:text-darkmode-primary block p-3 font-semibold transition lg:px-2 lg:py-3; 40 | } 41 | 42 | .nav-dropdown { 43 | @apply mr-0; 44 | } 45 | 46 | .nav-dropdown-list { 47 | @apply z-10 min-w-[180px] rounded bg-body p-4 shadow dark:bg-darkmode-body; 48 | } 49 | 50 | .nav-dropdown-item { 51 | @apply mb-2; 52 | } 53 | 54 | .nav-dropdown-link { 55 | @apply block py-1 font-semibold text-dark transition hover:text-primary dark:text-darkmode-text dark:hover:text-darkmode-primary; 56 | } 57 | 58 | //theme-switcher 59 | .theme-switcher { 60 | @apply inline-flex; 61 | 62 | label { 63 | @apply relative inline-block h-4 w-6 cursor-pointer rounded-2xl bg-border lg:w-10; 64 | } 65 | 66 | input { 67 | @apply absolute opacity-0; 68 | } 69 | 70 | span { 71 | @apply absolute -top-1 left-0 flex h-6 w-6 items-center justify-center rounded-full bg-dark transition-all duration-300 dark:bg-white; 72 | } 73 | 74 | input:checked + label { 75 | span { 76 | @apply lg:left-4; 77 | } 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /src/pages/[...lang]/tags/index.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import config from "@/config/config.json"; 3 | import Base from "@/layouts/Base.astro"; 4 | import { getAllTaxonomy, getTaxonomy } from "@/lib/taxonomyParser.astro"; 5 | import { slugSelector, supportedLang } from "@/lib/utils/languageParser"; 6 | import { humanize } from "@/lib/utils/textConverter"; 7 | import PageHeader from "@/partials/PageHeader.astro"; 8 | import type { ContentEntryMap } from "astro:content"; 9 | const { default_language } = config.settings; 10 | 11 | export function getStaticPaths() { 12 | const paths = supportedLang.map((lang) => ({ 13 | params: { lang: lang || undefined }, 14 | })); 15 | return paths; 16 | } 17 | 18 | let { lang } = Astro.params; 19 | 20 | if (!lang) { 21 | lang = default_language; 22 | } 23 | const langCollection: keyof ContentEntryMap = lang as keyof ContentEntryMap; 24 | const tags = await getTaxonomy(langCollection, "tags"); 25 | const allTags = await getAllTaxonomy(langCollection, "tags"); 26 | --- 27 | 28 | 29 | 30 |
31 |
32 | 52 |
53 |
54 | 55 | -------------------------------------------------------------------------------- /src/pages/[...lang]/categories/index.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import config from "@/config/config.json"; 3 | import Base from "@/layouts/Base.astro"; 4 | import { getAllTaxonomy, getTaxonomy } from "@/lib/taxonomyParser.astro"; 5 | import { slugSelector, supportedLang } from "@/lib/utils/languageParser"; 6 | import { humanize } from "@/lib/utils/textConverter"; 7 | import PageHeader from "@/partials/PageHeader.astro"; 8 | import type { ContentEntryMap } from "astro:content"; 9 | const { default_language } = config.settings; 10 | 11 | export function getStaticPaths() { 12 | const paths = supportedLang.map((lang) => ({ 13 | params: { lang: lang || undefined }, 14 | })); 15 | return paths; 16 | } 17 | 18 | let { lang } = Astro.params; 19 | if (!lang) { 20 | lang = default_language; 21 | } 22 | 23 | const langCollection: keyof ContentEntryMap = lang as keyof ContentEntryMap; 24 | const categories = await getTaxonomy(langCollection, "categories"); 25 | const allCategories = await getAllTaxonomy(langCollection, "categories"); 26 | --- 27 | 28 | 29 | 30 |
31 |
32 | 52 |
53 |
54 | 55 | -------------------------------------------------------------------------------- /src/layouts/components/Logo.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import config from "@/config/config.json"; 3 | import ImageMod from "./ImageMod.astro"; 4 | import { getLangFromUrl, slugSelector } from "@/lib/utils/languageParser"; 5 | 6 | const { src, srcDarkmode }: { src?: string; srcDarkmode?: string } = Astro.props; 7 | const { 8 | logo, 9 | logo_darkmode, 10 | logo_width, 11 | logo_height, 12 | logo_text, 13 | title, 14 | }: { 15 | logo: string; 16 | logo_darkmode: string; 17 | logo_width: any; 18 | logo_height: any; 19 | logo_text: string; 20 | title: string; 21 | } = config.site; 22 | 23 | const { theme_switcher }: { theme_switcher: boolean } = config.settings; 24 | const { default_language } = config.settings; 25 | 26 | let lang = getLangFromUrl(Astro.url); 27 | 28 | const disabledLanguages = config.settings.disable_languages as string[]; 29 | if (disabledLanguages.includes(lang)) { 30 | lang = default_language; 31 | } 32 | --- 33 | 34 | 35 | { 36 | src || srcDarkmode || logo || logo_darkmode ? ( 37 | <> 38 | 50 | {theme_switcher && ( 51 | 63 | )} 64 | 65 | ) : logo_text ? ( 66 | logo_text 67 | ) : ( 68 | title 69 | ) 70 | } 71 | 72 | -------------------------------------------------------------------------------- /astro.config.mjs: -------------------------------------------------------------------------------- 1 | import mdx from "@astrojs/mdx"; 2 | import react from "@astrojs/react"; 3 | import sitemap from "@astrojs/sitemap"; 4 | import tailwind from "@astrojs/tailwind"; 5 | import AutoImport from "astro-auto-import"; 6 | import { defineConfig, squooshImageService } from "astro/config"; 7 | import remarkCollapse from "remark-collapse"; 8 | import remarkToc from "remark-toc"; 9 | import config from "./src/config/config.json"; 10 | import languagesJSON from "./src/config/language.json"; 11 | const { default_language } = config.settings; 12 | 13 | const supportedLang = [...languagesJSON.map((lang) => lang.languageCode)]; 14 | const disabledLanguages = config.settings.disable_languages; 15 | 16 | // Filter out disabled languages from supportedLang 17 | const filteredSupportedLang = supportedLang.filter( 18 | (lang) => !disabledLanguages.includes(lang), 19 | ); 20 | 21 | // https://astro.build/config 22 | export default defineConfig({ 23 | site: config.site.base_url ? config.site.base_url : "http://examplesite.com", 24 | base: config.site.base_path ? config.site.base_path : "/", 25 | trailingSlash: config.site.trailing_slash ? "always" : "ignore", 26 | i18n: { 27 | locales: filteredSupportedLang, 28 | defaultLocale: default_language, 29 | }, 30 | image: { 31 | service: squooshImageService(), 32 | }, 33 | integrations: [ 34 | react(), 35 | sitemap(), 36 | tailwind({ 37 | applyBaseStyles: false, 38 | }), 39 | AutoImport({ 40 | imports: [ 41 | "@/shortcodes/Button", 42 | "@/shortcodes/Accordion", 43 | "@/shortcodes/Notice", 44 | "@/shortcodes/Video", 45 | "@/shortcodes/Youtube", 46 | "@/shortcodes/Tabs", 47 | "@/shortcodes/Tab", 48 | ], 49 | }), 50 | mdx(), 51 | ], 52 | markdown: { 53 | remarkPlugins: [ 54 | remarkToc, 55 | [ 56 | remarkCollapse, 57 | { 58 | test: "Table of contents", 59 | }, 60 | ], 61 | ], 62 | shikiConfig: { 63 | theme: "one-dark-pro", 64 | wrap: true, 65 | }, 66 | extendDefaultPlugins: true, 67 | }, 68 | }); 69 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "astroplate", 3 | "version": "4.0.1", 4 | "description": "Astro and Tailwindcss boilerplate", 5 | "author": "zeon.studio", 6 | "license": "MIT", 7 | "packageManager": "yarn@1.22.19", 8 | "scripts": { 9 | "dev": "yarn generate-json && astro dev", 10 | "build": "yarn generate-json && astro build", 11 | "preview": "astro preview", 12 | "format": "prettier -w ./src", 13 | "check": "astro check", 14 | "generate-json": "node scripts/jsonGenerator.js", 15 | "remove-darkmode": "node scripts/removeDarkmode.js && yarn format", 16 | "remove-multilang": "node scripts/removeMultilang.js && yarn format" 17 | }, 18 | "dependencies": { 19 | "@astrojs/check": "^0.9.3", 20 | "@astrojs/mdx": "^3.1.4", 21 | "@astrojs/react": "^3.6.2", 22 | "@astrojs/rss": "^4.0.7", 23 | "@astrojs/sitemap": "^3.1.6", 24 | "@astrojs/tailwind": "^5.1.0", 25 | "astro": "^4.14.5", 26 | "astro-auto-import": "^0.4.2", 27 | "astro-font": "^0.1.81", 28 | "date-fns": "^3.6.0", 29 | "disqus-react": "^1.1.5", 30 | "github-slugger": "^2.0.0", 31 | "gray-matter": "^4.0.3", 32 | "marked": "^14.1.0", 33 | "prettier-plugin-astro": "^0.14.1", 34 | "prettier-plugin-tailwindcss": "^0.6.6", 35 | "prop-types": "^15.8.1", 36 | "react": "^18.3.1", 37 | "react-dom": "^18.3.1", 38 | "react-icons": "^5.3.0", 39 | "react-lite-youtube-embed": "^2.4.0", 40 | "remark-collapse": "^0.1.2", 41 | "remark-toc": "^9.0.0", 42 | "swiper": "^11.1.10" 43 | }, 44 | "devDependencies": { 45 | "@tailwindcss/forms": "^0.5.7", 46 | "@tailwindcss/typography": "^0.5.14", 47 | "@types/marked": "^5.0.2", 48 | "@types/node": "22.5.0", 49 | "@types/react": "18.3.4", 50 | "@types/react-dom": "18.3.0", 51 | "autoprefixer": "^10.4.20", 52 | "eslint": "^9.9.1", 53 | "postcss": "^8.4.41", 54 | "prettier": "^3.3.3", 55 | "prettier-plugin-astro": "^0.14.1", 56 | "prettier-plugin-tailwindcss": "^0.6.6", 57 | "sass": "^1.77.8", 58 | "sharp": "0.33.5", 59 | "tailwind-bootstrap-grid": "^5.1.0", 60 | "tailwindcss": "^3.4.10", 61 | "typescript": "^5.5.4" 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/layouts/partials/PostSidebar.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import { getLangFromUrl, slugSelector } from "@/lib/utils/languageParser"; 3 | import { humanize } from "@/lib/utils/textConverter"; 4 | 5 | const { tags, categories, allCategories } = Astro.props; 6 | const lang = getLangFromUrl(Astro.url); 7 | --- 8 | 9 |
10 |
11 | 12 |
13 |
Categories
14 |
15 |
    16 | { 17 | categories.map((category: any) => { 18 | const count = allCategories.filter( 19 | (c: any) => c === category 20 | ).length; 21 | return ( 22 |
  • 23 | 27 | {humanize(category)} ({count}) 28 | 29 |
  • 30 | ); 31 | }) 32 | } 33 |
34 |
35 |
36 | 37 | 38 |
39 |
Tags
40 |
41 | 57 |
58 |
59 |
60 |
61 | -------------------------------------------------------------------------------- /src/layouts/components/ImageMod.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import type { ImageMetadata } from "astro"; 3 | import { Image } from "astro:assets"; 4 | 5 | // Props interface for the component 6 | interface Props { 7 | src: string; 8 | alt: string; 9 | width: number; 10 | height: number; 11 | loading?: "eager" | "lazy" | null | undefined; 12 | decoding?: "async" | "auto" | "sync" | null | undefined; 13 | format?: "auto" | "avif" | "jpeg" | "png" | "svg" | "webp"; 14 | class?: string; 15 | style?: any; 16 | } 17 | 18 | // Destructuring Astro.props to get the component's props 19 | let { 20 | src, 21 | alt, 22 | width, 23 | height, 24 | loading, 25 | decoding, 26 | class: className, 27 | format, 28 | style, 29 | } = Astro.props; 30 | 31 | // Determine if the src is an external URL or a local path 32 | const isExternal = src.startsWith("http") || src.startsWith("https"); 33 | 34 | // Handle external and local image paths 35 | const imageSrc = isExternal ? src : `/public${src}`; 36 | 37 | // Glob pattern to load images from the /public/images folder 38 | const images = import.meta.glob("/public/images/**/*.{jpeg,jpg,png,gif}"); 39 | 40 | // Check if the source path is valid (only for local images) 41 | const isValidPath = isExternal || images[imageSrc] ? true : false; 42 | 43 | // Log a warning message in red if the image is not found (only for local images) 44 | !isValidPath && 45 | !isExternal && 46 | console.error( 47 | `\x1b[31mImage not found - ${imageSrc}.\x1b[0m Make sure the image is in the /public/images folder.`, 48 | ); 49 | --- 50 | 51 | { 52 | isValidPath && ( 53 | isExternal ? ( 54 | {alt} 64 | ) : ( 65 | } 67 | alt={alt} 68 | width={width} 69 | height={height} 70 | loading={loading} 71 | decoding={decoding} 72 | class={className} 73 | format={format} 74 | style={style} 75 | /> 76 | ) 77 | ) 78 | } 79 | -------------------------------------------------------------------------------- /src/pages/[...lang]/tags/[tag].astro: -------------------------------------------------------------------------------- 1 | --- 2 | import BlogCard from "@/components/BlogCard.astro"; 3 | import config from "@/config/config.json"; 4 | import Base from "@/layouts/Base.astro"; 5 | import { getSinglePage } from "@/lib/contentParser.astro"; 6 | import { getTaxonomy } from "@/lib/taxonomyParser.astro"; 7 | import { supportedLang } from "@/lib/utils/languageParser"; 8 | import { sortByDate } from "@/lib/utils/sortFunctions"; 9 | import taxonomyFilter from "@/lib/utils/taxonomyFilter"; 10 | import PageHeader from "@/partials/PageHeader.astro"; 11 | import type { ContentEntryMap } from "astro:content"; 12 | 13 | // get all static paths for tags 14 | export async function getStaticPaths() { 15 | const { default_language } = config.settings; 16 | 17 | const paths = await Promise.all( 18 | supportedLang.map(async (lang) => { 19 | const tags = await getTaxonomy(lang as keyof ContentEntryMap, "tags"); 20 | 21 | return tags.map((tag) => ({ 22 | params: { 23 | lang: lang || undefined, 24 | tag: tag, 25 | }, 26 | props: { 27 | tag, 28 | }, 29 | })); 30 | }) 31 | ); 32 | 33 | // Handle default path (no lang) 34 | const defaultCategories = await getTaxonomy( 35 | default_language as keyof ContentEntryMap, 36 | "tags" 37 | ); 38 | const defaultPaths = defaultCategories.map((tag) => ({ 39 | params: { 40 | lang: undefined, 41 | tag: tag, 42 | }, 43 | props: { 44 | tag, 45 | }, 46 | })); 47 | 48 | return [...paths.flat(), ...defaultPaths]; 49 | } 50 | 51 | const { tag, lang } = Astro.params; 52 | 53 | // get posts by tag 54 | const BLOG_FOLDER = "blog"; 55 | const posts = await getSinglePage(BLOG_FOLDER, lang as keyof ContentEntryMap); 56 | const filterByTags = taxonomyFilter(posts, "tags", tag!); 57 | const sortedPosts = sortByDate(filterByTags); 58 | --- 59 | 60 | 61 | 62 |
63 |
64 |
65 | { 66 | sortedPosts.map((post) => ( 67 |
68 | 69 |
70 | )) 71 | } 72 |
73 |
74 |
75 | 76 | -------------------------------------------------------------------------------- /src/layouts/helpers/LanguageSwitcher.tsx: -------------------------------------------------------------------------------- 1 | import config from "@/config/config.json"; 2 | import languages from "@/config/language.json"; 3 | import React from "react"; 4 | 5 | const LanguageSwitcher = ({ 6 | lang, 7 | pathname, 8 | }: { 9 | lang: string; 10 | pathname: string; 11 | }) => { 12 | const { default_language, default_language_in_subdir } = config.settings; 13 | 14 | // Function to remove trailing slash if necessary 15 | const removeTrailingSlash = (path: string) => { 16 | if (!config.site.trailing_slash) { 17 | return path.replace(/\/$/, ""); 18 | } 19 | return path; 20 | }; 21 | 22 | // Sort languages by weight and filter out disabled languages 23 | const sortedLanguages = languages 24 | // @ts-ignore 25 | .filter(language => !config.settings.disable_languages.includes(language.languageCode)) 26 | .sort((a, b) => a.weight - b.weight); 27 | 28 | return ( 29 |
1 ? "block" : "hidden"}`}> 30 | 61 |
62 | ); 63 | }; 64 | 65 | export default LanguageSwitcher; 66 | -------------------------------------------------------------------------------- /scripts/removeMultilang.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs"); 2 | const path = require("path"); 3 | const languages = require("../src/config/language.json"); 4 | 5 | // Filter out the English language 6 | const englishLang = languages.filter((item) => item.languageCode === "en"); 7 | const filterLangs = languages.filter((item) => item.languageCode !== "en"); 8 | const contentDir = "src/content"; 9 | const configDir = "src/config"; 10 | const i18nDir = "src/i18n"; 11 | 12 | // Update language.json to only include the English language 13 | fs.writeFileSync( 14 | path.join(configDir, "language.json"), 15 | JSON.stringify(englishLang, null, 2), 16 | ); 17 | 18 | // Remove content directories for languages other than English 19 | filterLangs.forEach((lang) => { 20 | const langContentDir = path.join(contentDir, lang.contentDir); 21 | fs.rm(langContentDir, { recursive: true, force: true }, (err) => { 22 | if (err) { 23 | console.error(`Error deleting folder ${langContentDir}:`, err); 24 | return; 25 | } 26 | console.log(`Folder ${langContentDir} deleted successfully`); 27 | }); 28 | }); 29 | 30 | // Remove other menu.{lang}.json files except menu.en.json 31 | fs.readdir(configDir, (err, files) => { 32 | if (err) { 33 | console.error("Error reading config directory:", err); 34 | return; 35 | } 36 | 37 | files.forEach((file) => { 38 | if (file.startsWith("menu.") && file !== "menu.en.json") { 39 | const filePath = path.join(configDir, file); 40 | fs.unlink(filePath, (err) => { 41 | if (err) { 42 | console.error(`Error deleting file ${filePath}:`, err); 43 | return; 44 | } 45 | console.log(`File ${filePath} deleted successfully`); 46 | }); 47 | } 48 | }); 49 | }); 50 | 51 | // Remove other language files from i18n folder except en.json 52 | fs.readdir(i18nDir, (err, files) => { 53 | if (err) { 54 | console.error("Error reading i18n directory:", err); 55 | return; 56 | } 57 | 58 | files.forEach((file) => { 59 | if (file !== "en.json") { 60 | const filePath = path.join(i18nDir, file); 61 | fs.unlink(filePath, (err) => { 62 | if (err) { 63 | console.error(`Error deleting file ${filePath}:`, err); 64 | return; 65 | } 66 | console.log(`File ${filePath} deleted successfully`); 67 | }); 68 | } 69 | }); 70 | }); 71 | 72 | console.log("Cleanup completed."); 73 | -------------------------------------------------------------------------------- /src/layouts/shortcodes/Tabs.tsx: -------------------------------------------------------------------------------- 1 | import { marked } from "marked"; 2 | import React, { useEffect, useRef, useState } from "react"; 3 | 4 | const Tabs = ({ children }: { children: React.ReactElement }) => { 5 | const [active, setActive] = useState(0); 6 | const [defaultFocus, setDefaultFocus] = useState(false); 7 | 8 | const tabRefs: React.RefObject = useRef([]); 9 | useEffect(() => { 10 | if (defaultFocus) { 11 | //@ts-ignore 12 | tabRefs.current[active]?.focus(); 13 | } else { 14 | setDefaultFocus(true); 15 | } 16 | }, [active]); 17 | 18 | const tabLinks = Array.from( 19 | children.props.value.matchAll( 20 | /]*>(.*?)<\/div>/gs, 21 | ), 22 | (match: RegExpMatchArray) => ({ name: match[1], children: match[0] }), 23 | ); 24 | 25 | const handleKeyDown = ( 26 | event: React.KeyboardEvent, 27 | index: number, 28 | ) => { 29 | if (event.key === "Enter" || event.key === " ") { 30 | setActive(index); 31 | } else if (event.key === "ArrowRight") { 32 | setActive((active + 1) % tabLinks.length); 33 | } else if (event.key === "ArrowLeft") { 34 | setActive((active - 1 + tabLinks.length) % tabLinks.length); 35 | } 36 | }; 37 | 38 | return ( 39 |
40 |
    41 | {tabLinks.map( 42 | (item: { name: string; children: string }, index: number) => ( 43 |
  • handleKeyDown(event, index)} 49 | onClick={() => setActive(index)} 50 | //@ts-ignore 51 | ref={(ref) => (tabRefs.current[index] = ref)} 52 | > 53 | {item.name} 54 |
  • 55 | ), 56 | )} 57 |
58 | {tabLinks.map((item: { name: string; children: string }, i: number) => ( 59 |
66 | ))} 67 |
68 | ); 69 | }; 70 | 71 | export default Tabs; 72 | -------------------------------------------------------------------------------- /src/layouts/components/BlogCard.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import config from "@/config/config.json"; 3 | import dateFormat from "@/lib/utils/dateFormat"; 4 | import { 5 | getLangFromUrl, 6 | getTranslations, 7 | slugSelector, 8 | } from "@/lib/utils/languageParser"; 9 | import { humanize, plainify, slugify } from "@/lib/utils/textConverter"; 10 | import type { ContentEntryMap } from "astro:content"; 11 | import { FaRegFolder, FaRegUserCircle } from "react-icons/fa"; 12 | import ImageMod from "./ImageMod.astro"; 13 | 14 | const { summary_length }: { summary_length: number; blog_folder: string } = 15 | config.settings; 16 | const { data } = Astro.props; 17 | const { title, image, date, author, categories } = data.data; 18 | 19 | const lang = getLangFromUrl(Astro.url); 20 | const { read_more } = await getTranslations(lang as keyof ContentEntryMap); 21 | 22 | const slugParts = data.slug.split("/"); 23 | slugParts[0] = "blog"; 24 | const modifiedSlug = slugParts.join("/"); 25 | data.slug = modifiedSlug; 26 | --- 27 | 28 |
29 | { 30 | image && ( 31 | 39 | ) 40 | } 41 |

42 | 43 | {title} 44 | 45 |

46 | 67 |

{plainify(data.body?.slice(0, Number(summary_length)))}

68 | 72 | {read_more} 73 | 74 |
75 | -------------------------------------------------------------------------------- /src/pages/[...lang]/categories/[category].astro: -------------------------------------------------------------------------------- 1 | --- 2 | import BlogCard from "@/components/BlogCard.astro"; 3 | import config from "@/config/config.json"; 4 | import Base from "@/layouts/Base.astro"; 5 | import { getSinglePage } from "@/lib/contentParser.astro"; 6 | import { getTaxonomy } from "@/lib/taxonomyParser.astro"; 7 | import { supportedLang } from "@/lib/utils/languageParser"; 8 | import { sortByDate } from "@/lib/utils/sortFunctions"; 9 | import taxonomyFilter from "@/lib/utils/taxonomyFilter"; 10 | import PageHeader from "@/partials/PageHeader.astro"; 11 | import type { ContentEntryMap } from "astro:content"; 12 | 13 | // get all static paths for categories 14 | export async function getStaticPaths() { 15 | const { default_language } = config.settings; 16 | 17 | const paths = await Promise.all( 18 | supportedLang.map(async (lang) => { 19 | const categories = await getTaxonomy( 20 | lang as keyof ContentEntryMap, 21 | "categories" 22 | ); 23 | 24 | return categories.map((category) => ({ 25 | params: { 26 | lang: lang || undefined, 27 | category: category, 28 | }, 29 | props: { 30 | category, 31 | }, 32 | })); 33 | }) 34 | ); 35 | 36 | // Handle default path (no lang) 37 | const defaultCategories = await getTaxonomy( 38 | default_language as keyof ContentEntryMap, 39 | "categories" 40 | ); 41 | const defaultPaths = defaultCategories.map((category) => ({ 42 | params: { 43 | lang: undefined, 44 | category: category, 45 | }, 46 | props: { 47 | category, 48 | }, 49 | })); 50 | 51 | return [...paths.flat(), ...defaultPaths]; 52 | } 53 | 54 | const { category, lang } = Astro.params; 55 | 56 | // get posts by category 57 | const BLOG_FOLDER = "blog"; 58 | const posts = await getSinglePage(BLOG_FOLDER, lang as keyof ContentEntryMap); 59 | const filterByCategories = taxonomyFilter(posts, "categories", category!); 60 | const sortedPosts = sortByDate(filterByCategories); 61 | --- 62 | 63 | 64 | 65 |
66 |
67 |
68 | { 69 | sortedPosts.map((post) => ( 70 |
71 | 72 |
73 | )) 74 | } 75 |
76 |
77 |
78 | 79 | -------------------------------------------------------------------------------- /src/pages/[...lang]/blog/index.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import BlogCard from "@/components/BlogCard.astro"; 3 | import Pagination from "@/components/Pagination.astro"; 4 | import config from "@/config/config.json"; 5 | import Base from "@/layouts/Base.astro"; 6 | import { getListPage, getSinglePage } from "@/lib/contentParser.astro"; 7 | import { getAllTaxonomy, getTaxonomy } from "@/lib/taxonomyParser.astro"; 8 | import { supportedLang } from "@/lib/utils/languageParser"; 9 | import { sortByDate } from "@/lib/utils/sortFunctions"; 10 | import PageHeader from "@/partials/PageHeader.astro"; 11 | import PostSidebar from "@/partials/PostSidebar.astro"; 12 | import type { ContentEntryMap } from "astro:content"; 13 | 14 | export function getStaticPaths() { 15 | const paths = supportedLang.map((lang) => ({ 16 | params: { lang: lang || undefined }, 17 | })); 18 | return paths; 19 | } 20 | const { lang } = Astro.params; 21 | const BLOG_FOLDER = "blog"; 22 | const postIndex = await getListPage( 23 | BLOG_FOLDER, 24 | lang as keyof ContentEntryMap 25 | ); 26 | const langCollection: keyof ContentEntryMap = lang as keyof ContentEntryMap; 27 | const posts = await getSinglePage(BLOG_FOLDER, lang as keyof ContentEntryMap); 28 | 29 | const allCategories = await getAllTaxonomy(langCollection, "categories"); 30 | const categories = await getTaxonomy(langCollection, "categories"); 31 | const tags = await getTaxonomy(langCollection, "tags"); 32 | const sortedPosts = sortByDate(posts); 33 | const totalPages: number = Math.ceil(posts.length / config.settings.pagination); 34 | const currentPosts = sortedPosts.slice(0, config.settings.pagination); 35 | --- 36 | 37 | 43 | 44 |
45 |
46 | 47 |
48 | { 49 | currentPosts.map((post) => ( 50 |
51 | 52 |
53 | )) 54 | } 55 |
56 | 61 | 62 | 63 |
64 | 69 |
70 |
71 |
72 | 73 | -------------------------------------------------------------------------------- /src/lib/taxonomyParser.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import config from "@/config/config.json"; 3 | import languages from "@/config/language.json"; 4 | import { slugify } from "@/lib/utils/textConverter"; 5 | import type { ContentEntryMap } from "astro:content"; 6 | import { getCollection } from "astro:content"; 7 | 8 | // get taxonomy from frontmatter 9 | export const getTaxonomy = async (collection: string, name: string) => { 10 | const { default_language } = config.settings; 11 | 12 | const language = languages.find((l) => l.languageCode === collection); 13 | 14 | let actualCollection = default_language; 15 | if (language) { 16 | actualCollection = language.contentDir; 17 | } else { 18 | const defaultLanguageMatch = languages.find( 19 | (l) => l.languageCode === default_language 20 | ); 21 | if (defaultLanguageMatch) { 22 | actualCollection = defaultLanguageMatch.contentDir; 23 | } 24 | } 25 | 26 | const singlePages = await getCollection( 27 | "blog" as keyof ContentEntryMap, 28 | ({ id }: any) => { 29 | return id.startsWith(actualCollection) && !id.endsWith("-index.md"); 30 | } 31 | ); 32 | const taxonomyPages = singlePages.map((page: any) => page.data[name]); 33 | let taxonomies: string[] = []; 34 | for (let i = 0; i < taxonomyPages.length; i++) { 35 | const categoryArray = taxonomyPages[i]; 36 | for (let j = 0; j < categoryArray.length; j++) { 37 | taxonomies.push(slugify(categoryArray[j])); 38 | } 39 | } 40 | const taxonomy = [...new Set(taxonomies)]; 41 | return taxonomy; 42 | }; 43 | 44 | // get all taxonomies from frontmatter 45 | export const getAllTaxonomy = async (collection: string, name: string) => { 46 | const { default_language } = config.settings; 47 | 48 | const language = languages.find((l) => l.languageCode === collection); 49 | 50 | let actualCollection = default_language; 51 | if (language) { 52 | actualCollection = language.contentDir; 53 | } else { 54 | const defaultLanguageMatch = languages.find( 55 | (l) => l.languageCode === default_language 56 | ); 57 | if (defaultLanguageMatch) { 58 | actualCollection = defaultLanguageMatch.contentDir; 59 | } 60 | } 61 | 62 | const singlePages = await getCollection( 63 | "blog" as keyof ContentEntryMap, 64 | ({ id }: any) => { 65 | return id.startsWith(actualCollection) && !id.endsWith("-index.md"); 66 | } 67 | ); 68 | const taxonomyPages = singlePages.map((page: any) => page.data[name]); 69 | let taxonomies: string[] = []; 70 | for (let i = 0; i < taxonomyPages.length; i++) { 71 | const categoryArray = taxonomyPages[i]; 72 | for (let j = 0; j < categoryArray.length; j++) { 73 | taxonomies.push(slugify(categoryArray[j])); 74 | } 75 | } 76 | return taxonomies; 77 | }; 78 | --- 79 | -------------------------------------------------------------------------------- /src/pages/[...lang]/authors/[single].astro: -------------------------------------------------------------------------------- 1 | --- 2 | import BlogCard from "@/components/BlogCard.astro"; 3 | import ImageMod from "@/components/ImageMod.astro"; 4 | import Social from "@/components/Social.astro"; 5 | import Base from "@/layouts/Base.astro"; 6 | import { getSinglePage } from "@/lib/contentParser.astro"; 7 | import { supportedLang } from "@/lib/utils/languageParser"; 8 | import { slugify } from "@/lib/utils/textConverter"; 9 | import type { ContentEntryMap } from "astro:content"; 10 | 11 | // get all static paths for authors 12 | export async function getStaticPaths() { 13 | const COLLECTION_FOLDER = "authors"; 14 | 15 | const paths = await Promise.all( 16 | supportedLang.map(async (lang) => { 17 | const authors = await getSinglePage( 18 | COLLECTION_FOLDER, 19 | lang as keyof ContentEntryMap 20 | ); 21 | 22 | return authors.map((author) => ({ 23 | params: { 24 | lang: lang || undefined, 25 | single: author.slug.split("/").pop(), 26 | }, 27 | props: { 28 | author, 29 | lang, 30 | }, 31 | })); 32 | }) 33 | ); 34 | return paths.flat(); 35 | } 36 | 37 | const { author, lang } = Astro.props; 38 | const { title, social, meta_title, description, image } = author.data; 39 | const { Content } = await author.render(); 40 | 41 | // get all posts by author 42 | const BLOG_FOLDER = "blog"; 43 | const posts = await getSinglePage(BLOG_FOLDER, lang as keyof ContentEntryMap); 44 | const postFilterByAuthor = posts.filter( 45 | (post) => slugify(post.data.author) === slugify(title) 46 | ); 47 | --- 48 | 49 | 55 |
56 |
57 |
60 |
61 | { 62 | image && ( 63 | 71 | ) 72 | } 73 |

{title}

74 |
75 | 76 |
77 | 78 |
79 |
80 | 81 |
82 | { 83 | postFilterByAuthor.map((post) => ( 84 |
85 | 86 |
87 | )) 88 | } 89 |
90 |
91 |
92 | 93 | -------------------------------------------------------------------------------- /scripts/jsonGenerator.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs"); 2 | const path = require("path"); 3 | const matter = require("gray-matter"); 4 | const languages = require("../src/config/language.json"); 5 | 6 | const JSON_FOLDER = "./.json"; 7 | const CONTENT_ROOT = "src/content"; 8 | const CONTENT_DEPTH = 3; 9 | const BLOG_FOLDER = "blog"; 10 | 11 | // get data from markdown 12 | const getData = (folder, groupDepth, langIndex = 0) => { 13 | const getPaths = languages 14 | .map((lang, index) => { 15 | const langFolder = lang.contentDir ? lang.contentDir : lang.languageCode; 16 | const dir = path.join(CONTENT_ROOT, folder, langFolder); 17 | return fs 18 | .readdirSync(dir) 19 | .filter( 20 | (filename) => 21 | !filename.startsWith("-") && 22 | (filename.endsWith(".md") || filename.endsWith(".mdx")), 23 | ) 24 | .flatMap((filename) => { 25 | const filepath = path.join(dir, filename); 26 | const stats = fs.statSync(filepath); 27 | const isFolder = stats.isDirectory(); 28 | 29 | if (isFolder) { 30 | return getData(filepath, groupDepth, index); 31 | } else { 32 | const file = fs.readFileSync(filepath, "utf-8"); 33 | const { data, content } = matter(file); 34 | const pathParts = filepath.split(path.sep); 35 | 36 | let slug; 37 | if (data.slug) { 38 | const slugParts = data.slug.split("/"); 39 | slugParts[0] = BLOG_FOLDER; 40 | slug = slugParts.join("/"); 41 | } else { 42 | slug = pathParts 43 | .slice(CONTENT_DEPTH) 44 | .join("/") 45 | .replace(/\.[^/.]+$/, ""); 46 | slug = `${BLOG_FOLDER}/${slug.split("/").slice(1).join("/")}`; 47 | } 48 | data.slug = slug; 49 | const group = "blog"; 50 | 51 | return { 52 | lang: languages[index].languageCode, // Set the correct language code dynamically 53 | group: group, 54 | slug: data.slug, 55 | frontmatter: data, 56 | content: content, 57 | }; 58 | } 59 | }); 60 | }) 61 | .flat(); 62 | 63 | const publishedPages = getPaths.filter((page) => !page.frontmatter?.draft); 64 | return publishedPages; 65 | }; 66 | 67 | try { 68 | // create folder if it doesn't exist 69 | if (!fs.existsSync(JSON_FOLDER)) { 70 | fs.mkdirSync(JSON_FOLDER); 71 | } 72 | 73 | // create json files 74 | fs.writeFileSync( 75 | `${JSON_FOLDER}/posts.json`, 76 | JSON.stringify(getData(BLOG_FOLDER, 3)), 77 | ); 78 | 79 | // merge json files for search 80 | const posts = require(`../${JSON_FOLDER}/posts.json`); 81 | const search = [...posts]; 82 | fs.writeFileSync(`${JSON_FOLDER}/search.json`, JSON.stringify(search)); 83 | } catch (err) { 84 | console.error(err); 85 | } 86 | -------------------------------------------------------------------------------- /src/content/blog/english/siddharth.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Keeper: A Simple Password Manager" 3 | meta_title: "" 4 | description: "A guide to understanding Keeper, a password manager built using the MERN stack. This article includes its features, implementation, and the technology used to ensure secure password management." 5 | date: 2024-10-09T10:00:00 6 | image: '/images/Keeper.png' 7 | categories: ["Software"] 8 | author: "Siddharth Kumar" 9 | tags: ["Password Manager", "MERN Stack", "JavaScript"] 10 | draft: false 11 | --- 12 | 13 | Managing multiple passwords can be overwhelming, but Keeper offers a simple solution. Keeper is a password manager that allows users to securely store, view, and manage their passwords. Built with the MERN stack, it provides users with an easy-to-use interface. 14 | 15 | ### Project Purpose and Objectives 16 | Keeper was developed to provide users with a secure and efficient way to manage their passwords. The primary objectives of the project were to create an intuitive user interface for storing and retrieving passwords, Ultimately, Keeper aims to simplify password management, allowing users to focus on their tasks without worrying about remembering multiple passwords. 17 | 18 | ### Technologies and Tools Used 19 | The Keeper project is built using the MERN stack, which includes: 20 | - **MongoDB:** For storing user passwords in a database. 21 | - **Express.js:** To handle server-side logic and API requests. 22 | - **React.js:** For creating a dynamic and responsive user interface. 23 | - **Node.js:** To facilitate server-side operations and manage communication between the frontend and backend. Additionally, Axios is used for making HTTP requests from the frontend to the backend. 24 | 25 | ### Key Challenges Encountered and Solutions 26 | - **User Experience:** Designing a user-friendly interface that is also functional was a challenge. To address this, we focused on creating a clean and intuitive layout, gathering user feedback, and making iterative improvements to enhance usability. 27 | - **Data Management:** Organizing and retrieving a large number of passwords effectively was another challenge. We implemented a simple categorization feature to allow users to sort and filter their passwords easily. 28 | - **Cross-Origin Resource Sharing (CORS):** Handling CORS issues while connecting the frontend and backend was tricky. We resolved this by configuring CORS in the Express.js server to allow requests from the frontend domain. 29 | 30 | ### Lessons Learned and Improvements Made 31 | This project taught me the importance of creating a seamless user experience, particularly in applications that involve managing personal data. I learned to prioritize usability by conducting user testing and incorporating feedback into the design process. Additionally, I recognized the significance of efficient data management practices in ensuring that users can easily access their information. Moving forward, I plan to implement additional features, such as password categorization and searching, to further enhance the functionality of Keeper. 32 | 33 | -------------------------------------------------------------------------------- /src/content/homepage/french/-index.md: -------------------------------------------------------------------------------- 1 | --- 2 | # Banner 3 | banner: 4 | title: "Le modèle de démarrage ultime dont vous avez besoin pour démarrer votre projet Astro" 5 | content: "Astroplate est un modèle de démarrage gratuit construit avec Astro et TailwindCSS, fournissant tout ce dont vous avez besoin pour démarrer votre projet Astro et gagner un temps précieux." 6 | image: "/images/banner.png" 7 | button: 8 | enable: true 9 | label: "Commencer gratuitement" 10 | link: "https://github.com/zeon-studio/astroplate" 11 | 12 | # Features 13 | features: 14 | - title: "Ce qui est inclus dans Astroplate" 15 | image: "/images/service-1.png" 16 | content: "Astroplate est un modèle de démarrage complet qui inclut tout ce dont vous avez besoin pour démarrer votre projet Astro. Ce qui est inclus dans Astroplate" 17 | bulletpoints: 18 | - "10+ pages pré-construites" 19 | - "Score Google Pagespeed de 95+" 20 | - "Construit avec Astro et TailwindCSS pour un style facile et personnalisable" 21 | - "Entièrement responsive sur tous les appareils" 22 | - "Optimisé pour le référencement pour de meilleurs classements dans les moteurs de recherche" 23 | - "**Open-source et gratuit** pour une utilisation personnelle et commerciale" 24 | button: 25 | enable: false 26 | label: "Commencer maintenant" 27 | link: "#" 28 | 29 | - title: "Découvrez les fonctionnalités clés d'Astro" 30 | image: "/images/service-2.png" 31 | content: "Astro est un framework web tout-en-un pour construire des sites web rapides et centrés sur le contenu. Il offre une gamme de fonctionnalités excitantes pour les développeurs et les créateurs de sites web. Certaines des fonctionnalités clés sont :" 32 | bulletpoints: 33 | - "Zéro JS, par défaut : Aucun surcoût d'exécution JavaScript pour vous ralentir." 34 | - "Personnalisable : Tailwind, MDX et plus de 100 autres intégrations au choix." 35 | - "Agnostique à l'UI : Supporte React, Preact, Svelte, Vue, Solid, Lit et plus encore." 36 | button: 37 | enable: true 38 | label: "Commencer maintenant" 39 | link: "https://github.com/zeon-studio/astroplate" 40 | 41 | - title: "Les principales raisons de choisir Astro pour votre prochain projet" 42 | image: "/images/service-3.png" 43 | content: "Avec Astro, vous pouvez construire des sites web modernes et centrés sur le contenu sans sacrifier la performance ou la facilité d'utilisation." 44 | bulletpoints: 45 | - "Charge instantanée des sites statiques pour une meilleure expérience utilisateur et SEO." 46 | - "Syntaxe intuitive et support pour les frameworks populaires rendent l'apprentissage et l'utilisation d'Astro un jeu d'enfant." 47 | - "Utilisez n'importe quelle bibliothèque ou framework front-end, ou construisez des composants personnalisés, pour tout type de projet." 48 | - "Construit sur une technologie de pointe pour garder vos projets à jour avec les dernières normes web." 49 | button: 50 | enable: false 51 | label: "" 52 | link: "" 53 | --- 54 | -------------------------------------------------------------------------------- /src/content/blog/english/post-5.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Understand Bubble Sort Algorithm" 3 | meta_title: "" 4 | description: "Short guide designed to help new to understand Bubble Sort Algorithm, by an implementation in Ruby. It includes a step-by-step guide, code examples, and an analysis of time complexity." 5 | date: 2024-09-18T15:06:22 6 | image: '/images/algorithms.png' 7 | categories: ["Software"] 8 | author: "Diego Santos" 9 | tags: ["Algorithms", "Data structures", "Ruby"] 10 | draft: false 11 | --- 12 | 13 | Bubble Sort is a simple sorting algorithm that repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order. This process continues until the list is sorted. 14 | 15 | ### Understanding the Algorithm 16 | 1. **Iterate through the list:** Start from the first element and compare it with the next one. 17 | 2. **Compare and swap:** If the current element is greater than the next one, swap them. 18 | 3. **Repeat:** Move to the next element and repeat steps 1 and 2 until you reach the end of the list. 19 | 4. **Outer loop:** After one pass, the largest element will be at the end of the list. Repeat the entire process (outer loop) until the list is sorted. 20 | 21 | ### Ruby Implementation 22 | Here's a Ruby implementation of Bubble Sort: 23 | 24 | ```ruby 25 | def bubble_sort(array_to_sort) 26 | array_length = array_to_sort.length 27 | 28 | (1..array_length - 1).each do 29 | (1..array_length - 1).each.with_index do |i, _index| 30 | first_element = array_to_sort[i - 1] 31 | second_element = array_to_sort[i] 32 | 33 | if array_to_sort[i - 1] > array_to_sort[i] 34 | array_to_sort[i] = first_element 35 | array_to_sort[i - 1] = second_element 36 | end 37 | end 38 | end 39 | # Return the sorted array 40 | array_to_sort 41 | end 42 | 43 | # Example usage 44 | unsorted_array = [64, 34, 25, 12, 22, 11, 90] 45 | sorted_array = bubble_sort(unsorted_array) 46 | puts sorted_array 47 | ``` 48 | You could see this example going to this [repository](https://github.com/Sandotech/bubble_sort) 49 | 50 | ### Explanation: 51 | - **Outer loop:** Iterates `array_length - 1` times, where `array_length` is the length of the array. 52 | - **Inner loop:** Iterates from each element in thea array in each outer loop iteration. 53 | - **Comparison and swap:** Compares adjacent elements and swaps them if they are in the wrong order. 54 | - **Early termination:** If no swaps occur in an outer loop iteration, the list is already sorted, and the algorithm can terminate early. 55 | 56 | ### Time Complexity 57 | Bubble Sort has a time complexity of O(n^2) in the worst-case scenario, which occurs when the array is already sorted in reverse order. In the best-case scenario (array is already sorted), the time complexity is O(n). 58 | 59 | ### Conclusion 60 | Bubble Sort is a simple but inefficient sorting algorithm. While it's easy to understand and implement, it's not suitable for large datasets due to its quadratic time complexity. For more efficient sorting, consider algorithms like Merge Sort, Quick Sort, or Heap Sort. 61 | -------------------------------------------------------------------------------- /src/content/blog/english/teja.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Understanding Disaster Management Through Web Applications" 3 | meta_title: "" 4 | description: "Bharat Awareness of disaster management" 5 | date: 2024-10-17T05:00:00Z 6 | image: "https://media.licdn.com/dms/image/v2/C5112AQF9NW1MqWLfBg/article-cover_image-shrink_600_2000/article-cover_image-shrink_600_2000/0/1557920856514?e=2147483647&v=beta&t=VBTKPROf4yjur50WUTalADemVHfXoG91VfbmIggmiOs" 7 | categories: ["Project","Website","Software"] 8 | author: "Naidu Teja Reddy" 9 | tags: ["HTML", "CSS", "java Script"] 10 | draft: false 11 | --- 12 | 13 | **Introduction** 14 | 15 | In a world increasingly affected by natural disasters, effective disaster management is more crucial than ever. With technological advancements, web applications have become a vital tool in disaster response and management. This blog explores the significance of web applications in disaster management and how they can facilitate better communication and coordination during emergencies. 16 | 17 | The Role of Web Applications in Disaster Management 18 | 19 | Web applications serve various functions in disaster management, including: 20 | 21 | 1. Information Dissemination: During a disaster, timely and accurate information is essential. Web applications can provide real-time updates about the situation, safety measures, and available resources. They can serve as centralized platforms where users can access critical information instantly. 22 | 2. Emergency Response Coordination: Effective coordination among various agencies and organizations is vital for efficient disaster response. Web applications can facilitate communication between emergency responders, government officials, and the public, ensuring a more organized and swift response. 23 | 3. Resource Management: Managing resources effectively is crucial during disasters. Web applications can help track the availability and distribution of essential supplies, such as food, water, and medical aid, ensuring that help reaches those in need promptly. 24 | 4. Community Engagement: Engaging the community is vital for successful disaster management. Web applications can provide platforms for community members to share their experiences, report issues, and offer assistance to those affected. This fosters a sense of community and collective responsibility. 25 | 26 | **Case Study: BEMA Web Application** 27 | 28 | The BEMA (Basic Emergency Management Application) is a prime example of how a web application can streamline disaster management processes. The application features: 29 | 30 | • Search Functionality: Users can quickly search for specific information regarding ongoing disasters or safety measures. 31 | • Real-Time Updates: BEMA provides live updates about disaster situations, enabling users to stay informed. 32 | • Resource Allocation Table: The application displays critical resources available in various regions, ensuring that users can locate assistance swiftly. 33 | 34 | **Conclusion** 35 | 36 | Web applications like BEMA are transforming disaster management by enhancing communication, coordination, and resource management. As we continue to face the challenges posed by natural disasters, leveraging technology through web applications will be essential for effective disaster response and recovery. 37 | 38 | -------------------------------------------------------------------------------- /src/styles/search.scss: -------------------------------------------------------------------------------- 1 | .search { 2 | &-modal { 3 | @apply z-50 fixed -top-10 left-0 w-full h-full flex items-start justify-center invisible opacity-0; 4 | &.show { 5 | @apply visible opacity-100; 6 | } 7 | &-overlay { 8 | @apply fixed top-0 left-0 w-full h-full bg-black opacity-50; 9 | } 10 | } 11 | &-wrapper { 12 | @apply bg-white dark:bg-darkmode-body w-[660px] max-w-[96%] mt-24 rounded shadow-lg relative z-10; 13 | &-header { 14 | @apply p-4 relative; 15 | &-input { 16 | @apply border border-solid w-full focus:ring-0 focus:border-dark border-border rounded-[4px] h-12 pr-4 pl-10 transition duration-200 outline-none dark:bg-darkmode-theme-light dark:text-darkmode-text dark:border-darkmode-border dark:focus:border-darkmode-primary; 17 | } 18 | } 19 | &-body { 20 | @apply dark:bg-darkmode-theme-light dark:shadow-none max-h-[calc(100vh-350px)] overflow-y-auto bg-theme-light shadow-[inset_0_2px_18px_#ddd] p-4 rounded; 21 | } 22 | &-footer { 23 | @apply text-xs select-none leading-none md:flex items-center px-3.5 py-2 hidden; 24 | kbd { 25 | @apply bg-theme-light dark:bg-darkmode-theme-light text-xs leading-none text-center mr-[3px] px-1 py-0.5 rounded-[3px]; 26 | } 27 | span:not(:last-child) { 28 | @apply mr-4; 29 | } 30 | span:last-child { 31 | @apply ml-auto; 32 | } 33 | } 34 | } 35 | &-result { 36 | &-empty { 37 | @apply text-center cursor-text select-none px-0 py-8; 38 | } 39 | &-group { 40 | @apply mb-4; 41 | &-title { 42 | @apply text-lg text-dark dark:text-darkmode-dark mb-[5px] px-3; 43 | } 44 | } 45 | &-item { 46 | @apply rounded border bg-white dark:bg-darkmode-body dark:border-darkmode-border flex items-start mb-1 p-4 scroll-my-[30px] border-solid border-border relative; 47 | mark { 48 | @apply bg-yellow-200 rounded-[2px]; 49 | } 50 | &-title { 51 | @apply text-lg font-bold text-dark dark:text-darkmode-dark leading-none; 52 | } 53 | &-link::after { 54 | @apply absolute top-0 right-0 bottom-0 left-0 z-10 content-[""]; 55 | } 56 | &-image { 57 | @apply shrink-0 mr-3.5; 58 | img { 59 | @apply w-[60px] h-[60px] md:w-[100px] md:h-[100px] rounded-[4px] object-cover; 60 | } 61 | } 62 | &-description { 63 | @apply text-sm line-clamp-1 mt-1; 64 | } 65 | &-content { 66 | @apply mx-0 my-1.5 empty:hidden line-clamp-1; 67 | } 68 | &-taxonomies { 69 | @apply text-sm flex flex-wrap items-center text-light dark:text-darkmode-light; 70 | svg { 71 | @apply inline-block mr-1; 72 | } 73 | } 74 | 75 | &-active, 76 | &:focus, 77 | &:hover { 78 | @apply bg-dark dark:bg-dark; 79 | .search-result-item { 80 | &-title { 81 | @apply text-white; 82 | } 83 | &-description { 84 | @apply text-white/80; 85 | } 86 | &-content { 87 | @apply text-white/90; 88 | } 89 | &-taxonomies { 90 | @apply text-white/90; 91 | } 92 | } 93 | } 94 | } 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /scripts/removeDarkmode.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs"); 2 | const path = require("path"); 3 | 4 | (function () { 5 | const rootDirs = ["src/pages", "src/hooks", "src/layouts", "src/styles"]; 6 | 7 | const deleteAssetList = [ 8 | "public/images/logo-darkmode.png", 9 | "src/layouts/components/ThemeSwitcher.astro", 10 | ]; 11 | 12 | const configFiles = [ 13 | { 14 | filePath: "tailwind.config.js", 15 | patterns: ["darkmode:\\s*{[^}]*},", 'darkMode:\\s*"class",'], 16 | }, 17 | { filePath: "src/config/theme.json", patterns: ["colors.darkmode"] }, 18 | ]; 19 | 20 | const filePaths = [ 21 | { 22 | filePath: "src/layouts/partials/Header.astro", 23 | patterns: [ 24 | "]+)?\\s*(?:\\/\\>|>([\\s\\S]*?)<\\/ThemeSwitchers*>)", 25 | ], 26 | }, 27 | ]; 28 | 29 | filePaths.forEach(({ filePath, patterns }) => { 30 | removeDarkModeFromFiles(filePath, patterns); 31 | }); 32 | 33 | deleteAssetList.forEach(deleteAsset); 34 | function deleteAsset(asset) { 35 | try { 36 | fs.unlinkSync(asset); 37 | console.log(`${path.basename(asset)} deleted successfully!`); 38 | } catch (error) { 39 | console.error(`${asset} not found`); 40 | } 41 | } 42 | 43 | rootDirs.forEach(removeDarkModeFromPages); 44 | configFiles.forEach(removeDarkMode); 45 | 46 | function removeDarkModeFromFiles(filePath, regexPatterns) { 47 | const fileContent = fs.readFileSync(filePath, "utf8"); 48 | let updatedContent = fileContent; 49 | regexPatterns.forEach((pattern) => { 50 | const regex = new RegExp(pattern, "g"); 51 | updatedContent = updatedContent.replace(regex, ""); 52 | }); 53 | fs.writeFileSync(filePath, updatedContent, "utf8"); 54 | } 55 | 56 | function removeDarkModeFromPages(directoryPath) { 57 | const files = fs.readdirSync(directoryPath); 58 | 59 | files.forEach((file) => { 60 | const filePath = path.join(directoryPath, file); 61 | const stats = fs.statSync(filePath); 62 | if (stats.isDirectory()) { 63 | removeDarkModeFromPages(filePath); 64 | } else if (stats.isFile()) { 65 | removeDarkModeFromFiles(filePath, [ 66 | '(?:(?!["])\\S)*dark:(?:(?![,;"])\\S)*', 67 | ]); 68 | } 69 | }); 70 | } 71 | 72 | function removeDarkMode(configFile) { 73 | const { filePath, patterns } = configFile; 74 | if (filePath === "tailwind.config.js") { 75 | removeDarkModeFromFiles(filePath, patterns); 76 | } else { 77 | const contentFile = JSON.parse(fs.readFileSync(filePath, "utf8")); 78 | patterns.forEach((pattern) => deleteNestedProperty(contentFile, pattern)); 79 | fs.writeFileSync(filePath, JSON.stringify(contentFile)); 80 | } 81 | } 82 | 83 | function deleteNestedProperty(obj, propertyPath) { 84 | const properties = propertyPath.split("."); 85 | let currentObj = obj; 86 | for (let i = 0; i < properties.length - 1; i++) { 87 | const property = properties[i]; 88 | if (currentObj.hasOwnProperty(property)) { 89 | currentObj = currentObj[property]; 90 | } else { 91 | return; // Property not found, no need to continue 92 | } 93 | } 94 | delete currentObj[properties[properties.length - 1]]; 95 | } 96 | })(); 97 | -------------------------------------------------------------------------------- /src/content/blog/english/Time-Complexity.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "🕒 Demystifying Time Complexity: A Guide for Developers" 3 | meta_title: "Understanding Time Complexity in Algorithms and Its Importance" 4 | description: "📚 Learn the basics of time complexity, Big-O notation, and how to write efficient algorithms that scale with input size. Optimize your code today! 🚀" 5 | date: 2025-01-02T15:06:22 6 | image: 'https://cdn.botpenguin.com/assets/website/Time_Complexity_013225db4d.webp' 7 | categories: ["Algorithms", "Computer Science", "Programming"] 8 | author: 'Sravanthi' 9 | tags: ["Time Complexity", "Algorithms", "Big-O Notation", "Programming Tips"] 10 | draft: false 11 | --- 12 | 13 | Time complexity is a crucial concept in computer science, helping developers measure and optimize the efficiency of their algorithms. 🧠✨ This post explores what time complexity is, why it matters, and how you can apply it to write better code. Let’s dive in! 🌟 14 | 15 | --- 16 | 17 | ## 📖 What is Time Complexity? 18 | 19 | Time complexity refers to the amount of **time** an algorithm takes to run relative to the size of its input. It’s usually expressed in **Big-O Notation**, which describes the upper bound of an algorithm's runtime in the worst-case scenario. For example: 20 | - \( O(1) \): Constant time 21 | - \( O(n) \): Linear time 22 | - \( O(n^2) \): Quadratic time 23 | 24 | --- 25 | 26 | ## 🌟 Why is Time Complexity Important? 27 | 28 | 1. **Performance Matters**: Efficient algorithms save time and resources. 29 | 2. **Scalability**: Helps ensure your code works with large datasets. 30 | 3. **Optimization**: Identifies bottlenecks in your program. 31 | 32 | --- 33 | 34 | ## 🧠 Common Big-O Notations 35 | 36 | ### 1. **Constant Time – \( O(1) \)** 37 | 38 | The runtime does not depend on the input size. Example: Accessing an array element by index. 39 | 40 | ```python 41 | def get_first_element(arr): 42 | return arr[0] 43 | ``` 44 | 45 | ### 2. **Linear Time – ( O(n) )** 46 | 47 | The runtime grows linearly with the input size. Example: Iterating through a list. 48 | 49 | ```def find_max(arr): 50 | max_value = arr[0] 51 | for num in arr: 52 | if num > max_value: 53 | max_value = num 54 | return max_value 55 | ``` 56 | 57 | ### 3. **Quadratic Time – ( O(n^2) )** 58 | 59 | Occurs with nested loops. Example: Bubble sort. 60 | 61 | ```def bubble_sort(arr): 62 | for i in range(len(arr)): 63 | for j in range(0, len(arr) - i - 1): 64 | if arr[j] > arr[j + 1]: 65 | arr[j], arr[j + 1] = arr[j + 1], arr[j] 66 | ``` 67 | 68 | ### 🔧 **How to Analyze Time Complexity** 69 | 1.Identify the loops: Each loop increases complexity. 70 | 2.Break down operations: Combine complexities of independent sections. 71 | 3.Consider recursion depth: Recursive calls add to the runtime. 72 | 73 | ### 🚀 **Optimizing Algorithms** 74 | 75 | Tips: 76 | •Use efficient data structures (e.g., dictionaries, heaps). 77 | •Avoid unnecessary nested loops. 78 | •Prefer algorithms with lower time complexity, like merge sort over bubble sort. 79 | 80 | ### 🏁 **Conclusion** 81 | 82 | Mastering time complexity helps developers write efficient, scalable, and optimized code. With a solid understanding of these concepts, you’ll be better equipped to tackle real-world problems and build high-performance applications! 💡✨ 83 | 84 | HashNode Reference 85 | -------------------------------------------------------------------------------- /tailwind.config.js: -------------------------------------------------------------------------------- 1 | const theme = require("./src/config/theme.json"); 2 | 3 | let font_base = Number(theme.fonts.font_size.base.replace("px", "")); 4 | let font_scale = Number(theme.fonts.font_size.scale); 5 | let h6 = font_scale; 6 | let h5 = h6 * font_scale; 7 | let h4 = h5 * font_scale; 8 | let h3 = h4 * font_scale; 9 | let h2 = h3 * font_scale; 10 | let h1 = h2 * font_scale; 11 | 12 | let fontPrimaryType, fontSecondaryType; 13 | if (theme.fonts.font_family.primary) { 14 | fontPrimaryType = theme.fonts.font_family.primary_type; 15 | } 16 | if (theme.fonts.font_family.secondary) { 17 | fontSecondaryType = theme.fonts.font_family.secondary_type; 18 | } 19 | 20 | /** @type {import('tailwindcss').Config} */ 21 | module.exports = { 22 | content: ["./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}"], 23 | safelist: [{ pattern: /^swiper-/ }], 24 | darkMode: "class", 25 | theme: { 26 | screens: { 27 | sm: "540px", 28 | md: "768px", 29 | lg: "1024px", 30 | xl: "1280px", 31 | "2xl": "1536px", 32 | }, 33 | container: { 34 | center: true, 35 | padding: "2rem", 36 | }, 37 | extend: { 38 | colors: { 39 | text: theme.colors.default.text_color.default, 40 | light: theme.colors.default.text_color.light, 41 | dark: theme.colors.default.text_color.dark, 42 | primary: theme.colors.default.theme_color.primary, 43 | secondary: theme.colors.default.theme_color.secondary, 44 | body: theme.colors.default.theme_color.body, 45 | border: theme.colors.default.theme_color.border, 46 | "theme-light": theme.colors.default.theme_color.theme_light, 47 | "theme-dark": theme.colors.default.theme_color.theme_dark, 48 | darkmode: { 49 | text: theme.colors.darkmode.text_color.default, 50 | light: theme.colors.darkmode.text_color.light, 51 | dark: theme.colors.darkmode.text_color.dark, 52 | primary: theme.colors.darkmode.theme_color.primary, 53 | secondary: theme.colors.darkmode.theme_color.secondary, 54 | body: theme.colors.darkmode.theme_color.body, 55 | border: theme.colors.darkmode.theme_color.border, 56 | "theme-light": theme.colors.darkmode.theme_color.theme_light, 57 | "theme-dark": theme.colors.darkmode.theme_color.theme_dark, 58 | }, 59 | }, 60 | fontSize: { 61 | base: font_base + "px", 62 | "base-sm": font_base * 0.8 + "px", 63 | h1: h1 + "rem", 64 | "h1-sm": h1 * 0.9 + "rem", 65 | h2: h2 + "rem", 66 | "h2-sm": h2 * 0.9 + "rem", 67 | h3: h3 + "rem", 68 | "h3-sm": h3 * 0.9 + "rem", 69 | h4: h4 + "rem", 70 | h5: h5 + "rem", 71 | h6: h6 + "rem", 72 | }, 73 | fontFamily: { 74 | primary: ["var(--font-primary)", fontPrimaryType], 75 | secondary: ["var(--font-secondary)", fontSecondaryType], 76 | }, 77 | }, 78 | }, 79 | plugins: [ 80 | require("@tailwindcss/typography"), 81 | require("@tailwindcss/forms"), 82 | require("tailwind-bootstrap-grid")({ 83 | generateContainer: false, 84 | gridGutterWidth: "2rem", 85 | gridGutters: { 86 | 1: "0.25rem", 87 | 2: "0.5rem", 88 | 3: "1rem", 89 | 4: "1.5rem", 90 | 5: "3rem", 91 | }, 92 | }), 93 | ], 94 | }; 95 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # **Contributing to Dev-Blogs** 2 | 3 | Welcome, and thank you for considering contributing to **Dev-Blogs**! 🙌 We're excited to have you collaborate with us to build and improve this open-source project. Below are the guidelines to help you get started. 4 | 5 | --- 6 | 7 | ## **How Can You Contribute?** 8 | 9 | We welcome contributions of all kinds, including but not limited to: 10 | 11 | - **Adding Blog Posts**: Submit a technical blog post related to development, technology, or open-source. 12 | - **Fixing Bugs**: Find and fix bugs or issues within the project. 13 | - **Suggesting New Features**: Have a new feature in mind? Propose it or help implement it. 14 | - **Improving Documentation**: Help us maintain up-to-date and accurate documentation. 15 | 16 | --- 17 | 18 | ## **Step-by-Step Guide to Contributing** 19 | 20 | ### **1. Fork the Repository** 21 | To make contributions, you'll first need to fork the repository: 22 | 1. Navigate to the [Dev-Blogs repository](#). 23 | 2. Click the **Fork** button at the top-right corner to create a copy of the repository under your GitHub account. 24 | 25 | ### **2. Clone Your Fork** 26 | Once you've forked the repository, clone it to your local machine using the following command: 27 | ```bash 28 | git clone https://github.com/Snakes-n-Networks/Dev-blogs 29 | ``` 30 | This will create a local copy of the project on your machine. 31 | 32 | ### **3. Create a New Branch** 33 | Always work on a separate branch for your changes: 34 | ```bash 35 | git checkout -b my-feature-branch 36 | ``` 37 | Name your branch appropriately based on the changes you're making, e.g., `add-blog-post`, `fix-bug`, `improve-docs`. 38 | 39 | ### **4. Make Changes** 40 | - **For Blog Posts**: 41 | - Add your blog in the appropriate directory (e.g., `/content/blogs/`). 42 | - Blog posts should follow our markdown structure and guidelines outlined in the **[Blogging Guidelines](#)**. 43 | - Include images or links if needed and ensure your blog post is formatted correctly. 44 | 45 | - **For Code Contributions**: 46 | - Make sure you follow the project’s coding standards. 47 | - Ensure your changes are functional and, if possible, write tests to accompany your code. 48 | 49 | ### **5. Test Your Changes** 50 | Before submitting, test your changes locally to ensure they work as expected. For blog posts, you can preview the website: 51 | ```bash 52 | npm install 53 | npm run dev 54 | ``` 55 | This will start the local development server. 56 | 57 | ### **6. Commit Your Changes** 58 | After verifying your changes, stage the modified files and commit them: 59 | ```bash 60 | git add . 61 | git commit -m "Add: Description of changes" 62 | ``` 63 | - Use concise and descriptive commit messages (e.g., `Fix: Bug in navigation menu` or `Add: New blog post on JavaScript basics`). 64 | 65 | ### **7. Push Your Changes** 66 | Push your changes to your forked repository on GitHub: 67 | ```bash 68 | git push origin my-feature-branch 69 | ``` 70 | 71 | ### **8. Submit a Pull Request (PR)** 72 | Once your changes are pushed, go to the original **Dev-Blogs** repository and submit a pull request (PR): 73 | 1. Go to the **Pull Requests** tab. 74 | 2. Click **New Pull Request**. 75 | 3. Choose the branch with your changes and submit the PR. 76 | 4. In the PR description, clearly explain the changes you’ve made and why they are beneficial. 77 | 78 | Your pull request will then be reviewed by maintainers, and feedback may be provided. 79 | 80 | --- 81 | -------------------------------------------------------------------------------- /src/pages/[...lang]/blog/page/[slug].astro: -------------------------------------------------------------------------------- 1 | --- 2 | import BlogCard from "@/components/BlogCard.astro"; 3 | import Pagination from "@/components/Pagination.astro"; 4 | import config from "@/config/config.json"; 5 | import Base from "@/layouts/Base.astro"; 6 | import { getListPage, getSinglePage } from "@/lib/contentParser.astro"; 7 | import { getAllTaxonomy, getTaxonomy } from "@/lib/taxonomyParser.astro"; 8 | import { supportedLang } from "@/lib/utils/languageParser"; 9 | import { sortByDate } from "@/lib/utils/sortFunctions"; 10 | import PageHeader from "@/partials/PageHeader.astro"; 11 | import PostSidebar from "@/partials/PostSidebar.astro"; 12 | import type { ContentEntryMap } from "astro:content"; 13 | const BLOG_FOLDER = "blog"; 14 | const { default_language } = config.settings; 15 | 16 | let { slug, lang } = Astro.params; 17 | 18 | if (!lang) { 19 | lang = default_language; 20 | } 21 | 22 | const postIndex: any = await getListPage( 23 | BLOG_FOLDER, 24 | lang as keyof ContentEntryMap 25 | ); 26 | const posts = await getSinglePage(BLOG_FOLDER, lang as keyof ContentEntryMap); 27 | const allCategories = await getAllTaxonomy( 28 | lang as keyof ContentEntryMap, 29 | "categories" 30 | ); 31 | const categories = await getTaxonomy( 32 | lang as keyof ContentEntryMap, 33 | "categories" 34 | ); 35 | const tags = await getTaxonomy(lang as keyof ContentEntryMap, "tags"); 36 | const sortedPosts = sortByDate(posts); 37 | const totalPages = Math.ceil(posts.length / config.settings.pagination); 38 | const currentPage = slug && !isNaN(Number(slug)) ? Number(slug) : 1; 39 | const indexOfLastPost = currentPage * config.settings.pagination; 40 | const indexOfFirstPost = indexOfLastPost - config.settings.pagination; 41 | const currentPosts = sortedPosts.slice(indexOfFirstPost, indexOfLastPost); 42 | 43 | export async function getStaticPaths() { 44 | const BLOG_FOLDER = "blog"; 45 | 46 | const paths = await Promise.all( 47 | supportedLang.map(async (lang) => { 48 | const posts = await getSinglePage( 49 | BLOG_FOLDER, 50 | lang as keyof ContentEntryMap 51 | ); 52 | const totalPages = Math.ceil(posts.length / config.settings.pagination); 53 | const langString = lang.toString(); 54 | const langPaths = []; 55 | 56 | for (let i = 1; i < totalPages; i++) { 57 | langPaths.push({ 58 | params: { 59 | lang: langString || undefined, 60 | slug: (i + 1).toString(), 61 | }, 62 | }); 63 | } 64 | 65 | return langPaths; 66 | }) 67 | ); 68 | 69 | return paths.flat(); 70 | } 71 | --- 72 | 73 | 79 | 80 |
81 |
82 | 83 |
84 | { 85 | currentPosts.map((post) => ( 86 |
87 | 88 |
89 | )) 90 | } 91 |
92 | 97 | 98 | 99 |
100 | 105 |
106 |
107 |
108 | 109 | -------------------------------------------------------------------------------- /src/lib/utils/languageParser.ts: -------------------------------------------------------------------------------- 1 | import { getRelativeLocaleUrl } from "astro:i18n"; 2 | import config from "../../config/config.json"; 3 | import languagesJSON from "../../config/language.json"; 4 | const { default_language } = config.settings; 5 | 6 | const locales: { [key: string]: any } = {}; 7 | 8 | // Load menu and dictionary dynamically 9 | languagesJSON.forEach((language) => { 10 | const { languageCode } = language; 11 | import(`../../config/menu.${languageCode}.json`).then((menu) => { 12 | import(`../../i18n/${languageCode}.json`).then((dictionary) => { 13 | locales[languageCode] = { ...menu, ...dictionary }; 14 | }); 15 | }); 16 | }); 17 | 18 | // Extract all languages from the locales object 19 | const languages = Object.keys(locales); 20 | 21 | // Export the locales and languages 22 | export { languages, locales }; 23 | 24 | export function getLangFromUrl(url: URL): string { 25 | const [, lang] = url.pathname.split("/"); 26 | if (locales.hasOwnProperty(lang)) { 27 | return lang; 28 | } 29 | return default_language; 30 | } 31 | 32 | export const getTranslations = async (lang: string) => { 33 | const { 34 | default_language, 35 | disable_languages, 36 | }: { default_language: string; disable_languages: string[] } = 37 | config.settings; 38 | 39 | if (disable_languages.includes(lang)) { 40 | lang = default_language; 41 | } 42 | 43 | let language = languagesJSON.find((l) => l.languageCode === lang); 44 | 45 | if (!language) { 46 | lang = default_language; 47 | language = languagesJSON.find((l) => l.languageCode === default_language); 48 | } 49 | 50 | if (!language) { 51 | throw new Error("Default language not found"); 52 | } 53 | 54 | const contentDir = language.contentDir; 55 | 56 | let menu, dictionary; 57 | try { 58 | menu = await import(`../../config/menu.${lang}.json`); 59 | dictionary = await import(`../../i18n/${lang}.json`); 60 | } catch (error) { 61 | menu = await import(`../../config/menu.${default_language}.json`); 62 | dictionary = await import(`../../i18n/${default_language}.json`); 63 | } 64 | 65 | return { ...menu.default, ...dictionary.default, contentDir }; 66 | }; 67 | 68 | const supportedLang = ["", ...languagesJSON.map((lang) => lang.languageCode)]; 69 | const disabledLanguages = config.settings.disable_languages as string[]; 70 | 71 | // Filter out disabled languages from supportedLang 72 | const filteredSupportedLang = supportedLang.filter( 73 | (lang) => !disabledLanguages.includes(lang), 74 | ); 75 | 76 | export { filteredSupportedLang as supportedLang }; 77 | 78 | export const slugSelector = (url: string, lang: string) => { 79 | const { default_language, default_language_in_subdir } = config.settings; 80 | const { trailing_slash } = config.site; 81 | 82 | let constructedUrl; 83 | 84 | // Determine the initial URL structure based on language 85 | if (url === "/") { 86 | constructedUrl = lang === default_language ? "/" : `/${lang}`; 87 | } else { 88 | constructedUrl = getRelativeLocaleUrl(lang, url, { 89 | normalizeLocale: false, 90 | }); 91 | } 92 | 93 | // Add language path if necessary 94 | if (lang === default_language && default_language_in_subdir) { 95 | constructedUrl = `/${lang}${constructedUrl}`; 96 | } 97 | 98 | // Adjust for trailing slash 99 | if (trailing_slash) { 100 | if (!constructedUrl.endsWith("/")) { 101 | constructedUrl += "/"; 102 | } 103 | } else { 104 | if (constructedUrl.endsWith("/") && constructedUrl !== "/") { 105 | constructedUrl = constructedUrl.slice(0, -1); 106 | } 107 | } 108 | 109 | return constructedUrl; 110 | }; 111 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | ##### Optimize default expiration time - BEGIN 2 | 3 | 4 | ## Enable expiration control 5 | ExpiresActive On 6 | 7 | ## CSS and JS expiration: 1 week after request 8 | ExpiresByType text/css "now plus 1 week" 9 | ExpiresByType application/javascript "now plus 1 week" 10 | ExpiresByType application/x-javascript "now plus 1 week" 11 | 12 | ## Image files expiration: 1 month after request 13 | ExpiresByType image/bmp "now plus 1 month" 14 | ExpiresByType image/gif "now plus 1 month" 15 | ExpiresByType image/jpeg "now plus 1 month" 16 | ExpiresByType image/webp "now plus 1 month" 17 | ExpiresByType image/jp2 "now plus 1 month" 18 | ExpiresByType image/pipeg "now plus 1 month" 19 | ExpiresByType image/png "now plus 1 month" 20 | ExpiresByType image/svg+xml "now plus 1 month" 21 | ExpiresByType image/tiff "now plus 1 month" 22 | ExpiresByType image/x-icon "now plus 1 month" 23 | ExpiresByType image/ico "now plus 1 month" 24 | ExpiresByType image/icon "now plus 1 month" 25 | ExpiresByType text/ico "now plus 1 month" 26 | ExpiresByType application/ico "now plus 1 month" 27 | ExpiresByType image/vnd.wap.wbmp "now plus 1 month" 28 | 29 | ## Font files expiration: 1 month after request 30 | ExpiresByType application/x-font-ttf "now plus 1 month" 31 | ExpiresByType application/x-font-opentype "now plus 1 month" 32 | ExpiresByType application/x-font-woff "now plus 1 month" 33 | ExpiresByType font/woff2 "now plus 1 month" 34 | ExpiresByType image/svg+xml "now plus 1 month" 35 | 36 | ## Audio files expiration: 1 month after request 37 | ExpiresByType audio/ogg "now plus 1 month" 38 | ExpiresByType application/ogg "now plus 1 month" 39 | ExpiresByType audio/basic "now plus 1 month" 40 | ExpiresByType audio/mid "now plus 1 month" 41 | ExpiresByType audio/midi "now plus 1 month" 42 | ExpiresByType audio/mpeg "now plus 1 month" 43 | ExpiresByType audio/mp3 "now plus 1 month" 44 | ExpiresByType audio/x-aiff "now plus 1 month" 45 | ExpiresByType audio/x-mpegurl "now plus 1 month" 46 | ExpiresByType audio/x-pn-realaudio "now plus 1 month" 47 | ExpiresByType audio/x-wav "now plus 1 month" 48 | 49 | ## Movie files expiration: 1 month after request 50 | ExpiresByType application/x-shockwave-flash "now plus 1 month" 51 | ExpiresByType x-world/x-vrml "now plus 1 month" 52 | ExpiresByType video/x-msvideo "now plus 1 month" 53 | ExpiresByType video/mpeg "now plus 1 month" 54 | ExpiresByType video/mp4 "now plus 1 month" 55 | ExpiresByType video/quicktime "now plus 1 month" 56 | ExpiresByType video/x-la-asf "now plus 1 month" 57 | ExpiresByType video/x-ms-asf "now plus 1 month" 58 | 59 | ##### Optimize default expiration time - END 60 | 61 | ##### 1 Month for most static resources 62 | 63 | Header set Cache-Control "max-age=2592000, public" 64 | 65 | 66 | ##### Enable gzip compression for resources 67 | 68 | mod_gzip_on Yes 69 | mod_gzip_dechunk Yes 70 | mod_gzip_item_include file .(html?|txt|css|js|php)$ 71 | mod_gzip_item_include handler ^cgi-script$ 72 | mod_gzip_item_include mime ^text/.* 73 | mod_gzip_item_include mime ^application/x-javascript.* 74 | mod_gzip_item_exclude mime ^image/.* 75 | mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.* 76 | 77 | 78 | ##### Or, compress certain file types by extension: 79 | 80 | SetOutputFilter DEFLATE 81 | 82 | 83 | ##### Set Header Vary: Accept-Encoding 84 | 85 | 86 | Header append Vary: Accept-Encoding 87 | 88 | -------------------------------------------------------------------------------- /src/layouts/components/ThemeSwitcher.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import config from "@/config/config.json"; 3 | 4 | const { theme_switcher }: { theme_switcher: boolean; default_theme: string } = 5 | config.settings; 6 | const { className }: { className?: string } = Astro.props; 7 | --- 8 | 9 | { 10 | theme_switcher && ( 11 |
12 | 13 | 41 |
42 | ) 43 | } 44 | 45 | 90 | -------------------------------------------------------------------------------- /src/lib/contentParser.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import { 3 | getCollection, 4 | type CollectionEntry, 5 | type CollectionKey, 6 | type ContentEntryMap, 7 | } from "astro:content"; 8 | 9 | import config from "@/config/config.json"; 10 | import languages from "@/config/language.json"; 11 | 12 | export const getSP = async ( 13 | collectionName: C, 14 | lang: keyof ContentEntryMap | undefined 15 | ): Promise[]> => { 16 | const { default_language } = config.settings; 17 | 18 | const selectedLanguageCode = lang || default_language; 19 | 20 | const language = languages.find( 21 | (l: any) => l.languageCode === selectedLanguageCode 22 | ); 23 | 24 | if (!language) { 25 | throw new Error("Language not found"); 26 | } 27 | 28 | const { contentDir } = language; 29 | 30 | const pages: CollectionEntry[] = (await getCollection( 31 | contentDir as any, 32 | ({ id }: any) => { 33 | return id.startsWith(collectionName) && !id.endsWith("-index.md"); 34 | } 35 | )) as CollectionEntry[]; 36 | 37 | // @ts-ignore 38 | const removeDrafts = pages.filter((data) => !data.data.draft); 39 | 40 | return removeDrafts; 41 | }; 42 | 43 | export const getLP = async ( 44 | collectionName: C, 45 | lang: keyof ContentEntryMap | undefined 46 | ): Promise[]> => { 47 | const { default_language } = config.settings; 48 | 49 | const selectedLanguageCode = lang || default_language; 50 | 51 | const language = languages.find( 52 | (l: any) => l.languageCode == selectedLanguageCode 53 | ); 54 | 55 | if (!language) { 56 | throw new Error("Language not found"); 57 | } 58 | 59 | const { contentDir } = language; 60 | 61 | const pages: CollectionEntry[] = (await getCollection( 62 | contentDir as any, 63 | ({ id }: any) => { 64 | return id.startsWith(collectionName); 65 | } 66 | )) as CollectionEntry[]; 67 | 68 | return pages; 69 | }; 70 | 71 | export const getSinglePage = async ( 72 | collectionName: C, 73 | lang: keyof ContentEntryMap | undefined, 74 | subCollectionName?: string 75 | ): Promise[]> => { 76 | const { default_language } = config.settings; 77 | 78 | const selectedLanguageCode = lang || default_language; 79 | 80 | const language = languages.find( 81 | (l: any) => l.languageCode === selectedLanguageCode 82 | ); 83 | 84 | if (!language) { 85 | throw new Error("Language not found"); 86 | } 87 | 88 | const { contentDir } = language; 89 | 90 | const path = subCollectionName 91 | ? `${contentDir}/${subCollectionName}` 92 | : contentDir; 93 | 94 | const pages: CollectionEntry[] = (await getCollection( 95 | collectionName as any, 96 | ({ id }: any) => { 97 | return id.startsWith(path) && !id.endsWith("-index.md"); 98 | } 99 | )) as CollectionEntry[]; 100 | 101 | // @ts-ignore 102 | const removeDrafts = pages.filter((data) => !data.data.draft); 103 | 104 | return removeDrafts; 105 | }; 106 | 107 | export const getListPage = async ( 108 | collectionName: C, 109 | lang: keyof ContentEntryMap | undefined 110 | ): Promise[]> => { 111 | const { default_language } = config.settings; 112 | 113 | const selectedLanguageCode = lang || default_language; 114 | 115 | const language = languages.find( 116 | (l: any) => l.languageCode == selectedLanguageCode 117 | ); 118 | 119 | if (!language) { 120 | throw new Error("Language not found"); 121 | } 122 | 123 | const { contentDir } = language; 124 | 125 | const pages: CollectionEntry[] = (await getCollection( 126 | collectionName as any, 127 | ({ id }: any) => { 128 | return id.startsWith(contentDir); 129 | } 130 | )) as CollectionEntry[]; 131 | 132 | return pages; 133 | }; 134 | --- 135 | -------------------------------------------------------------------------------- /src/content/blog/english/Chitesh.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Building a Decentralized Cryptocurrency Exchange" 3 | meta_title: "" 4 | description: "Blog on decentralized crypto exchange" 5 | date: 2024-09-26T05:00:00Z 6 | image: "https://pixelplex.io/wp-content/uploads/2023/10/how-to-build-decentralized-crypto-exchange-main-1600.jpg" 7 | categories: ["Project","Web development"] 8 | author: "Chitesh MSV" 9 | tags: ["Python"] 10 | draft: false 11 | --- 12 | 13 | 14 | 15 | **Team: Clueless Coders** 16 | - **Team Members**: Chitesh MSV, Priyanka Dhinakar, Sajietha K, Jayanth M 17 | - **Contact**: mchitesh7@gmail.com | 18 | 19 | --- 20 | 21 | In today's rapidly evolving financial world, cryptocurrency exchanges play a crucial role. However, most of these platforms are centralized, controlled by a single entity. This centralization leads to issues such as: 22 | 1. **Limited Control** over individual crypto assets. 23 | 2. **Barriers to Entry**, such as Know Your Customer (KYC) requirements. 24 | 3. **controlling entity**, which might lead to unfair trading practices. 25 | 26 | Our team proposes a **Decentralized Application (dApp)** that serves as a decentralized cryptocurrency exchange. The platform aims to address the above challenges, providing a fair and open system for all users. 27 | 28 | ### Problem Statement 29 | 30 | Centralized exchanges, while offering convenience, come with a set of limitations. Users face challenges such as: 31 | - Lack of control over their assets. 32 | - Restrictive KYC requirements. 33 | - Potentially unethical practices by central authorities. 34 | 35 | ### Proposed Solution 36 | 37 | Our proposed dApp focuses on decentralized, permissionless trading with features such as: 38 | - **Decentralized Trading**: Users maintain control over their assets without relying on a central authority. 39 | - **Accessibility**: Open to all, regardless of geographical or regulatory barriers. 40 | - **Transparency and Security**: Ensures user trust through open-source smart contracts and decentralized governance. 41 | 42 | ### Methodology 43 | 44 | 1. **Smart Contract Development**: 45 | - We will develop robust contracts for secure token exchange and liquidity pool management. 46 | - The contracts will handle **token swapping** and display real-time **liquidity information**. 47 | 48 | 2. **Frontend Development**: 49 | - User interfaces will allow users to easily swap tokens and view liquidity pools. 50 | - A seamless connection to user wallets, like **MetaMask**, will enable smooth transactions. 51 | 52 | 3. **Integration and Testing**: 53 | - **Component integration**: Each module will be tested to ensure smooth interaction. 54 | - **Rigorous Testing**: Includes bug detection and elimination for an optimized experience. 55 | 56 | 4. **Deployment**: 57 | - We'll deploy the dApp on **Netlify**, a popular web hosting platform, for a reliable and fast user experience. 58 | 59 | ### Expected Impact 60 | 61 | By offering a decentralized trading platform, we can: 62 | - Eliminate the need for intermediaries, giving users full control over their funds. 63 | - Enable unrestricted access to financial systems for people worldwide. 64 | - Foster a more secure and transparent trading environment. 65 | 66 | ### Implementation Plan 67 | 68 | 1. **Smart Contract Development**: Code the logic for token exchange and liquidity pools. 69 | 2. **Frontend Development**: Build a user-friendly interface for wallet integration and token swapping. 70 | 3. **Integration and Testing**: Ensure that all components work seamlessly together. 71 | 4. **Deployment**: Launch the platform on a decentralized host. 72 | 73 | --- 74 | 75 | ### Team Expertise 76 | 77 | We are a group of passionate developers with experience in: 78 | - **Smart Contracts**: Coding secure and scalable contracts on Ethereum. 79 | - **Frontend Development**: Designing user-centric dApps. 80 | - **Integration and Testing**: Ensuring seamless interaction between the smart contracts and the user interface. 81 | 82 | --- 83 | [Refernece](https://docs.google.com/presentation/d/1EKuO0JD-LjZjGDEn8eQVMqiQyoiap_fe/edit?usp=sharing&ouid=105355364858122246330&rtpof=true&sd=true) 84 | 85 | -------------------------------------------------------------------------------- /src/content/config.ts: -------------------------------------------------------------------------------- 1 | import { defineCollection, z } from "astro:content"; 2 | 3 | // Blog collection schema 4 | const blogCollection = defineCollection({ 5 | schema: z.object({ 6 | title: z.string(), 7 | meta_title: z.string().optional(), 8 | description: z.string().optional(), 9 | date: z.date().optional(), 10 | image: z.string().optional(), 11 | author: z.string().default("Admin"), 12 | categories: z.array(z.string()).default(["others"]), 13 | tags: z.array(z.string()).default(["others"]), 14 | draft: z.boolean().optional(), 15 | }), 16 | }); 17 | 18 | // Author collection schema 19 | const authorsCollection = defineCollection({ 20 | schema: z.object({ 21 | title: z.string(), 22 | meta_title: z.string().optional(), 23 | email: z.string().optional(), 24 | image: z.string().optional(), 25 | description: z.string().optional(), 26 | social: z 27 | .array( 28 | z 29 | .object({ 30 | name: z.string().optional(), 31 | icon: z.string().optional(), 32 | link: z.string().optional(), 33 | }) 34 | .optional(), 35 | ) 36 | .optional(), 37 | draft: z.boolean().optional(), 38 | }), 39 | }); 40 | 41 | // Pages collection schema 42 | const pagesCollection = defineCollection({ 43 | schema: z.object({ 44 | title: z.string(), 45 | meta_title: z.string().optional(), 46 | description: z.string().optional(), 47 | image: z.string().optional(), 48 | draft: z.boolean().optional(), 49 | }), 50 | }); 51 | 52 | // Contact collection schema 53 | const contactCollection = defineCollection({ 54 | schema: z.object({ 55 | title: z.string(), 56 | meta_title: z.string().optional(), 57 | description: z.string(), 58 | image: z.string().optional(), 59 | draft: z.boolean().optional(), 60 | }), 61 | }); 62 | 63 | // About collection schema 64 | const aboutCollection = defineCollection({ 65 | schema: z.object({ 66 | title: z.string(), 67 | meta_title: z.string().optional(), 68 | description: z.string().optional(), 69 | image: z.string(), 70 | draft: z.boolean().optional(), 71 | }), 72 | }); 73 | 74 | // Banner schema 75 | const bannerSchema = z.object({ 76 | title: z.string(), 77 | content: z.string(), 78 | image: z.string(), 79 | button: z.object({ 80 | enable: z.boolean(), 81 | label: z.string(), 82 | link: z.string(), 83 | }), 84 | }); 85 | 86 | // Features schema 87 | const featureSchema = z.object({ 88 | title: z.string(), 89 | image: z.string(), 90 | content: z.string(), 91 | bulletpoints: z.array(z.string()), 92 | button: z.object({ 93 | enable: z.boolean(), 94 | label: z.string().optional(), 95 | link: z.string().optional(), 96 | }), 97 | }); 98 | 99 | // Content schema (for the main content structure with banner and features) 100 | const contentSchema = z.object({ 101 | banner: bannerSchema, 102 | features: z.array(featureSchema), 103 | }); 104 | 105 | // Content collection schema 106 | const contentCollection = defineCollection({ 107 | schema: contentSchema, 108 | }); 109 | 110 | // Testimonial schema 111 | const testimonialSchema = z.object({ 112 | name: z.string(), 113 | designation: z.string(), 114 | avatar: z.string(), 115 | content: z.string(), 116 | }); 117 | 118 | // Testimonials schema 119 | const testimonialsSchema = z.array(testimonialSchema); 120 | 121 | // Call to Action schema 122 | const callToActionSchema = z.object({ 123 | enable: z.boolean(), 124 | title: z.string(), 125 | image: z.string(), 126 | description: z.string(), 127 | button: z.object({ 128 | enable: z.boolean(), 129 | label: z.string(), 130 | link: z.string().url(), 131 | }), 132 | }); 133 | 134 | // Export collections 135 | export const collections = { 136 | blog: blogCollection, 137 | authors: authorsCollection, 138 | pages: pagesCollection, 139 | contact: contactCollection, 140 | about: aboutCollection, 141 | content: contentCollection, 142 | testimonials: testimonialsSchema, 143 | callToAction: callToActionSchema, 144 | }; 145 | -------------------------------------------------------------------------------- /src/content/blog/english/Metaverse.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "The Metaverse" 3 | meta_title: "Redefining Digital Realities" 4 | description: "Explore the transformative world of the Metaverse, where virtual and physical realities merge. Discover its core technologies, applications across industries like gaming, education, and healthcare, and the challenges shaping its future. Step into this digital frontier and see how it’s redefining human interaction and innovation." 5 | date: 2025-01-10T23:55:22 6 | image: '/images/metaverse blog image.png' 7 | categories: ["AR & VR", " Blockchain", "Cybersecurity", " Machine Learning", " Artificial Intelligence"] 8 | author: "Bhavantu Vadoliya" 9 | tags: ["AI Engineer", "Machine Learning", "Artificial Intelligence"," Blockchain", "Cybersecurity"] 10 | draft: false 11 | --- 12 | 13 | > The Metaverse: Redefining Digital Realities 14 | 15 | In recent years, the term "Metaverse" has gained immense popularity. From tech enthusiasts to corporate leaders, everyone is buzzing about the potential of this transformative technology. But what is the Metaverse, and why is it shaping the future of digital interaction? 16 | 17 | --- 18 | 19 | > Understanding the Metaverse 20 | The Metaverse is a shared virtual space that blends augmented reality (AR), virtual reality (VR), and the internet. It’s an immersive digital environment where users can interact, socialize, work, and play through avatars, breaking the barriers of physical distance. 21 | 22 | Imagine walking through a virtual shopping mall, attending a concert from your living room, or collaborating with colleagues in a lifelike digital office – that’s the essence of the Metaverse. 23 | 24 | --- 25 | 26 | > Core Technologies Behind the Metaverse 27 | The Metaverse is built on the foundation of multiple cutting-edge technologies: 28 | 29 | 1. Virtual Reality (VR): Provides fully immersive experiences, making users feel present in the digital world. 30 | 31 | 2. Augmented Reality (AR): Enhances real-world environments with interactive digital overlays. 32 | 33 | 3. Blockchain: Ensures secure transactions, ownership of digital assets, and decentralized governance. 34 | 35 | 4. Artificial Intelligence (AI): Powers intelligent interactions and realistic simulations within virtual spaces. 36 | 37 | 5. 5G Connectivity: Enables high-speed, low-latency internet essential for seamless experiences. 38 | 39 | --- 40 | 41 | > Applications of the Metaverse 42 | The potential applications of the Metaverse are limitless, spanning various industries: 43 | 44 | 1. Gaming: Immersive multiplayer games that redefine entertainment. 45 | 46 | 2. Education: Virtual classrooms enabling hands-on learning and global collaboration. 47 | 48 | 3. Workspaces: Remote offices with lifelike virtual meeting environments. 49 | 50 | 4. Retail: Virtual stores offering personalized shopping experiences. 51 | 52 | 5. Healthcare: Remote consultations and advanced training using VR simulations. 53 | 54 | --- 55 | 56 | > Challenges in Building the Metaverse 57 | Despite its promise, the Metaverse faces several hurdles: 58 | 59 | - Privacy Concerns: Protecting user data in a highly connected environment. 60 | - High Entry Costs: Ensuring accessibility for users without expensive hardware. 61 | - Interoperability: Bridging gaps between different virtual platforms. 62 | - Ethical Issues: Addressing challenges like content moderation and equitable access. 63 | 64 | --- 65 | 66 | > Future Outlook 67 | Tech giants like Meta (formerly Facebook) and Microsoft are heavily investing in the Metaverse, signaling a bright future. Experts predict: 68 | 69 | - Hyper-realistic environments surpassing the physical world. 70 | - Integration across industries, revolutionizing how we live and work. 71 | - Breakthroughs in AI, VR, and AR driving unparalleled experiences. 72 | 73 | --- 74 | 75 | > Conclusion 76 | The Metaverse is more than just a concept; it’s a rapidly evolving digital ecosystem poised to reshape our reality. As we venture into this exciting frontier, embracing innovation responsibly will be key to unlocking its full potential. Are you ready to step into the Metaverse? 77 | 78 | 79 | > Contact 80 | For any inquiries or feedback, please reach out at: 81 | - Email: bhavantuknow@gmail.com 82 | -------------------------------------------------------------------------------- /src/content/blog/english/post-3.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Loan Eligibility Predective Analyser" 3 | meta_title: "" 4 | description: "This repository presents a comprehensive predictive analytics solution for determining loan eligibility, leveraging advanced machine learning techniques and data preprocessing methodologies. The project is implemented in Google Colab, utilizing a dataset from Kaggle's Loan Data repository, which encompasses a diverse range of attributes pertinent to creditworthiness assessment." 5 | date: 2024-09-15T05:00:00Z 6 | image: "https://cdn-images-1.medium.com/max/720/1*icDC8PUuu71tQCuDzl6zQg.png" 7 | categories: ["Project","Python","Software"] 8 | author: "Sanjeevan S" 9 | tags: ["Machine Learning", "Python3", "Kaggle" , "Pandas" , "Numpy"] 10 | draft: false 11 | --- 12 | 13 | 14 | 15 | --- 16 | 17 | ## Loan Eligibility Predictive Analytics: A Comprehensive Solution 18 | 19 | **This project offers an advanced machine learning solution for determining loan eligibility, leveraging powerful data preprocessing techniques and predictive algorithms.** Implemented in **Google Colab**, it utilizes the **Loan Data repository** from Kaggle, comprising diverse features critical for creditworthiness assessment. 20 | 21 | ### 🔧 **Technical Overview** 22 | 23 | - **Programming Language**: Python 3.x 24 | - **Libraries and Frameworks**: 25 | - **Pandas**: Data manipulation and analysis 26 | - **NumPy**: Numerical computations 27 | - **Scikit-learn**: Machine learning model development and evaluation 28 | - **Matplotlib & Seaborn**: Data visualization tools 29 | 30 | --- 31 | 32 | ### 📊 **Dataset Overview** 33 | 34 | The dataset consists of **615 observations** and **13 features**, including: 35 | 36 | - **Loan ID** 37 | - **Gender** 38 | - **Married** 39 | - **Dependents** 40 | - **Education** 41 | - **Self-Employed** 42 | - **Applicant Income** 43 | - **Coapplicant Income** 44 | - **Loan Amount** 45 | - **Loan Amount Term** 46 | - **Credit History** 47 | - **Property Area** 48 | - **Loan Status** 49 | 50 | --- 51 | 52 | ### ⚙️ **Methodology** 53 | 54 | #### **Data Preprocessing**: 55 | - **Imputation**: Handling missing values with advanced techniques 56 | - **Encoding**: One-hot encoding for categorical variables 57 | - **Scaling/Normalization**: Applying transformations to numerical features 58 | 59 | #### **Feature Engineering**: 60 | - **Feature Extraction**: Identifying key attributes impacting loan eligibility 61 | - **Interaction Terms**: Creating relationships between variables for better predictions 62 | 63 | --- 64 | 65 | ### 🚀 **Model Development** 66 | 67 | We evaluated multiple machine learning algorithms: 68 | 69 | - **Logistic Regression** 70 | - **Decision Trees** 71 | - **Random Forest** 72 | - **Gradient Boosting** 73 | 74 | Each model was trained and fine-tuned to optimize performance. 75 | 76 | --- 77 | 78 | ### 📈 **Model Evaluation** 79 | 80 | Models were assessed using key metrics: 81 | 82 | - **Accuracy, Precision, Recall, F1 Score, ROC-AUC** 83 | - **Confusion Matrix**: To understand classification results 84 | - **ROC Curves**: For visualizing true positive and false positive rates 85 | 86 | --- 87 | 88 | ### 📂 **Repository Structure** 89 | 90 | - **Loan_Eligibility_Predictive_Analyser.ipynb**: The main notebook containing the code and documentation. 91 | - **data**: Folder containing the Loan Data dataset. 92 | - **utils**: Module for helper functions used in preprocessing and visualization. 93 | 94 | --- 95 | 96 | ### 🛠 **Resources** 97 | 98 | - GitHub Profile: [**I-SANJEEVAN**](https://github.com/I-SANJEEVAN) 99 | - Repository Link: [**Loan Eligibility Predictor**](https://github.com/I-SANJEEVAN/Loan_eligibility_predective_analyser/tree/main) 100 | - Try it on Colab: [**Google Colab Notebook**](https://colab.research.google.com/drive/1CHJh7jBemyhLNENAd2qEMgctKT6h_4mV?usp=sharing) 101 | 102 | --- 103 | 104 | This project offers a **powerful tool** for financial institutions to automate loan eligibility assessments, providing insightful predictions backed by machine learning! 105 | 106 | --- 107 | 108 | This version improves readability and flow, making it more engaging for a blog audience while preserving the technical depth. -------------------------------------------------------------------------------- /src/content/blog/english/quantam-computing.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "🚀 The Future of Quantum Computing: A New Era for Developers 💻" 3 | meta_title: "Exploring the Potential of Quantum Computing in Software Development" 4 | description: "🌟 Dive into the world of quantum computing and its transformative impact on software development! Let's discover how this cutting-edge tech is shaping the future. 🤖" 5 | date: 2024-12-31T15:06:22 6 | image: '/images/quantum_computing.jpg' 7 | categories: ["Quantum Computing", "Software Development", "Technology"] 8 | author: "Kaito" 9 | tags: ["Quantum Computing", "Developers", "Future of Technology", "Software Engineering"] 10 | draft: false 11 | --- 12 | 13 | Quantum computing is no longer science fiction—it's a **reality** that’s about to **revolutionize** software development! 🧠✨ In this post, we’ll explore how quantum technologies will **reshape** the future of coding, **supercharge** data processing, and create **new opportunities** for developers. 🌐 14 | 15 | ## 🌟 The Quantum Leap: What’s Next for Developers? 16 | 17 | Quantum computing is moving fast! 🚀 It’s not just about theory anymore—it’s **here**, and developers are jumping in, combining **quantum algorithms** with traditional methods to unlock the **impossible**. 💡 18 | 19 | --- 20 | 21 | ## 🧩 Breaking the Limits of Classical Computing 22 | 23 | Classical computers use **bits** 🖥️, but quantum computers use **qubits**—and that's where the **magic** happens! 💥 With qubits, quantum computers can solve **complex problems** exponentially faster than classical computers. Imagine unlocking solutions for things like optimizing supply chains and simulating **molecular structures**. 🔬 24 | 25 | --- 26 | 27 | ## 🔧 Key Developments in Quantum Programming 28 | 29 | ### Top Tools and Frameworks: 30 | - **Qiskit** by IBM: The gateway to quantum computing 🌍 31 | - **Google Cirq:** A tool for creating quantum algorithms 🔄 32 | - **Microsoft Quantum Development Kit:** Building the quantum apps of tomorrow 🏗️ 33 | 34 | ### Key Applications: 35 | - 🛡️ Cryptography breakthroughs 36 | - 🧬 Drug discovery using quantum simulations 37 | - 🤖 Advanced AI training models 38 | 39 | --- 40 | 41 | ## ⚠️ Challenges in Adopting Quantum Technology 42 | 43 | While the **potential** is enormous, quantum computing still faces **barriers**: 44 | - **Technical limitations**: Scaling up quantum hardware is still a challenge 🛠️ 45 | - **Steep learning curve**: Quantum mechanics isn’t an easy subject to master 🧑‍🏫 46 | 47 | --- 48 | 49 | ## 👩‍💻 The Role of Developers in the Quantum Revolution 50 | 51 | As quantum computing advances, **developers** will play a crucial role in: 52 | 1. **Building Quantum Algorithms**: Solving previously impossible problems 🌍 53 | 2. **Integrating Quantum with Classical Systems**: Bridging the two worlds ⚖️ 54 | 3. **Creating Quantum Software**: Crafting applications that leverage quantum power to solve real-world problems 🌐 55 | 56 | --- 57 | 58 | ## 🌍 Real-World Use Cases and Impact 59 | 60 | ### 🌟 Google’s Quantum Supremacy Breakthrough 61 | Google’s **Sycamore processor** demonstrated quantum supremacy, solving a problem in **minutes** that would take **millennia** with classical computers! 🤯 62 | 63 | ### Industry Impacts: 64 | - 💰 **Finance:** Quantum algorithms for optimizing portfolios and risk analysis 65 | - 🏥 **Healthcare:** Speeding up vaccine development using quantum simulations 66 | 67 | --- 68 | 69 | ## 🔮 The Road Ahead: Quantum Computing in 2030 70 | 71 | Looking ahead, quantum computing will continue to **transform** industries. Expect to see: 72 | - **Faster problem-solving** 🧠 73 | - **Quantum Cloud Services** making quantum computing **accessible** for all developers 💻 74 | 75 | --- 76 | 77 | ## 🏁 Conclusion 78 | 79 | Quantum computing is on the brink of **changing everything**. Developers who embrace this technology today will be the ones shaping the future of software development tomorrow! 🌟 Are you ready to dive into the **quantum revolution**? 🕶️ 80 | 81 | --- 82 | 83 | ## HashNode Reference 84 | For more insights -- [Blog Post](https://future-of-quantum-computing.hashnode.dev/the-future-of-quantum-computing-a-new-era-for-developers) 85 | 86 | ## 📬 Contact 87 | For inquiries or feedback, feel free to reach out at: 88 | - Email: dev@sbsngl.org 89 | -------------------------------------------------------------------------------- /src/pages/[...lang]/contact.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import config from "@/config/config.json"; 3 | import Base from "@/layouts/Base.astro"; 4 | import { getListPage } from "@/lib/contentParser.astro"; 5 | import { getTranslations, supportedLang } from "@/lib/utils/languageParser"; 6 | import PageHeader from "@/partials/PageHeader.astro"; 7 | import { type ContentEntryMap } from "astro:content"; 8 | 9 | export function getStaticPaths() { 10 | const paths = supportedLang.map((lang) => ({ 11 | params: { lang: lang || undefined }, 12 | })); 13 | return paths; 14 | } 15 | 16 | const { lang } = Astro.params; 17 | const contact = await getListPage("contact", lang as keyof ContentEntryMap); 18 | 19 | const { title, description, meta_title, image } = contact[0].data; 20 | 21 | const { 22 | working_mail, 23 | full_name, 24 | anything_else, 25 | contact_message_placeholder, 26 | submit, 27 | } = await getTranslations(lang as keyof ContentEntryMap); 28 | --- 29 | 30 | 36 | 37 |
38 |
39 |
40 |
41 |
47 |
48 | 52 | 60 |
61 |
62 | 66 | 74 |
75 |
76 | 80 | 88 |
89 | 92 | 93 |
94 | 95 | 114 |
115 |
116 |
117 |
118 | 119 | -------------------------------------------------------------------------------- /src/pages/[...lang]/index.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import ImageMod from "@/components/ImageMod.astro"; 3 | import Base from "@/layouts/Base.astro"; 4 | import { getListPage, getSinglePage } from "@/lib/contentParser.astro"; 5 | import { supportedLang } from "@/lib/utils/languageParser"; 6 | import { markdownify } from "@/lib/utils/textConverter"; 7 | import CallToAction from "@/partials/CallToAction.astro"; 8 | import Testimonial from "@/partials/Testimonial.astro"; 9 | import type { Feature } from "@/types"; 10 | import type { ContentEntryMap } from "astro:content"; 11 | import { FaCheck } from "react-icons/fa"; 12 | 13 | export function getStaticPaths() { 14 | const paths = supportedLang.map((lang) => ({ 15 | params: { lang: lang || undefined }, 16 | })); 17 | return paths; 18 | } 19 | 20 | const { lang } = Astro.params; 21 | const homepage = await getListPage("homepage", lang as keyof ContentEntryMap); 22 | const { banner, features } = homepage[0].data; 23 | 24 | const testimonial = await getSinglePage( 25 | "sections", 26 | lang as keyof ContentEntryMap, 27 | "testimonial" 28 | ); 29 | 30 | const call_to_action = await getSinglePage( 31 | "sections", 32 | lang as keyof ContentEntryMap, 33 | "call-to-action" 34 | ); 35 | --- 36 | 37 | 38 | 39 |
40 |
41 |
42 |
43 |

47 |

48 | { 49 | banner.button.enable && ( 50 | 58 | {banner.button.label} 59 | 60 | ) 61 | } 62 |

63 | { 64 | banner.image && ( 65 |
66 | 73 |
74 | ) 75 | } 76 |
77 |
78 |
79 | 80 | 81 | 82 | { 83 | features.map((feature: Feature, index: number) => ( 84 |
85 |
86 |
87 |
90 | 97 |
98 |
99 |

100 |

101 |

    102 | {feature.bulletpoints.map((bullet: string) => ( 103 |
  • 104 | 105 | 106 |
  • 107 | ))} 108 |
109 | {feature.button.enable && ( 110 | 111 | {feature.button.label} 112 | 113 | )} 114 |

115 |
116 |
117 |
118 | )) 119 | } 120 | 121 | 122 | 123 | 124 | 125 | -------------------------------------------------------------------------------- /src/layouts/shortcodes/Notice.tsx: -------------------------------------------------------------------------------- 1 | import { humanize } from "@/lib/utils/textConverter"; 2 | import React from "react"; 3 | 4 | function Notice({ 5 | type, 6 | children, 7 | }: { 8 | type: string; 9 | children: React.ReactNode; 10 | }) { 11 | return ( 12 |
13 |
14 | {type === "tip" ? ( 15 | 22 | 28 | 29 | ) : type === "info" ? ( 30 | 37 | 41 | 45 | 46 | ) : type === "warning" ? ( 47 | 54 | 60 | 61 | ) : ( 62 | 69 | 76 | 77 | )} 78 |

{humanize(type)}

79 |
80 |
{children}
81 |
82 | ); 83 | } 84 | 85 | export default Notice; 86 | -------------------------------------------------------------------------------- /src/content/blog/english/deepak.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Understanding Deep Learning: A Journey into the Future of AI" 3 | meta_title: "" 4 | description: "Blog on deep learning" 5 | date: 2024-09-20T05:00:00Z 6 | image: "https://cdn.futura-sciences.com/buildsv6/images/wide1920/5/8/a/58adcd3cfe_125715_deep-learning-cc-vigeco-fotoliacom.jpg" 7 | categories: ["Article","python", "Deep learning"] 8 | author: "Akkupalli Deepak yadav" 9 | tags: ["Python", "Deep learning"] 10 | draft: false 11 | --- 12 | 13 | Deep learning, a subset of machine learning, has revolutionized the field of artificial intelligence (AI) by enabling machines to learn from vast amounts of data and perform complex tasks with remarkable accuracy. This blog will delve into the fundamentals of deep learning, its applications, and why it's a crucial skill to master in today's tech-driven world. 14 | 15 | #### What is Deep Learning? 16 | 17 | Deep learning mimics the human brain's neural networks to process data and create patterns for decision-making. Unlike traditional machine learning algorithms, which require manual feature extraction, deep learning models automatically discover the representations needed for classification or detection. This is achieved through multiple layers of neurons, hence the term "deep" learning. 18 | 19 | #### Key Components of Deep Learning 20 | 21 | 1. **Neural Networks**: The backbone of deep learning, neural networks consist of layers of interconnected nodes (neurons). Each connection has a weight that adjusts as learning proceeds, allowing the network to make accurate predictions. 22 | 23 | 2. **Activation Functions**: These functions determine whether a neuron should be activated or not, introducing non-linearity into the model. Common activation functions include ReLU (Rectified Linear Unit), sigmoid, and tanh. 24 | 25 | 3. **Backpropagation**: This algorithm is used to minimize the error by adjusting the weights of the connections. It involves calculating the gradient of the loss function and propagating it back through the network. 26 | 27 | 4. **Optimization Algorithms**: Techniques like Stochastic Gradient Descent (SGD) and Adam are used to update the weights efficiently and converge to the optimal solution. 28 | 29 | #### Applications of Deep Learning 30 | 31 | Deep learning has a wide range of applications across various industries: 32 | 33 | - **Computer Vision**: From facial recognition to autonomous vehicles, deep learning models excel at interpreting and understanding visual data. 34 | - **Natural Language Processing (NLP)**: Deep learning powers applications like language translation, sentiment analysis, and chatbots. 35 | - **Healthcare**: It aids in diagnosing diseases, predicting patient outcomes, and personalizing treatment plans. 36 | - **Finance**: Used for fraud detection, algorithmic trading, and risk management. 37 | - **Entertainment**: Powers recommendation systems for platforms like Netflix and Spotify. 38 | 39 | #### Why Learn Deep Learning? 40 | 41 | 1. **High Demand**: The demand for deep learning experts is soaring, with industries investing heavily in AI technologies. 42 | 2. **Lucrative Salaries**: Deep learning roles are among the highest-paid in the tech industry, reflecting the advanced skill set required. 43 | 3. **Innovative Potential**: Mastering deep learning opens doors to working on cutting-edge projects that can transform industries and improve lives. 44 | 45 | #### Getting Started with Deep Learning 46 | 47 | To embark on your deep learning journey, consider the following steps: 48 | 49 | 1. **Learn the Basics**: Start with foundational courses in machine learning and AI. 50 | 2. **Hands-On Practice**: Work on projects and use platforms like TensorFlow and PyTorch to build and train your models. 51 | 3. **Stay Updated**: Follow blogs, research papers, and online communities to keep up with the latest advancements. 52 | 53 | Deep learning is not just a technological advancement; it's a paradigm shift that is reshaping our world. By understanding and harnessing its power, you can be at the forefront of this exciting field. 54 | 55 | [linkedin](https://www.linkedin.com/in/akkupalli-deepak-yadav-7a7550256/) 56 | [Github](https://github.com/Deepak71250) 57 | 58 | --- 59 | 60 | 61 | (1) Blog - DeepLearning.AI. https://www.deeplearning.ai/blog/. 62 | (2) How to Learn Deep Learning in 2024: A Complete Guide. https://www.datacamp.com/blog/how-to-learn-deep-learning. 63 | (3) Deep Learning Articles - DataCamp. https://www.datacamp.com/blog/category/deep-learning. 64 | (4) Deep Learning Blog & Use Cases - Deep Instinct. https://www.deepinstinct.com/blog 65 | -------------------------------------------------------------------------------- /src/content/homepage/english/-index.md: -------------------------------------------------------------------------------- 1 | --- 2 | # Banner 3 | banner: 4 | title: "Welcome to the Open-Source Blog Platform" 5 | content: "This site features contributions from developers all around the world. You can contribute by forking our GitHub repository, adding your own blog posts, and submitting a pull request" 6 | image: "/images/banner.png" 7 | button: 8 | enable: true 9 | label: "Get Started For Free" 10 | link: "https://github.com/Snakes-n-Networks/Dev-blogs.git" 11 | 12 | # Features 13 | features: 14 | - title: "How to Create a Blog" 15 | image: "/images/service-1.png" 16 | content: "This starter template provides everything you need to kickstart your BLog Post." 17 | bulletpoints: 18 | - "[1.Click Get Started](https://github.com/Snakes-n-Networks/Dev-blogs)" 19 | 20 | - "2.Clone Your Fork" 21 | - "3.Add Your Blog Post" 22 | - "4.Commit and Push Your Changes" 23 | - "5.Create a Pull Request" 24 | - "6.**Wait for Review**" 25 | button: 26 | enable: true 27 | label: "Get Detailed Overview" 28 | link: "/elements" 29 | 30 | - title: "Discover the Key Features Of Dev Blogs" 31 | image: "/images/contribution-2.png" 32 | content: "Dev Blogs come packed with powerful features designed to enhance your blogging experience:" 33 | bulletpoints: 34 | - "**Open Source Contribution**: Anyone can contribute by forking the repository and submitting pull requests." 35 | - "**Community-Driven Content**: Blogs and articles are curated from a diverse community of developers." 36 | - "**Seamless Collaboration**: Encourages collaboration among contributors through GitHub." 37 | - "**SEO-Optimized**: Ensures better visibility and ranking on search engines." 38 | - "**Responsive Design**: Fully responsive, providing a smooth experience on all devices." 39 | - "**Customizable Layout**: Tailored to suit individual needs with easy-to-modify templates." 40 | - "**Built with Modern Tech**: Developed using Astro and TailwindCSS for streamlined performance and styling." 41 | - "**Learning and Sharing**: Focuses on sharing knowledge and improving skills through real-world contributions." 42 | - "**Inclusive for All Levels**: Welcomes contributors from beginners to experts in the open-source community." 43 | button: 44 | enable: true 45 | label: "Get Started Now" 46 | link: "https://github.com/Snakes-n-Networks/Dev-blogs" 47 | 48 | - title: "Why Contribute to Our Open Source Project?" 49 | image: "/images/contribution-3.png" 50 | content: "Contributing to our open-source project offers numerous benefits:" 51 | bulletpoints: 52 | - "Dive into real-world coding challenges and refine your development skills by contributing to our project. Gain hands-on experience with cutting-edge technologies and methodologies." 53 | - "Become part of a supportive and dynamic community of developers and tech enthusiasts. Collaborate, share knowledge, and learn from others in an open and inclusive environment." 54 | - "Showcase your contributions to a prominent open-source project on your resume and GitHub profile. Our project is recognized in the tech community, providing valuable exposure and potential career opportunities." 55 | - "Blog about your contributions and experiences with our project. Your insights and tutorials can help others get started, solve problems, and contribute effectively, fostering a collaborative learning environment." 56 | - "Experience the satisfaction of seeing your contributions make a tangible difference. Contributing to our project means helping others and being part of something impactful and meaningful." 57 | - "Connect with like-minded individuals and industry professionals. Our project offers numerous opportunities for collaboration, networking, and forging new professional relationships." 58 | - "Engage with a diverse range of technologies and tools used in our project. Leverage this experience to stay current with industry trends and expand your technical knowledge." 59 | - "Your work on our project is visible and accessible to others. It serves as a public testament to your skills, problem-solving abilities, and commitment to quality." 60 | - "Support a project that benefits a wide audience. Your contributions help enhance and maintain software that is freely available to individuals and organizations globally." 61 | - "By participating in our project, you champion the principles of open-source software: transparency, collaboration, and innovation. Help us build and improve tools that empower the tech community." 62 | button: 63 | enable: false 64 | label: "" 65 | link: "" 66 | --- 67 | -------------------------------------------------------------------------------- /src/layouts/PostSingle.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import BlogCard from "@/components/BlogCard.astro"; 3 | import Share from "@/components/Share.astro"; 4 | import config from "@/config/config.json"; 5 | import Disqus from "@/helpers/Disqus"; 6 | import { getSinglePage } from "@/lib/contentParser.astro"; 7 | import dateFormat from "@/lib/utils/dateFormat"; 8 | import { slugSelector } from "@/lib/utils/languageParser"; 9 | import similarItems from "@/lib/utils/similarItems"; 10 | import { humanize, markdownify, slugify } from "@/lib/utils/textConverter"; 11 | import type { ContentEntryMap } from "astro:content"; 12 | import { FaRegClock, FaRegFolder, FaRegUserCircle } from "react-icons/fa"; 13 | import ImageMod from "./components/ImageMod.astro"; 14 | const { default_language } = config.settings; 15 | 16 | const COLLECTION_FOLDER = "blog"; 17 | const { post } = Astro.props; 18 | let { lang } = Astro.params; 19 | 20 | if (!lang) { 21 | lang = default_language; 22 | } 23 | 24 | const posts = await getSinglePage( 25 | COLLECTION_FOLDER, 26 | lang as keyof ContentEntryMap 27 | ); 28 | const similarPosts = similarItems(post, posts); 29 | const { Content } = await post.render(); 30 | const { title, description, author, categories, image, date, tags } = post.data; 31 | --- 32 | 33 |
34 |
35 |
36 |
37 | { 38 | image && ( 39 |
40 | 48 |
49 | ) 50 | } 51 |

52 | 77 |
78 | 79 |
80 |
81 |
82 |
Tags :
83 | 97 |
98 |
99 |
Share :
100 | 106 |
107 |
108 | 109 |

110 |
111 | 112 | 113 |
114 |

Related Posts

115 |
116 | { 117 | similarPosts.map((post) => ( 118 |
119 | 120 |
121 | )) 122 | } 123 |
124 |
125 |
126 |
127 | -------------------------------------------------------------------------------- /src/content/blog/english/khc.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Inside SRM-RMP Chennai: Stories Students Whisper, But Never Post" 3 | meta_title: "The Unspoken Reality Behind SRM Ramapuram Campus" 4 | description: "A candid, story-style look into what really happens inside SRM Institute's Ramapuram Campus in Chennai. From academic pressure to over-surveillance, here's the version students won’t find in brochures." 5 | date: 2024-08-25T16:10:00 6 | image: "https://srmrmp.edu.in/wp-content/uploads/2023/08/IST-1.jpg" 7 | categories: 8 | [ 9 | "Education", 10 | "College Life", 11 | "Student Experiences", 12 | "India", 13 | "Truth Behind Brochures", 14 | ] 15 | author: "Harshi Chowdary Kanderi" 16 | tags: 17 | [ 18 | "SRM", 19 | "Ramapuram", 20 | "Student Voices", 21 | "College Life India", 22 | "Campus Reality", 23 | ] 24 | draft: false 25 | --- 26 | 27 | ## Inside SRM-RMP Chennai: Stories Students Whisper, But Never Post 28 | 29 | The first time I walked into SRM Ramapuram campus, it looked like everything I had imagined — polished floors, high-rise buildings, posters of past placement records, and smiling students posing for the university magazine. It had the gloss of a modern private university. But it didn’t take long to realize that behind those shining corridors were stories students only whispered in the quiet corners of the hostel or over DMs that began with, *“Bro, don’t tell anyone I said this…”* 30 | 31 | Classes begin like any other college — attendance is taken religiously, sometimes more strictly than actual lectures. Professors walk in with a set of slides that haven’t been updated in years, and most students sit quietly, noting down dictated content like they’re back in high school. You can pass the internal exams easily if you stay in the good books of the faculty — not by being brilliant, but by being obedient. It wasn’t about how much you learned; it was about how well you followed the “system.” 32 | 33 | And then there’s attendance. If you miss too many classes, even for genuine reasons, you could be barred from writing your semester exams. There were students who had medical issues or family emergencies, but rules didn’t bend. What’s worse is that some students claimed their attendance was altered — dropped silently after questioning faculty decisions or refusing to participate in mandatory events. 34 | 35 | Speaking of which, the word “mandatory” is sacred at SRM-RMP. Whether it’s a cultural fest, a tech summit, or a seminar, students are often **forced** to register. You’re expected to pay fees, attend long sessions, click pictures, and show your face — not for the learning, but for the records. No participation? Get ready for “consequences,” usually in the form of deducted marks or reported disinterest. 36 | 37 | The hostel, which was supposed to feel like a second home, often feels more like a monitored facility. Curfews are tight, especially for female students. Hostel wardens inspect rooms without notice, CCTVs watch your movements, and any form of complaint is discouraged with passive threats like *“you might regret escalating this.”* At night, students huddle in groups, not just to chill, but to share survival strategies — which warden to avoid, which faculty not to question, and how to fake enthusiasm during reviews. 38 | 39 | Mental health is the invisible elephant in the room. Students break down from pressure, silently. There’s no real counselor system. No trained psychologists. Just teachers who might tell you to “take rest” or “not overthink.” And you don’t dare speak up because the fear of retaliation — through grades, attendance, or public shaming — is very real. 40 | 41 | Financially too, SRM-RMP is not cheap. Every certificate, every event, every so-called “extra opportunity” comes with a fee. The institution feels like it’s run more as a business than an academic body. Students are customers, and as long as the payments come in on time, everything else becomes secondary. 42 | 43 | But amidst all this, some students still shine. They find loopholes in the system to grow. They use GitHub, contribute to open source, build startups in secret, or prepare for GRE at night when the campus sleeps. SRM doesn’t stop them — but it surely doesn’t help much either. It’s up to the student to *escape the pattern*, and that’s what separates those who merely survive from those who thrive. 44 | 45 | So if you're planning to join SRM-RMP, don’t just believe the brochures or the Instagram reels. Talk to alumni, ask tough questions, and most importantly, be mentally prepared. This is a place where you’ll learn — not just subjects, but how to **navigate systems**, deal with pressure, and find your way when the administration doesn’t offer one. 46 | 47 | This post isn’t to bash the institution. It’s just the side of the story that doesn't make it to the official website. 48 | 49 | --- 50 | 51 | ## Contact 52 | 53 | Have a story or experience from your own campus you want to share anonymously? 54 | -------------------------------------------------------------------------------- /src/layouts/components/Pagination.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import { getLangFromUrl, slugSelector } from "@/lib/utils/languageParser"; 3 | 4 | const lang = getLangFromUrl(Astro.url); 5 | 6 | type Pagination = { 7 | section?: string; 8 | currentPage?: number; 9 | totalPages?: number; 10 | }; 11 | const { section, currentPage = 1, totalPages = 1 }: Pagination = Astro.props; 12 | 13 | const indexPageLink = currentPage === 2; 14 | const hasPrevPage = currentPage > 1; 15 | const hasNextPage = totalPages > currentPage!; 16 | 17 | let pageList: number[] = []; 18 | for (let i = 1; i <= totalPages; i++) { 19 | pageList.push(i); 20 | } 21 | --- 22 | 23 | { 24 | totalPages > 1 && ( 25 | 144 | ) 145 | } 146 | --------------------------------------------------------------------------------