├── .all-contributorsrc ├── .devcontainer └── devcontainer.json ├── .github ├── FUNDING.yml └── ISSUE_TEMPLATE │ └── feature_request.md ├── .gitignore ├── .vscode ├── extensions.json └── launch.json ├── CODE_OF_CONDUCT.md ├── LICENSE ├── README.md ├── astro.config.ts ├── package.json ├── pnpm-lock.yaml ├── public ├── banner.png ├── favicon.svg ├── images │ └── banner.png └── robots.txt ├── src ├── components │ ├── BlogCard.astro │ ├── BlogImage.astro │ ├── Counter.astro │ ├── Features.astro │ ├── Footer.astro │ ├── Header.astro │ └── ThemeToggle.astro ├── content │ ├── counter.json │ └── homepage.ts ├── env.d.ts ├── images │ ├── banner.png │ ├── jules-beagle-unsplash.jpg │ └── portrait-beagle-unsplash.jpg ├── layouts │ ├── BlogLayout.astro │ └── Layout.astro ├── pages │ ├── 404.astro │ ├── about.astro │ ├── index.astro │ ├── tips.astro │ └── tips │ │ ├── demo.mdx │ │ └── link-issue-in-pr.mdx └── scripts │ └── main.js ├── tailwind.config.ts └── tsconfig.json /.all-contributorsrc: -------------------------------------------------------------------------------- 1 | { 2 | "files": [ 3 | "README.md" 4 | ], 5 | "imageSize": 100, 6 | "commit": false, 7 | "commitConvention": "angular", 8 | "contributors": [ 9 | { 10 | "login": "tomthorogood", 11 | "name": "Tom Thorogood", 12 | "avatar_url": "https://avatars.githubusercontent.com/u/1092941?v=4", 13 | "profile": "https://tomthorogood.com", 14 | "contributions": [ 15 | "code" 16 | ] 17 | }, 18 | { 19 | "login": "himanshu1221", 20 | "name": "Himanshu Chhatwal", 21 | "avatar_url": "https://avatars.githubusercontent.com/u/32031706?v=4", 22 | "profile": "https://github.com/himanshu1221", 23 | "contributions": [ 24 | "doc" 25 | ] 26 | }, 27 | { 28 | "login": "Balastrong", 29 | "name": "Leonardo Montini", 30 | "avatar_url": "https://avatars.githubusercontent.com/u/7253929?v=4", 31 | "profile": "https://leonardomontini.dev/", 32 | "contributions": [ 33 | "doc" 34 | ] 35 | }, 36 | { 37 | "login": "santoshyadavdev", 38 | "name": "Santosh Yadav", 39 | "avatar_url": "https://avatars.githubusercontent.com/u/11923975?v=4", 40 | "profile": "https://github.com/santoshyadavdev", 41 | "contributions": [ 42 | "code" 43 | ] 44 | }, 45 | { 46 | "login": "anuragts", 47 | "name": "Anurag Sharma", 48 | "avatar_url": "https://avatars.githubusercontent.com/u/79055093?v=4", 49 | "profile": "http://anuragdev.me", 50 | "contributions": [ 51 | "code" 52 | ] 53 | }, 54 | { 55 | "login": "Deva-1903", 56 | "name": "Deva ", 57 | "avatar_url": "https://avatars.githubusercontent.com/u/97371915?v=4", 58 | "profile": "https://devaa.bio.link/", 59 | "contributions": [ 60 | "doc" 61 | ] 62 | } 63 | ], 64 | "contributorsPerLine": 7, 65 | "skipCi": true, 66 | "repoType": "github", 67 | "repoHost": "https://github.com", 68 | "projectName": "GitHubTips", 69 | "projectOwner": "santoshyadavdev" 70 | } 71 | -------------------------------------------------------------------------------- /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | // For format details, see https://aka.ms/devcontainer.json. For config options, see the 2 | // README at: https://github.com/devcontainers/templates/tree/main/src/javascript-node 3 | { 4 | "name": "Node.js", 5 | "image": "mcr.microsoft.com/devcontainers/javascript-node:16-bullseye", 6 | "features": { 7 | "ghcr.io/NicoVIII/devcontainer-features/pnpm:1": {} 8 | } 9 | 10 | // Features to add to the dev container. More info: https://containers.dev/features. 11 | // "features": {}, 12 | 13 | // Use 'forwardPorts' to make a list of ports inside the container available locally. 14 | // "forwardPorts": [], 15 | 16 | // Use 'postCreateCommand' to run commands after the container is created. 17 | // "postCreateCommand": "yarn install", 18 | 19 | // Configure tool-specific properties. 20 | // "customizations": {}, 21 | 22 | // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. 23 | // "remoteUser": "root" 24 | } 25 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [SantoshYadavDev] 4 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # build output 2 | dist/ 3 | 4 | # dependencies 5 | node_modules/ 6 | 7 | # logs 8 | npm-debug.log* 9 | yarn-debug.log* 10 | yarn-error.log* 11 | pnpm-debug.log* 12 | 13 | 14 | # environment variables 15 | .env 16 | .env.production 17 | 18 | # macOS-specific files 19 | .DS_Store 20 | 21 | # I use pnpm 22 | package-lock.json 23 | yarn.lock 24 | 25 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["astro-build.astro-vscode"], 3 | "unwantedRecommendations": [] 4 | } 5 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "command": "./node_modules/.bin/astro dev", 6 | "name": "Development server", 7 | "request": "launch", 8 | "type": "node-terminal" 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /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 | santosh.yadav198613@gmail.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 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Lance Ross 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 | # GitHub Tips 🚀 2 | 3 | 4 | [![All Contributors](https://img.shields.io/badge/all_contributors-6-orange.svg?style=flat-square)](#contributors-) 5 | 6 | 7 | Do you have any Git or GitHub Tips to share, do you want to contribute and help the community. 8 | 9 | Then this is the right place for you, great communities are built together, and this website will remain open source. 10 | 11 | You can share the Tips and get a green square on your profile. 12 | 13 | ## Do no cheat 14 | 15 | Please make sure you don't copy and paste someone else's Tips. We do not want to plagiarize someone else's content. 16 | 17 | ## Guide for Code Contributors 📝 18 | 19 | You can use `npm i` or `yarn` to install dependencies. I personally use `pnpm` because it's what I use on most of my projects. 20 | 21 | `pnpm install` - Installs dependencies. You can use any of those. 22 | 23 | `pnpm dev` - Starts local dev server at `localhost:3000` 24 | 25 | `pnpm build` - Build your production site to `./dist/` 26 | 27 | `pnpm preview` - Preview your build locally, before deploying 28 | 29 | ## License ⚖️ 30 | 31 | This repository has [MIT License](https://github.com/santoshyadavdev/GitHubTips/blob/main/LICENSE). 32 | 33 | ## Contributors ✨ 34 | 35 | Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 |
Tom Thorogood
Tom Thorogood

💻
Himanshu Chhatwal
Himanshu Chhatwal

📖
Leonardo Montini
Leonardo Montini

📖
Santosh Yadav
Santosh Yadav

💻
Anurag Sharma
Anurag Sharma

💻
Deva
Deva

📖
52 | 53 | 54 | 55 | 56 | 57 | 58 | This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! 59 | -------------------------------------------------------------------------------- /astro.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "astro/config"; 2 | import compress from "astro-compress"; 3 | import sitemap from "@astrojs/sitemap"; 4 | import tailwind from "@astrojs/tailwind"; 5 | import mdx from "@astrojs/mdx"; 6 | import image from "@astrojs/image"; 7 | import astroLayouts from "astro-layouts"; 8 | import codeTitle from "remark-code-title"; 9 | 10 | // https://astro.build/config 11 | export default defineConfig({ 12 | site: "https://githubtips.com/", 13 | base: "/", 14 | markdown: { 15 | shikiConfig: { 16 | theme: "slack-dark", 17 | }, 18 | remarkPlugins: [ 19 | [ 20 | astroLayouts, 21 | { 22 | default: "@layouts/Layout.astro", 23 | "pages/tips/**/*.mdx": "@layouts/BlogLayout.astro", 24 | }, 25 | ], 26 | codeTitle, 27 | ], 28 | }, 29 | integrations: [ 30 | compress({ 31 | css: true, 32 | html: true, 33 | js: true, 34 | img: true, 35 | svg: true, 36 | logger: 0, 37 | }), 38 | tailwind(), 39 | sitemap(), 40 | mdx(), 41 | image({ 42 | serviceEntryPoint: "@astrojs/image/sharp", 43 | }), 44 | ], 45 | }); 46 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "no-fuss-astro", 3 | "version": "1.0.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "astro dev", 7 | "start": "astro dev", 8 | "build": "astro build", 9 | "preview": "astro preview", 10 | "build:preview": "astro build && astro preview", 11 | "format": "prettier -w --plugin-search-dir=. 'src/**/*.{js,jsx,ts,tsx,astro}'", 12 | "astro": "astro" 13 | }, 14 | "devDependencies": { 15 | "@astrojs/image": "^0.11.6", 16 | "@astrojs/mdx": "^0.12.2", 17 | "@astrojs/sitemap": "^1.0.0", 18 | "@astrojs/tailwind": "^2.1.3", 19 | "@fontsource/fira-code": "^4.5.13", 20 | "@fontsource/inter": "^4.5.15", 21 | "@tailwindcss/typography": "^0.5.9", 22 | "astro": "^1.9.2", 23 | "astro-compress": "^1.1.28", 24 | "astro-icon": "^0.8.0", 25 | "astro-layouts": "^0.1.1", 26 | "prettier-plugin-astro": "^0.7.2", 27 | "remark-code-title": "^0.2.2", 28 | "sharp": "^0.31.3", 29 | "svgo": "2.8.0", 30 | "tailwind-scrollbar": "^2.1.0", 31 | "tailwindcss": "^3.2.4" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /public/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/santoshyadavdev/GitHubTips/faa20e3f9c778f0f170c0abcfe4aa495995ff1ab/public/banner.png -------------------------------------------------------------------------------- /public/favicon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/santoshyadavdev/GitHubTips/faa20e3f9c778f0f170c0abcfe4aa495995ff1ab/public/images/banner.png -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Allow: / 3 | 4 | Sitemap: https://githubtips.com//sitemap-index.xml 5 | -------------------------------------------------------------------------------- /src/components/BlogCard.astro: -------------------------------------------------------------------------------- 1 | --- 2 | export interface Props { 3 | title: string; 4 | description: string; 5 | pubDate: string; 6 | url: string | undefined; 7 | contributedBy: string; 8 | } 9 | let { title, description, pubDate, url , contributedBy } = Astro.props; 10 | const shortDate = new Date(pubDate).toLocaleDateString("en", { 11 | dateStyle: "short", 12 | }); 13 | url = url + "/"; 14 | --- 15 | 16 |
  • 17 | 18 |

    {title}

    {shortDate}
    19 | Contributed By - {contributedBy} 20 |

    {description}

    21 |
    22 |
  • 23 | -------------------------------------------------------------------------------- /src/components/BlogImage.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import { Picture } from "@astrojs/image/components"; 3 | interface Props { 4 | src: string; 5 | alt: string; 6 | loading?: "lazy" | "eager"; 7 | } 8 | const { src, alt, loading = "lazy" } = Astro.props; 9 | --- 10 | 11 | -------------------------------------------------------------------------------- /src/components/Counter.astro: -------------------------------------------------------------------------------- 1 | --- 2 | export interface Props { 3 | number: number; 4 | label: string; 5 | } 6 | 7 | const { number, label } = Astro.props; 8 | --- 9 | 10 |
  • 11 |

    {number}

    12 |

    {label}

    13 |
  • 14 | -------------------------------------------------------------------------------- /src/components/Features.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import { Icon } from "astro-icon"; 3 | 4 | export interface Props { 5 | title: string; 6 | icon: string; 7 | content: string; 8 | } 9 | 10 | const { title, icon, content } = Astro.props; 11 | --- 12 | 13 |
    14 | 15 |
    16 |

    {title}

    17 |

    {content}

    18 |
    19 |
    20 | -------------------------------------------------------------------------------- /src/components/Footer.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import { Icon } from "astro-icon"; 3 | // component from flowbite 4 | --- 5 | 6 | 38 | -------------------------------------------------------------------------------- /src/components/Header.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import { Icon } from "astro-icon"; 3 | 4 | import { Picture } from '@astrojs/image/components'; 5 | import { Image } from '@astrojs/image/components'; 6 | 7 | import banner from '../images/banner.png'; 8 | 9 | const navbar = [ 10 | { 11 | name: "Home", 12 | href: "/", 13 | }, 14 | { 15 | name: "Tips", 16 | href: "/tips/", 17 | }, 18 | { 19 | name: "About Us", 20 | href: "/about/", 21 | }, 22 | { 23 | name: "Source", 24 | href: "https://github.com/santoshyadavdev/GitHubTips", 25 | }, 26 | ]; 27 | 28 | const desktopIcons = "dark:text-zinc-300 text-black hover:text-zinc-500 dark:hover:text-zinc-400 hidden sm:block"; 29 | const mobileIcons = "dark:text-zinc-300 text-black hover:text-zinc-500 dark:hover:text-zinc-400 sm:hidden"; 30 | --- 31 | 32 |
    33 | 34 | GitHub Tips 35 | 36 | { 37 | ( 38 | 45 | ) 46 | } 47 | 50 |
    51 | 64 | -------------------------------------------------------------------------------- /src/components/ThemeToggle.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import { Icon } from "astro-icon"; 3 | --- 4 | 5 |
    8 | 12 |
    13 | -------------------------------------------------------------------------------- /src/content/counter.json: -------------------------------------------------------------------------------- 1 | [ 2 | { "number": 1632, "label": "This is a fake data" }, 3 | { "number": 4564, "label": "Stars on GitHub" }, 4 | { "number": 1712, "label": "Contributors" } 5 | ] 6 | -------------------------------------------------------------------------------- /src/content/homepage.ts: -------------------------------------------------------------------------------- 1 | export const homepage = [ 2 | { 3 | title: "Collection of Git and GitHub Tips", 4 | content: "This site contains Git and GitHub tips, you can contribute Tips too.", 5 | icon: "charm:rocket", 6 | }, 7 | { 8 | title: "You own your content", 9 | content: "The tips submitted by you will be yours, you will get credit for your content.", 10 | icon: "ph:code-bold", 11 | }, 12 | { 13 | title: "Free and Open Source", 14 | content: "Found some issues or want to contribute? Feel free to open an issue or pull request on GitHub.", 15 | icon: "charm:plant-pot", 16 | }, 17 | ]; 18 | -------------------------------------------------------------------------------- /src/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /src/images/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/santoshyadavdev/GitHubTips/faa20e3f9c778f0f170c0abcfe4aa495995ff1ab/src/images/banner.png -------------------------------------------------------------------------------- /src/images/jules-beagle-unsplash.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/santoshyadavdev/GitHubTips/faa20e3f9c778f0f170c0abcfe4aa495995ff1ab/src/images/jules-beagle-unsplash.jpg -------------------------------------------------------------------------------- /src/images/portrait-beagle-unsplash.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/santoshyadavdev/GitHubTips/faa20e3f9c778f0f170c0abcfe4aa495995ff1ab/src/images/portrait-beagle-unsplash.jpg -------------------------------------------------------------------------------- /src/layouts/BlogLayout.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import Header from "@components/Header.astro"; 3 | import ThemeToggle from "@components/ThemeToggle.astro"; 4 | import "@fontsource/inter/variable.css"; 5 | import "@fontsource/fira-code/variable.css"; 6 | 7 | 8 | let { pubDate } = Astro.props.content; 9 | const { frontmatter } = Astro.props; 10 | const canonicalURL = new URL(Astro.url).href; 11 | const thisDate = new Date(pubDate).toLocaleDateString("en", { 12 | dateStyle: "long", 13 | }); 14 | pubDate = pubDate.split("T")[0]; 15 | const ogImageParams = new URLSearchParams({ 16 | title: JSON.stringify(frontmatter.title), 17 | }).toString(); 18 | 19 | export interface Props { 20 | heroImage?: string; 21 | imageAlt?: string; 22 | } 23 | 24 | const defaultMeta = { 25 | image: "/banner.png", 26 | imageAlt: "GitHub Tips Logo", 27 | }; 28 | 29 | const { heroImage = defaultMeta.image, imageAlt = defaultMeta.imageAlt } = Astro.props as Props; 30 | 31 | const classBody = 32 | "scrollbar-thin scrollbar-thumb-zinc-400 scrollbar-track-zinc-300 dark:scrollbar-thumb-zinc-600 dark:scrollbar-track-zinc-800 dark:bg-zinc-900 dark:text-white font-inter selection:bg-blue-500/70 text-xl"; 33 | --- 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | {frontmatter.title} 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 83 | 84 | 85 | 86 |
    87 |
    88 |

    {frontmatter.title}

    89 |

    {pubDate}

    90 | By - @{frontmatter.contributedBy} 91 |
    94 |
    95 | 96 |
    97 |
    98 |
    99 | Go back to posts 100 |
    101 |
    102 | 103 | 104 | 105 | -------------------------------------------------------------------------------- /src/layouts/Layout.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import Header from "@components/Header.astro"; 3 | import ThemeToggle from "@components/ThemeToggle.astro"; 4 | import "@fontsource/inter/variable.css"; 5 | 6 | export interface Props { 7 | title?: string; 8 | description?: string; 9 | heroImage?: string; 10 | imageAlt?: string; 11 | } 12 | 13 | const defaultMeta = { 14 | title: "GitHub Tips", 15 | description: "A place to share GitHub Tips.", 16 | image: "/banner.png", 17 | imageAlt: "GitHub Tips", 18 | }; 19 | 20 | const { title = defaultMeta.title, description = defaultMeta.description, heroImage = defaultMeta.image, imageAlt = defaultMeta.imageAlt } = Astro.props as Props; 21 | const canonicalURL = new URL(Astro.url).href; 22 | 23 | const classBody = 24 | "scrollbar-thin scrollbar-thumb-zinc-400 scrollbar-track-zinc-300 dark:scrollbar-thumb-zinc-600 dark:scrollbar-track-zinc-800 dark:bg-zinc-900 dark:text-white font-inter selection:bg-blue-500/70 text-xl"; 25 | --- 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | {title} 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 75 | 76 | 77 | 78 |
    79 |
    80 | 81 |
    82 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /src/pages/404.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import Layout from "@layouts/Layout.astro"; 3 | import { Icon } from "astro-icon"; 4 | --- 5 | 6 | 7 |
    8 | 9 |

    404 Error

    10 |

    Sorry, it doesn't exist.

    11 | Go back to homepage 16 |
    17 |
    18 | -------------------------------------------------------------------------------- /src/pages/about.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import Layout from "@layouts/Layout.astro"; 3 | 4 | const metadata = { 5 | title: "About Us - GitHub Tips", 6 | description: "About Us.", 7 | }; 8 | 9 | --- 10 | 11 | 12 |
    13 |

    About Us

    14 |

    Collection of Git and GitHub Tips.

    15 |
    16 |
    17 | This site is a community initiative to collect Git and GitHub tips. We are a group of developers who are passionate about Git and GitHub. We are always looking for new contributors to help us improve this site. If you are interested in contributing, please read our contributing guide. 18 |
    19 |
    -------------------------------------------------------------------------------- /src/pages/index.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import Layout from "@layouts/Layout.astro"; 3 | import Footer from "@components/Footer.astro"; 4 | import { homepage } from "@content/homepage"; 5 | import Features from "@components/Features.astro"; 6 | --- 7 | 8 | 9 |
    10 |

    GitHub Tips

    11 |

    An Open Source initiative to share Git and GitHub Tips. This is not an Official GitHub website.

    12 |
    13 | {homepage.map((homepage) => )} 14 |