├── .github ├── ISSUE_TEMPLATE │ ├── bug.yml │ ├── config.yml │ ├── feature_request.yml │ ├── new_post.yml │ └── other.yml ├── dependabot.yml ├── funding.yml ├── labeler.yml ├── pr-title-checker.json └── workflows │ ├── author-assign.yml │ ├── greetings.yml │ └── labeler.yml ├── .gitignore ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── astro.config.mjs ├── package-lock.json ├── package.json ├── pnpm-lock.yaml ├── public ├── authors │ ├── Divya4879.jpg │ ├── abrarlala.jpg │ ├── adi-ray.jpg │ ├── azeen3003.jpeg │ ├── bangadam.jpeg │ ├── cute girl.png │ ├── default.png │ ├── grand-rick001.png │ ├── iamdiksha.jpg │ ├── ikshwaku03.jpg │ ├── jmngandu.jpg │ ├── oyepriyansh.jpeg │ ├── prashantjagtap2909.jpg │ ├── precious.jpg │ ├── rahmaaaan.jpg │ ├── ravisolanki27.jpg │ ├── rizzabh.jpg │ ├── rudy3333.jpg │ ├── shubhamnagda.jpg │ ├── siddharth1006.jpeg │ ├── supriadi.jpg │ ├── sushannt.png │ ├── vansh16aug.jpg │ ├── william-monroy.jpg │ ├── yashkshrivas4491.jpg │ ├── younusk.jpg │ └── zemerik.png ├── favicon.ico └── images │ └── banner.png ├── src ├── components │ ├── Author.astro │ ├── BaseHead.astro │ ├── Callout.tsx │ ├── Header.astro │ ├── Post.astro │ ├── ThemeToggle.tsx │ └── YoutubeEmbed.tsx ├── content │ └── posts │ │ ├── Cloud Computing.md │ │ ├── Creating-a-simple-webpage.md │ │ ├── Discord bot.md │ │ ├── Git.md │ │ ├── How-to-Contribute-to-Open-Source-Projects–A-Beginner-Guide.md │ │ ├── Intro.md │ │ ├── Jr-Motivation.md │ │ ├── create_spring_boot_application.md │ │ ├── future-of-data-science.md │ │ ├── hello-developers.md │ │ ├── hello.md │ │ ├── how-does-the-virtual-dom-work.md │ │ ├── how-javascript-works.md │ │ ├── how-to-add-a-new-post.md │ │ ├── how-to-create-rest-api-in-golang.md │ │ ├── learning-astro.md │ │ ├── lets-connect.md │ │ ├── netflix-agorithm.md │ │ ├── numbers-in-python.md │ │ ├── object-oriented-programming.md │ │ ├── roadmap-to-mern-stack.md │ │ ├── shubhamnagda.md │ │ ├── test-tweet-shahnawaz.md │ │ ├── what-is-angular.md │ │ ├── what-is-golang.md │ │ ├── what-is-html.md │ │ ├── what-is-javascript.md │ │ ├── what-is-reactjs.md │ │ ├── whatisJava.md │ │ └── younusk.md ├── env.d.ts ├── layouts │ ├── Layout.astro │ └── PostLayout.astro ├── pages │ ├── 404.astro │ ├── authors │ │ ├── [author].astro │ │ └── index.astro │ ├── index.astro │ └── posts │ │ ├── [slug].astro │ │ └── index.astro ├── styles │ ├── 404.css │ └── global.css └── util │ ├── authors.ts │ └── readingTime.mjs ├── tsconfig.json └── uno.config.ts /.github/ISSUE_TEMPLATE/bug.yml: -------------------------------------------------------------------------------- 1 | name: "👾 Bug Report" 2 | description: "File a Bug here to help improve the project." 3 | title: "Bug: " 4 | labels: ["bug"] 5 | body: 6 | - type: textarea 7 | id: description 8 | attributes: 9 | label: "Description" 10 | description: "Please provide a detailed description of the issue." 11 | validations: 12 | required: true 13 | - type: textarea 14 | id: screenshots 15 | attributes: 16 | label: "Screenshots" 17 | description: "Please add screenshots if applicable." 18 | - type: dropdown 19 | id: browsers 20 | attributes: 21 | label: "What browsers are you seeing the problem on?" 22 | multiple: true 23 | options: 24 | - "Brave" 25 | - "Chrome" 26 | - "Firefox" 27 | - "Microsoft Edge" 28 | - "Opera" 29 | - "Safari" 30 | - "Other" 31 | - type: checkboxes 32 | id: work 33 | attributes: 34 | label: "Ready to Work?" 35 | options: 36 | - label: "I want to work on this issue" -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: "❓ Question" 4 | url: "https://discord.com/invite/AeAjegXn6D" 5 | about: "Feel free to ask your question on our Discord server." 6 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.yml: -------------------------------------------------------------------------------- 1 | name: "✨ Feature Request" 2 | description: "Suggest a feature request" 3 | title: "feat:" 4 | labels: ["feature request"] 5 | body: 6 | - type: textarea 7 | id: what-feature 8 | attributes: 9 | label: "Description" 10 | description: "Describe your feature request" 11 | validations: 12 | required: true 13 | - type: textarea 14 | id: screenshots 15 | attributes: 16 | label: "Screenshots" 17 | description: "Please add screenshots if applicable" 18 | validations: 19 | - type: checkboxes 20 | id: work 21 | attributes: 22 | label: "Ready to Work?" 23 | options: 24 | - label: "I want to work on this issue" -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/new_post.yml: -------------------------------------------------------------------------------- 1 | name: "🆕 New Post" 2 | description: "Add a new project on DevTweet" 3 | title: "feat: new post by " 4 | labels: 5 | - "New Post" 6 | - "good first issue" 7 | body: 8 | - type: textarea 9 | id: post-add 10 | attributes: 11 | label: "Add a new project on DevTweet" 12 | validations: 13 | required: true 14 | - type: checkboxes 15 | id: terms 16 | attributes: 17 | label: "Ready to Work?" 18 | options: 19 | - label: "I want to work on this issue" 20 | required: true 21 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/other.yml: -------------------------------------------------------------------------------- 1 | name: "🔶 Other" 2 | description: "Use this for any other issues. Please do NOT create blank issues." 3 | labels: ["other"] 4 | body: 5 | - type: markdown 6 | attributes: 7 | value: "# Other issue" 8 | - type: textarea 9 | id: issuedescription 10 | attributes: 11 | label: "What would you like to share?" 12 | description: "Provide a clear and concise explanation of your issue." 13 | validations: 14 | required: true 15 | - type: textarea 16 | id: extrainfo 17 | attributes: 18 | label: "Additional information" 19 | description: "Is there anything else we should know about this issue?" 20 | validations: 21 | required: false 22 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "npm" 4 | directory: "/" 5 | schedule: 6 | interval: "weekly" 7 | -------------------------------------------------------------------------------- /.github/funding.yml: -------------------------------------------------------------------------------- 1 | github: oyepriyansh -------------------------------------------------------------------------------- /.github/labeler.yml: -------------------------------------------------------------------------------- 1 | New Post: 2 | - 'src/content/posts/*' 3 | wait for reviewers: 4 | - '**/*' -------------------------------------------------------------------------------- /.github/pr-title-checker.json: -------------------------------------------------------------------------------- 1 | { 2 | "LABEL": { 3 | "name": "title needs formatting", 4 | "color": "F9D0C4" 5 | }, 6 | "CHECKS": { 7 | "prefixes": [ 8 | "fix: ", 9 | "feat: ", 10 | "docs: ", 11 | "test: ", 12 | "chore: ", 13 | "ci: ", 14 | "perf: ", 15 | "refactor: ", 16 | "revert: ", 17 | "style: ", 18 | "data:", 19 | "fix(", 20 | "feat(", 21 | "docs(", 22 | "chore(", 23 | "ci(", 24 | "perf(", 25 | "refactor(", 26 | "revert(", 27 | "style(", 28 | "test(" 29 | ] 30 | }, 31 | "MESSAGES": { 32 | "success": "All OK", 33 | "failure": "Failing CI test", 34 | "notice": "" 35 | } 36 | } -------------------------------------------------------------------------------- /.github/workflows/author-assign.yml: -------------------------------------------------------------------------------- 1 | name: 'Author Assign' 2 | 3 | on: 4 | pull_request_target: 5 | types: [opened, reopened] 6 | 7 | jobs: 8 | assign-author: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: toshimaru/auto-author-assign@v1.1.0 12 | with: 13 | repo-token: '${{ secrets.GITHUB_TOKEN }}' -------------------------------------------------------------------------------- /.github/workflows/greetings.yml: -------------------------------------------------------------------------------- 1 | name: 'Greetings' 2 | 3 | on: 4 | fork: 5 | push: 6 | branches: [main] 7 | issues: 8 | types: [opened] 9 | pull_request_target: 10 | types: [opened] 11 | 12 | jobs: 13 | welcome: 14 | runs-on: ubuntu-latest 15 | steps: 16 | - uses: actions/checkout@v1 17 | - uses: EddieHubCommunity/gh-action-community/src/welcome@main 18 | with: 19 | github-token: ${{ secrets.GITHUB_TOKEN }} 20 | issue-message: 'Welcome, @${{ github.actor }}! Thanks for raising the issue!' 21 | pr-message: 'Great job, @${{ github.actor }}! Thanks for creating the pull request!' 22 | footer: 'Soon the maintainers/owner will review it and provide you with feedback/suggestions.' 23 | -------------------------------------------------------------------------------- /.github/workflows/labeler.yml: -------------------------------------------------------------------------------- 1 | name: 'Labeler' 2 | on: 3 | - pull_request_target 4 | 5 | jobs: 6 | triage: 7 | permissions: 8 | contents: read 9 | pull-requests: write 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/labeler@v4 -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore build output 2 | dist/ 3 | 4 | # Ignore generated types 5 | .astro/ 6 | 7 | # Ignore dependencies 8 | node_modules/ 9 | 10 | # Ignore logs 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | pnpm-debug.log* 15 | 16 | # Ignore environment variables 17 | .env 18 | .env.production 19 | 20 | # Ignore macOS-specific files 21 | .DS_Store 22 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | We as members, contributors, and leaders pledge to make participation in our 6 | community a harassment-free experience for everyone, regardless of age, body 7 | size, visible or invisible disability, ethnicity, sex characteristics, gender 8 | identity and expression, level of experience, education, socio-economic status, 9 | nationality, personal appearance, race, religion, or sexual identity 10 | and orientation. 11 | 12 | We pledge to act and interact in ways that contribute to an open, welcoming, 13 | diverse, inclusive, and healthy community. 14 | 15 | ## Our Standards 16 | 17 | Examples of behavior that contributes to a positive environment for our 18 | community include: 19 | 20 | * Demonstrating empathy and kindness toward other people 21 | * Being respectful of differing opinions, viewpoints, and experiences 22 | * Giving and gracefully accepting constructive feedback 23 | * Accepting responsibility and apologizing to those affected by our mistakes, 24 | and learning from the experience 25 | * Focusing on what is best not just for us as individuals, but for the 26 | overall community 27 | 28 | Examples of unacceptable behavior include: 29 | 30 | * The use of sexualized language or imagery, and sexual attention or 31 | advances of any kind 32 | * Trolling, insulting or derogatory comments, and personal or political attacks 33 | * Public or private harassment 34 | * Publishing others' private information, such as a physical or email 35 | address, without their explicit permission 36 | * Other conduct which could reasonably be considered inappropriate in a 37 | professional setting 38 | 39 | ## Enforcement Responsibilities 40 | 41 | Community leaders are responsible for clarifying and enforcing our standards of 42 | acceptable behavior and will take appropriate and fair corrective action in 43 | response to any behavior that they deem inappropriate, threatening, offensive, 44 | or harmful. 45 | 46 | Community leaders have the right and responsibility to remove, edit, or reject 47 | comments, commits, code, wiki edits, issues, and other contributions that are 48 | not aligned to this Code of Conduct, and will communicate reasons for moderation 49 | decisions when appropriate. 50 | 51 | ## Scope 52 | 53 | This Code of Conduct applies within all community spaces, and also applies when 54 | an individual is officially representing the community in public spaces. 55 | Examples of representing our community include using an official e-mail address, 56 | posting via an official social media account, or acting as an appointed 57 | representative at an online or offline event. 58 | 59 | ## Enforcement 60 | 61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 62 | reported to the community leaders responsible for enforcement at 63 | oyepriyansh@hotmail.com. 64 | All complaints will be reviewed and investigated promptly and fairly. 65 | 66 | All community leaders are obligated to respect the privacy and security of the 67 | reporter of any incident. 68 | 69 | ## Enforcement Guidelines 70 | 71 | Community leaders will follow these Community Impact Guidelines in determining 72 | the consequences for any action they deem in violation of this Code of Conduct: 73 | 74 | ### 1. Correction 75 | 76 | **Community Impact**: Use of inappropriate language or other behavior deemed 77 | unprofessional or unwelcome in the community. 78 | 79 | **Consequence**: A private, written warning from community leaders, providing 80 | clarity around the nature of the violation and an explanation of why the 81 | behavior was inappropriate. A public apology may be requested. 82 | 83 | ### 2. Warning 84 | 85 | **Community Impact**: A violation through a single incident or series 86 | of actions. 87 | 88 | **Consequence**: A warning with consequences for continued behavior. No 89 | interaction with the people involved, including unsolicited interaction with 90 | those enforcing the Code of Conduct, for a specified period of time. This 91 | includes avoiding interactions in community spaces as well as external channels 92 | like social media. Violating these terms may lead to a temporary or 93 | permanent ban. 94 | 95 | ### 3. Temporary Ban 96 | 97 | **Community Impact**: A serious violation of community standards, including 98 | sustained inappropriate behavior. 99 | 100 | **Consequence**: A temporary ban from any sort of interaction or public 101 | communication with the community for a specified period of time. No public or 102 | private interaction with the people involved, including unsolicited interaction 103 | with those enforcing the Code of Conduct, is allowed during this period. 104 | Violating these terms may lead to a permanent ban. 105 | 106 | ### 4. Permanent Ban 107 | 108 | **Community Impact**: Demonstrating a pattern of violation of community 109 | standards, including sustained inappropriate behavior, harassment of an 110 | individual, or aggression toward or disparagement of classes of individuals. 111 | 112 | **Consequence**: A permanent ban from any sort of public interaction within 113 | the community. 114 | 115 | ## Attribution 116 | 117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], 118 | version 2.0, available at 119 | https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. 120 | 121 | Community Impact Guidelines were inspired by [Mozilla's code of conduct 122 | enforcement ladder](https://github.com/mozilla/diversity). 123 | 124 | [homepage]: https://www.contributor-covenant.org 125 | 126 | For answers to common questions about this code of conduct, see the FAQ at 127 | https://www.contributor-covenant.org/faq. Translations are available at 128 | https://www.contributor-covenant.org/translations. 129 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # 👨‍💻 Contributing 2 | 3 | 4 | 1. Forking the Repository 5 | click on that fork button to fork the repository. 6 | [![Fork the repository](https://oyepriyansh.pages.dev/i/f56b265fb21.png)](#-contributing) 7 | 8 | 9 | 2. Clone the repository 10 | ``` 11 | git clone https://github.com//DevTweet.git 12 | ``` 13 | 14 | 3. Navigate to the repository folder 15 | ``` 16 | cd DevTweet 17 | ``` 18 | 19 | 4. Add a reference(remote) to the original repository. 20 | ``` 21 | git remote add upstream https://github.com/oyepriyansh/DevTweet.git 22 | ``` 23 | 5. Now go ahead and create a new branch and move to the branch 24 | ``` 25 | git checkout -b newpost 26 | ``` 27 | 28 | 6. Install dependencies and run in local 29 | ``` 30 | pnpm i 31 | ``` 32 | ``` 33 | pnpm dev 34 | ``` 35 | 36 | > [!NOTE] 37 | > If you don't have pnpm installed in your system then run this command `npm i -g pnpm` 38 | 39 |   40 | 7. Make your changes 41 |
42 |
Creating a post
43 | 44 | Go to `src/content/posts` directory.

45 | 46 | Create a markdown file, for example `hello.md`. 47 | 48 | Now copy the template code from below, and put into your markdown file and replace the placeholder with actual values. 49 | 50 | ```md 51 | --- 52 | layout: ../../layouts/PostLayout.astro 53 | title: The title of the post 54 | excerpt: A short description of the post 55 | author: your-author-username 56 | createdAt: Month Day, Year 57 | --- 58 | 59 | **Post content goes here.** 60 | ``` 61 | 62 | 63 | #### Adding an Author 64 | 65 | Go to `src/util/authors.ts` file. just extend the array by adding your author username. Make sure it is in lowercase. 66 | 67 | ```ts 68 | // Before: 69 | export const AUTHORS = ["oyepriyansh", 70 | "william"]; 71 | 72 | // After: 73 | export const AUTHORS = ["oyepriyansh", 74 | "william", 75 | "your-author-username"]; 76 | ``` 77 | 78 | #### Author Image 79 | 80 | You can add an image for yourself by uploading an image to the `/public/authors` directory. 81 | Please make sure to rename the image exact same as your author username in the `src/util/authors.ts` file. 82 | 83 | > **Note**: Capitalization does not matter for the image file, but still make it all lowercase. 84 |
85 | 86 | 8. After done you can now push this changes, for doing that follow the following command in order 87 | 88 | - `git add --all` (will add all the files to staging area) 89 | - `git commit -m ""` 90 | > **Note**: replace the `` with a good commit message, for example if you are adding a new post; the commit message will be **feat: new post by your-name`**. 91 | - `git push origin newpost` 92 | 93 | 9. After this go to your forked GitHub repository. Now you will see a popup saying **Compare & pull request**, click on it and create a pull request.
94 | [![Compare & pull request](https://oyepriyansh.pages.dev/i/e98th7898r9h.png)](https://github.com/oyepriyansh/DevTweet/pulls)
95 | **Make sure to add a good PR title, example: `feat: new post by your-name`.** 96 | 97 | That’s it! You have successfully contributed to DevTweet. Once the pull request is accepted and merged, your post will be live on DevTweet. -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Priyansh Prajapat 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | > [!NOTE] 2 | > This repository has been archived and no longer maintained 3 | 4 | > [!TIP] 5 | > if you wanna contribute to open source, consider checking out DevProfiles repository 6 | > 7 | > 8 | 9 | --- 10 | 11 |

DevTweet - Unleash Your Developer Voice

12 | 13 | ## ‼ About 14 | DevTweet is an exciting open-source project designed exclusively for developers. It serves as a microblogging platform, allowing developers to post their thoughts and updates through contributions. It's a space where developers can freely share their ideas and connect with the community. 15 | 16 | ## ❔ What to Post 17 | You can post anything related to the developer community, such as code snippets, best practices, project showcases, tech news, opinions, learning resources, and more, including introducing yourself or showcasing your GitHub profile. 18 | 19 | ## 🤔 How to Contribute 20 | > Thank you for your interest in contributing to our open-source project! 21 | 22 | #### Prerequisites 23 | - A GitHub account 24 | - Git installed on your local development environment 25 | - Node Package Manager (npm) installed on your local development environment 26 | - pnpm installed on your local development environment 27 | 28 | Please see the [CONTRIBUTING.md](https://github.com/oyepriyansh/DevTweet/blob/main/CONTRIBUTING.md) file for more information. 29 | 30 | **Any contributions you make are truly appreciated!** 31 | 32 | ## 🤝 Thank You, Contributors! 33 |
34 | 35 | 36 | 37 | ## 🆘 Need Help? 38 | Join our discord server for any kind of help.
39 | 40 | 41 | Discord Server 42 | 43 | 44 | ## 🙏 Support 45 | Don't forget to leave a star ⭐ 46 | 47 | star repo gif 48 | 49 | ## 💳 Credits 50 | We would like to acknowledge and give credit to [DuroCodes](https://github.com/DuroCodes), [shakenbird](https://github.com/shakenbird), and [ImagineGamingPlay](https://github.com/ImagineGamingPlay) for their contributions to this project. Specifically, we have used code from their repository 51 | 52 | ## 💳 Author 53 | > Priyansh Prajapat (@oyepriyansh) 54 | -------------------------------------------------------------------------------- /astro.config.mjs: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'astro/config'; 2 | import unocss from "unocss/astro"; 3 | import mdx from "@astrojs/mdx"; 4 | import react from "@astrojs/react"; 5 | import { remarkReadingTime } from "./src/util/readingTime.mjs"; 6 | 7 | 8 | export default defineConfig({ 9 | site: 'https://devtweet.is-an.app', 10 | integrations: [mdx(), unocss(), react()], 11 | markdown: { 12 | shikiConfig: { 13 | theme: 'one-dark-pro' 14 | }, 15 | remarkPlugins: [remarkReadingTime], 16 | }, 17 | }); 18 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "devtweet", 3 | "type": "module", 4 | "version": "0.0.1", 5 | "scripts": { 6 | "dev": "astro dev", 7 | "start": "astro dev", 8 | "build": "astro build", 9 | "preview": "astro preview", 10 | "astro": "astro" 11 | }, 12 | "dependencies": { 13 | "@astrojs/mdx": "^0.17.2", 14 | "@astrojs/react": "^3.0.9", 15 | "@heroicons/react": "^2.1.1", 16 | "@types/react": "^18.2.77", 17 | "@types/react-dom": "^18.2.18", 18 | "@unocss/reset": "^0.59.1", 19 | "astro": "^2.10.15", 20 | "mdast-util-to-string": "^4.0.0", 21 | "react": "^18.2.0", 22 | "react-dom": "^18.2.0", 23 | "reading-time": "^1.5.0" 24 | }, 25 | "devDependencies": { 26 | "typescript": "^5.4.5", 27 | "unocss": "^0.50.8", 28 | "unocss-preset-scrollbar": "^0.3.0" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /public/authors/Divya4879.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PriyanshOrg/DevTweet/d34f4e1a4567711694708f9e2284916d83bedfcc/public/authors/Divya4879.jpg -------------------------------------------------------------------------------- /public/authors/abrarlala.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PriyanshOrg/DevTweet/d34f4e1a4567711694708f9e2284916d83bedfcc/public/authors/abrarlala.jpg -------------------------------------------------------------------------------- /public/authors/adi-ray.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PriyanshOrg/DevTweet/d34f4e1a4567711694708f9e2284916d83bedfcc/public/authors/adi-ray.jpg -------------------------------------------------------------------------------- /public/authors/azeen3003.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PriyanshOrg/DevTweet/d34f4e1a4567711694708f9e2284916d83bedfcc/public/authors/azeen3003.jpeg -------------------------------------------------------------------------------- /public/authors/bangadam.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PriyanshOrg/DevTweet/d34f4e1a4567711694708f9e2284916d83bedfcc/public/authors/bangadam.jpeg -------------------------------------------------------------------------------- /public/authors/cute girl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PriyanshOrg/DevTweet/d34f4e1a4567711694708f9e2284916d83bedfcc/public/authors/cute girl.png -------------------------------------------------------------------------------- /public/authors/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PriyanshOrg/DevTweet/d34f4e1a4567711694708f9e2284916d83bedfcc/public/authors/default.png -------------------------------------------------------------------------------- /public/authors/grand-rick001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PriyanshOrg/DevTweet/d34f4e1a4567711694708f9e2284916d83bedfcc/public/authors/grand-rick001.png -------------------------------------------------------------------------------- /public/authors/iamdiksha.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PriyanshOrg/DevTweet/d34f4e1a4567711694708f9e2284916d83bedfcc/public/authors/iamdiksha.jpg -------------------------------------------------------------------------------- /public/authors/ikshwaku03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PriyanshOrg/DevTweet/d34f4e1a4567711694708f9e2284916d83bedfcc/public/authors/ikshwaku03.jpg -------------------------------------------------------------------------------- /public/authors/jmngandu.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PriyanshOrg/DevTweet/d34f4e1a4567711694708f9e2284916d83bedfcc/public/authors/jmngandu.jpg -------------------------------------------------------------------------------- /public/authors/oyepriyansh.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PriyanshOrg/DevTweet/d34f4e1a4567711694708f9e2284916d83bedfcc/public/authors/oyepriyansh.jpeg -------------------------------------------------------------------------------- /public/authors/prashantjagtap2909.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PriyanshOrg/DevTweet/d34f4e1a4567711694708f9e2284916d83bedfcc/public/authors/prashantjagtap2909.jpg -------------------------------------------------------------------------------- /public/authors/precious.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PriyanshOrg/DevTweet/d34f4e1a4567711694708f9e2284916d83bedfcc/public/authors/precious.jpg -------------------------------------------------------------------------------- /public/authors/rahmaaaan.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PriyanshOrg/DevTweet/d34f4e1a4567711694708f9e2284916d83bedfcc/public/authors/rahmaaaan.jpg -------------------------------------------------------------------------------- /public/authors/ravisolanki27.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PriyanshOrg/DevTweet/d34f4e1a4567711694708f9e2284916d83bedfcc/public/authors/ravisolanki27.jpg -------------------------------------------------------------------------------- /public/authors/rizzabh.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PriyanshOrg/DevTweet/d34f4e1a4567711694708f9e2284916d83bedfcc/public/authors/rizzabh.jpg -------------------------------------------------------------------------------- /public/authors/rudy3333.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PriyanshOrg/DevTweet/d34f4e1a4567711694708f9e2284916d83bedfcc/public/authors/rudy3333.jpg -------------------------------------------------------------------------------- /public/authors/shubhamnagda.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PriyanshOrg/DevTweet/d34f4e1a4567711694708f9e2284916d83bedfcc/public/authors/shubhamnagda.jpg -------------------------------------------------------------------------------- /public/authors/siddharth1006.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PriyanshOrg/DevTweet/d34f4e1a4567711694708f9e2284916d83bedfcc/public/authors/siddharth1006.jpeg -------------------------------------------------------------------------------- /public/authors/supriadi.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PriyanshOrg/DevTweet/d34f4e1a4567711694708f9e2284916d83bedfcc/public/authors/supriadi.jpg -------------------------------------------------------------------------------- /public/authors/sushannt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PriyanshOrg/DevTweet/d34f4e1a4567711694708f9e2284916d83bedfcc/public/authors/sushannt.png -------------------------------------------------------------------------------- /public/authors/vansh16aug.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PriyanshOrg/DevTweet/d34f4e1a4567711694708f9e2284916d83bedfcc/public/authors/vansh16aug.jpg -------------------------------------------------------------------------------- /public/authors/william-monroy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PriyanshOrg/DevTweet/d34f4e1a4567711694708f9e2284916d83bedfcc/public/authors/william-monroy.jpg -------------------------------------------------------------------------------- /public/authors/yashkshrivas4491.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PriyanshOrg/DevTweet/d34f4e1a4567711694708f9e2284916d83bedfcc/public/authors/yashkshrivas4491.jpg -------------------------------------------------------------------------------- /public/authors/younusk.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PriyanshOrg/DevTweet/d34f4e1a4567711694708f9e2284916d83bedfcc/public/authors/younusk.jpg -------------------------------------------------------------------------------- /public/authors/zemerik.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PriyanshOrg/DevTweet/d34f4e1a4567711694708f9e2284916d83bedfcc/public/authors/zemerik.png -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PriyanshOrg/DevTweet/d34f4e1a4567711694708f9e2284916d83bedfcc/public/favicon.ico -------------------------------------------------------------------------------- /public/images/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PriyanshOrg/DevTweet/d34f4e1a4567711694708f9e2284916d83bedfcc/public/images/banner.png -------------------------------------------------------------------------------- /src/components/Author.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import type { AUTHORS } from "../util/authors"; 3 | 4 | export interface Props { 5 | author: { 6 | author: (typeof AUTHORS)[number]; 7 | posts: number; 8 | img: string; 9 | }; 10 | } 11 | 12 | const { 13 | author: { author, posts, img }, 14 | } = Astro.props; 15 | --- 16 | 17 | 22 |

25 | {author} 26 |

27 |
28 | 34 |
37 |

{author}

38 |

39 | {posts === 1 ? `${posts} post` : `${posts} posts`} 40 |

41 |
42 |
43 |

View Profile →

44 |
45 | -------------------------------------------------------------------------------- /src/components/BaseHead.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import "@unocss/reset/tailwind.css"; 3 | import "../styles/global.css"; 4 | 5 | interface Props { 6 | title: string; 7 | description: string; 8 | image?: string; 9 | } 10 | 11 | const { 12 | title, 13 | description, 14 | image = new URL("/images/banner.png", Astro.url), 15 | } = Astro.props; 16 | --- 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | DevTweet - Unleash Your Developer Voice. 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /src/components/Callout.tsx: -------------------------------------------------------------------------------- 1 | import type { ReactElement, ReactNode } from 'react'; 2 | import { 3 | LightBulbIcon, 4 | ExclamationTriangleIcon, 5 | ExclamationCircleIcon, 6 | InformationCircleIcon, 7 | } from '@heroicons/react/24/solid'; 8 | 9 | const THEMES = { 10 | info: { 11 | classes: 12 | 'bg-blue-100 text-blue-800 dark:(text-blue-300 bg-blue-200 bg-opacity-10)', 13 | icon: , 14 | }, 15 | idea: { 16 | classes: 17 | 'bg-gray-100 text-gray-800 dark:(text-gray-300 bg-gray-200 bg-opacity-10)', 18 | icon: , 19 | }, 20 | error: { 21 | classes: 22 | 'bg-red-200 text-red-900 dark:(text-red-200 bg-red-600 bg-opacity-30)', 23 | icon: , 24 | }, 25 | default: { 26 | classes: 27 | 'bg-orange-100 text-orange-800 dark:(text-orange-300 bg-orange-200 bg-opacity-10)', 28 | icon: , 29 | }, 30 | }; 31 | 32 | export default function Callout({ 33 | children, 34 | type = 'default', 35 | }: { 36 | children: ReactNode; 37 | type?: keyof typeof THEMES; 38 | }) { 39 | return ( 40 |
41 |
42 | {THEMES[type].icon} 43 |
44 |
{children}
45 |
46 | ); 47 | } 48 | -------------------------------------------------------------------------------- /src/components/Header.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import { 3 | DocumentPlusIcon, 4 | DocumentTextIcon, 5 | HomeIcon, 6 | UserGroupIcon, 7 | } from "@heroicons/react/24/solid"; 8 | 9 | import ThemeToggle from "./ThemeToggle"; 10 | 11 | const url = new URL(Astro.request.url).pathname; 12 | const segments = url.split('/'); 13 | const lastSegment = segments.filter(Boolean).pop(); 14 | const currentPath = lastSegment || ''; 15 | --- 16 | 17 |
18 | 86 |
-------------------------------------------------------------------------------- /src/components/Post.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import type { CollectionEntry } from "astro:content"; 3 | 4 | export interface Props { 5 | post: CollectionEntry<"posts">["data"] & { 6 | slug: CollectionEntry<"posts">["slug"]; 7 | }; 8 | } 9 | 10 | const { 11 | post: { title, excerpt, author, createdAt, slug }, 12 | } = Astro.props; 13 | 14 | const pubDate = new Date(createdAt).toLocaleDateString("en-US", { 15 | year: "numeric", 16 | month: "short", 17 | day: "numeric", 18 | }); 19 | 20 | const authorIcon = 21 | (await Astro.glob("../../public/authors/**/*.{jpeg,jpg,png}")) 22 | .map((v) => v.default.replace("/public", "")) 23 | .filter((v) => v.toLowerCase().includes(author.toLowerCase())) 24 | .at(0) ?? "/authors/default.png"; 25 | --- 26 | 27 | 32 |

35 | {title} 36 |

37 |
38 | 44 |
47 |

{author}

48 | 51 |
52 |
53 |

{excerpt}

54 |

Read More →

55 |
56 | -------------------------------------------------------------------------------- /src/components/ThemeToggle.tsx: -------------------------------------------------------------------------------- 1 | import { SunIcon, MoonIcon } from "@heroicons/react/24/solid"; 2 | import { useEffect, useState } from "react"; 3 | 4 | export default function ThemeToggle() { 5 | 6 | 7 | const [theme, setTheme] = useState("light"); 8 | 9 | 10 | const handleClick = () => { 11 | const newTheme = theme === "light" ? "dark" : "light"; 12 | setTheme(newTheme); 13 | localStorage.setItem("theme", newTheme); // Update local storage with new theme 14 | }; 15 | 16 | 17 | useEffect(() => { 18 | // When the component mounts, check localStorage for theme preference 19 | const savedTheme = localStorage.getItem("theme"); 20 | if (savedTheme) { 21 | setTheme(savedTheme); 22 | } else { 23 | // If no theme is found in localStorage, use the default "light" theme 24 | localStorage.setItem("theme", "light"); 25 | } 26 | }, []); 27 | 28 | 29 | useEffect(() => { 30 | // Update the document styling based on the theme 31 | if (theme === "dark") { 32 | document.documentElement.classList.add("dark"); 33 | } else { 34 | document.documentElement.classList.remove("dark"); 35 | } 36 | }, [theme]); 37 | 38 | return ( 39 | 51 | ); 52 | } 53 | -------------------------------------------------------------------------------- /src/components/YoutubeEmbed.tsx: -------------------------------------------------------------------------------- 1 | interface Props { 2 | title?: string; 3 | videoId: string; 4 | } 5 | 6 | export default function YoutubeEmbed({ videoId, title }: Props) { 7 | return ( 8 |
9 |