Skip to content

Commit

Permalink
Merge pull request #236 from gita/add-gita-ai
Browse files Browse the repository at this point in the history
Add Bhagavad Gita AI page
  • Loading branch information
samanyougarg authored Jan 20, 2024
2 parents d4c24b0 + 9c55b76 commit e40a2bf
Show file tree
Hide file tree
Showing 16 changed files with 148 additions and 26 deletions.
9 changes: 6 additions & 3 deletions src/app/[[...locale]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ export const metadata: Metadata = {
"Bhagwat Geeta in Hindi and English. Read Bhagavad Gita online in a simple, beautiful and easy-to-use interface; Gita Saar In Hindi; Bhagavad Gita quotes.",
url: "https://bhagavadgita.io",
siteName: "Bhagavad Gita",
images: "https://bhagavadgita.io/static/images/sribhagavadgita.jpg",
images:
"https://bhagavadgita.io/_next/image?url=%2Fbanner2.png&w=3840&q=75",
locale: "en_US",
type: "website",
},
Expand All @@ -24,7 +25,9 @@ export const metadata: Metadata = {
title: "Srimad Bhagavad Gita - Free Searchable Online Bhagwat Geeta",
description:
"Bhagwat Geeta in Hindi and English. Read Bhagavad Gita online in a simple, beautiful and easy-to-use interface; Gita Saar In Hindi; Bhagavad Gita quotes.",
images: ["https://bhagavadgita.io/static/images/sribhagavadgita.jpg"],
images: [
"https://bhagavadgita.io/_next/image?url=%2Fbanner2.png&w=3840&q=75",
],
site: "@ShriKrishna",
},
verification: {
Expand Down Expand Up @@ -80,7 +83,7 @@ export default async function Home({ params }: ParamsWithLocale) {
},
image: {
"@type": "ImageObject",
url: "https://bhagavadgita.io/static/images/sribhagavadgita.jpg",
url: "https://bhagavadgita.io/_next/image?url=%2Fbanner2.png&w=3840&q=75",
width: 1553,
height: 660,
},
Expand Down
7 changes: 5 additions & 2 deletions src/app/about/[[...locale]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ export const metadata: Metadata = {
"Bhagavad Gita, also known as the Gita - the song of lord is a practical guide to one's life that guides one re-organise their life, achieve inner peace and approach supreme lord (the ultimate reality).",
url: "https://bhagavadgita.io/about",
siteName: "Bhagavad Gita",
images: "https://bhagavadgita.io/static/images/sribhagavadgita.jpg",
images:
"https://bhagavadgita.io/_next/image?url=%2Fbanner2.png&w=3840&q=75",
locale: "en_US",
type: "website",
},
Expand All @@ -25,7 +26,9 @@ export const metadata: Metadata = {
title: "What is The Bhagavad Gita - BhagavadGita.io",
description:
"Bhagavad Gita, also known as the Gita - the song of lord is a practical guide to one's life that guides one re-organise their life, achieve inner peace and approach supreme lord (the ultimate reality).",
images: ["https://bhagavadgita.io/static/images/sribhagavadgita.jpg"],
images: [
"https://bhagavadgita.io/_next/image?url=%2Fbanner2.png&w=3840&q=75",
],
site: "@ShriKrishna",
},
alternates: {
Expand Down
7 changes: 5 additions & 2 deletions src/app/acknowledgements/[[...locale]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ export const metadata: Metadata = {
"We extend our heartfelt gratitude to esteemed organizations and individuals for allowing us to feature their invaluable Bhagavad Gita translations and commentaries.",
url: "https://bhagavadgita.io/acknowledgements",
siteName: "Bhagavad Gita",
images: "https://bhagavadgita.io/static/images/sribhagavadgita.jpg",
images:
"https://bhagavadgita.io/_next/image?url=%2Fbanner2.png&w=3840&q=75",
locale: "en_US",
type: "website",
},
Expand All @@ -25,7 +26,9 @@ export const metadata: Metadata = {
title: "Acknowledgements - Featured Bhagavad Gita Translations",
description:
"We extend our heartfelt gratitude to esteemed organizations and individuals for allowing us to feature their invaluable Bhagavad Gita translations and commentaries.",
images: ["https://bhagavadgita.io/static/images/sribhagavadgita.jpg"],
images: [
"https://bhagavadgita.io/_next/image?url=%2Fbanner2.png&w=3840&q=75",
],
site: "@ShriKrishna",
},
alternates: {
Expand Down
7 changes: 5 additions & 2 deletions src/app/bhagavad-gita-quotes/[[...locale]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,17 @@ export const metadata: Metadata = {
"100+ Bhagavad Gita Quotes spoken by Lord Krishna in the Bhagavad Gita to Arjuna on the battlefield of the Kurukshetra.",
url: "https://bhagavadgita.io/bhagavad-gita-quotes",
siteName: "Bhagavad Gita",
images: "https://bhagavadgita.io/static/images/sribhagavadgita.jpg",
images:
"https://bhagavadgita.io/_next/image?url=%2Fbanner2.png&w=3840&q=75",
locale: "en_US",
type: "website",
},
twitter: {
card: "summary_large_image",
title: "Bhagavad Gita Quotes By Krishna - BhagavadGita.io",
images: ["https://bhagavadgita.io/static/images/sribhagavadgita.jpg"],
images: [
"https://bhagavadgita.io/_next/image?url=%2Fbanner2.png&w=3840&q=75",
],
site: "@ShriKrishna",
},
alternates: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ export const getJsonLd = (chapterNumber: string, nameTranslated?: string) => ({
item: {
"@id": `https://bhagavadgita.io/chapter/${chapterNumber}`,
name: `Bhagavad Gita Chapter ${chapterNumber} - ${nameTranslated}`,
image: "https://bhagavadgita.io/static/images/sribhagavadgita.jpg",
image:
"https://bhagavadgita.io/_next/image?url=%2Fbanner2.png&w=3840&q=75",
},
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ export async function generateMetadata({ params }: Props): Promise<Metadata> {
description: `${chapterDescription}...`,
images: [
{
url: "https://bhagavadgita.io/static/images/sribhagavadgita.jpg",
url: "https://bhagavadgita.io/_next/image?url=%2Fbanner2.png&w=3840&q=75",
secureUrl:
"https://bhagavadgita.io/static/images/sribhagavadgita.jpg",
"https://bhagavadgita.io/_next/image?url=%2Fbanner2.png&w=3840&q=75",
height: 1080,
width: 1920,
},
Expand All @@ -57,7 +57,9 @@ export async function generateMetadata({ params }: Props): Promise<Metadata> {
card: "summary_large_image",
title: `Bhagavad Gita Chapter ${chapterNumber} - ${chapterData.gita_chapters_by_pk.name_translated} - BhagavadGita.io`,
description: `${chapterDescription}...`,
images: ["https://bhagavadgita.io/static/images/sribhagavadgita.jpg"],
images: [
"https://bhagavadgita.io/_next/image?url=%2Fbanner2.png&w=3840&q=75",
],
site: "@ShriKrishna",
},
alternates: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ export const getJsonLd = (chapterNumber: string, verseNumber: string) => ({
item: {
"@id": `https://bhagavadgita.io/chapter/${chapterNumber}?page=1`,
name: `Bhagavad Gita Chapter ${chapterNumber}`,
image: "https://bhagavadgita.io/static/images/sribhagavadgita.jpg",
image:
"https://bhagavadgita.io/_next/image?url=%2Fbanner2.png&w=3840&q=75",
},
},
{
Expand All @@ -25,7 +26,8 @@ export const getJsonLd = (chapterNumber: string, verseNumber: string) => ({
item: {
"@id": `https://bhagavadgita.io/chapter/${chapterNumber}/verse/${verseNumber}`,
name: `Bhagavad Gita Chapter ${chapterNumber} Verse ${verseNumber}`,
image: "https://bhagavadgita.io/static/images/sribhagavadgita.jpg",
image:
"https://bhagavadgita.io/_next/image?url=%2Fbanner2.png&w=3840&q=75",
},
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ export async function generateMetadata({
title: `Bhagavad Gita Chapter ${chapterNumber} Verse ${verseNumber} - BhagavadGita.io`,
images: [
{
url: "https://bhagavadgita.io/static/images/sribhagavadgita.jpg",
url: "https://bhagavadgita.io/_next/image?url=%2Fbanner2.png&w=3840&q=75",
secureUrl:
"https://bhagavadgita.io/static/images/sribhagavadgita.jpg",
"https://bhagavadgita.io/_next/image?url=%2Fbanner2.png&w=3840&q=75",
height: 1080,
width: 1920,
},
Expand All @@ -46,7 +46,9 @@ export async function generateMetadata({
twitter: {
card: "summary_large_image",
title: `Bhagavad Gita Chapter ${chapterNumber} Verse ${verseNumber} - BhagavadGita.io`,
images: ["https://bhagavadgita.io/static/images/sribhagavadgita.jpg"],
images: [
"https://bhagavadgita.io/_next/image?url=%2Fbanner2.png&w=3840&q=75",
],
site: "@ShriKrishna",
},
alternates: {
Expand Down
31 changes: 31 additions & 0 deletions src/app/gitagpt/[[...locale]]/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
export const jsonLdFirst = {
"@context": "http://schema.org",
"@type": "Organization",
"@id": "#organization",
name: "Bhagavad Gita",
url: "https://bhagavadgita.io",
logo: "https://bhagavadgita.io/static/images/radhakrishna.png",
};

export const jsonLdTwo = {
"@context": "http://schema.org",
"@type": "BreadcrumbList",
itemListElement: [
{
"@type": "ListItem",
position: 1,
item: {
"@id": "https://bhagavadgita.io",
name: "Home",
},
},
{
"@type": "ListItem",
position: 2,
item: {
"@id": "https://bhagavadgita.io/ai",
name: "Bhagavad Gita AI - Gita GPT - Ask Krishna",
},
},
],
};
7 changes: 7 additions & 0 deletions src/app/gitagpt/[[...locale]]/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from "react";

const GitagptLayout: React.FC<React.PropsWithChildren<{}>> = ({ children }) => {
return <>{children}</>;
};

export default GitagptLayout;
63 changes: 63 additions & 0 deletions src/app/gitagpt/[[...locale]]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
import React from "react";
import { Metadata } from "next";

import { paramsToLocale } from "shared/functions";
import { getTranslations } from "shared/translate/server";

import { jsonLdFirst, jsonLdTwo } from "./constants";

export const metadata: Metadata = {
title: "Bhagavad Gita AI - Gita GPT - Ask Krishna",
description:
"GitaGPT is a free Bhagavad Gita AI chatbot that uses the wisdom of the Bhagavad Gita to help answer your day-to-day questions. It's simple, insightful, and powered by ChatGPT.",
openGraph: {
title: "Bhagavad Gita AI - Gita GPT - Ask Krishna",
description:
"GitaGPT is a free Bhagavad Gita AI chatbot that uses the wisdom of the Bhagavad Gita to help answer your day-to-day questions. It's simple, insightful, and powered by ChatGPT.",
url: "https://bhagavadgita.io/gitagpt",
siteName: "Bhagavad Gita",
images:
"https://bhagavadgita.io/_next/image?url=%2Fbanner2.png&w=3840&q=75",
locale: "en_US",
type: "website",
},
twitter: {
card: "summary_large_image",
title: "Bhagavad Gita AI - Gita GPT - Ask Krishna",
description:
"GitaGPT is a free Bhagavad Gita AI chatbot that uses the wisdom of the Bhagavad Gita to help answer your day-to-day questions. It's simple, insightful, and powered by ChatGPT.",
images: [
"https://bhagavadgita.io/_next/image?url=%2Fbanner2.png&w=3840&q=75",
],
site: "@ShriKrishna",
},
alternates: {
canonical: "https://bhagavadgita.io/gitagpt",
},
};

export default async function GitagptPage(props: ParamsWithLocale) {
const { params } = props;
const locale = paramsToLocale(params);
return (
<>
<script
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLdFirst) }}
/>
<script
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLdTwo) }}
/>
<div style={{ height: "100vh", width: "100vw" }}>
<iframe
style={{ height: "100%", width: "100%" }}
src="https://widget.writesonic.com/CDN/index.html?service-base-url=https://api.botsonic.ai&token=aa0b5e0e-9284-4c52-968f-77f2c959dcdc&base-origin=https://bot.writesonic.com&instance-name=Botsonic&standalone=true&page-url=https://bot.writesonic.com/61178c5c-aed2-47c0-8759-305d2489956c?t=connect&workspace_id=91c72ad8-79d9-44aa-88e5-6c3738324985"
title="GitaGPT"
>
You need to enable JavaScript to run this app.
</iframe>
</div>
</>
);
}
8 changes: 5 additions & 3 deletions src/app/verse-of-the-day/[[...locale]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ export async function generateMetadata(): Promise<Metadata> {
title: `Bhagavad Gita - Verse of the Day`,
images: [
{
url: "https://bhagavadgita.io/static/images/sribhagavadgita.jpg",
url: "https://bhagavadgita.io/_next/image?url=%2Fbanner2.png&w=3840&q=75",
secureUrl:
"https://bhagavadgita.io/static/images/sribhagavadgita.jpg",
"https://bhagavadgita.io/_next/image?url=%2Fbanner2.png&w=3840&q=75",
height: 1080,
width: 1920,
},
Expand All @@ -33,7 +33,9 @@ export async function generateMetadata(): Promise<Metadata> {
twitter: {
card: "summary_large_image",
title: `Bhagavad Gita - Verse of the Day`,
images: ["https://bhagavadgita.io/static/images/sribhagavadgita.jpg"],
images: [
"https://bhagavadgita.io/_next/image?url=%2Fbanner2.png&w=3840&q=75",
],
site: "@ShriKrishna",
},
alternates: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Footers/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const getNavigation = (translate: Translate) => ({
className={className}
aria-hidden={ariaHidden}
>
<path d="M26.37,26l-8.795-12.822l0.015,0.012L25.52,4h-2.65l-6.46,7.48L11.28,4H4.33l8.211,11.971L12.54,15.97L3.88,26h2.65 l7.182-8.322L19.42,26H26.37z M10.23,6l12.34,18h-2.1L8.12,6H10.23z"/>
<path d="M26.37,26l-8.795-12.822l0.015,0.012L25.52,4h-2.65l-6.46,7.48L11.28,4H4.33l8.211,11.971L12.54,15.97L3.88,26h2.65 l7.182-8.322L19.42,26H26.37z M10.23,6l12.34,18h-2.1L8.12,6H10.23z" />
</svg>
),
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/Headers/IndexHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ export default function IndexHeader({ locale, translate }: Props) {
</svg>
</button>
<input
className="h-10 w-max rounded-lg border border-gray-300 bg-white px-8 pr-16 text-sm focus:outline-none dark:bg-dark-100 dark:placeholder:text-white dark:text-white"
className="h-10 w-max rounded-lg border border-gray-300 bg-white px-8 pr-16 text-sm focus:outline-none dark:bg-dark-100 dark:text-white dark:placeholder:text-white"
type="search"
name="search"
placeholder="Search"
Expand Down
2 changes: 1 addition & 1 deletion src/components/Home/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function Modal({ modalVisible, setModalVisible }: Props) {
leaveFrom="opacity-100 translate-y-0 sm:scale-100"
leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
>
<Dialog.Panel className="relative overflow-hidden rounded-lg bg-white text-left shadow-xl transition-all sm:w-full sm:max-w-sm dark:bg-dark-100">
<Dialog.Panel className="relative overflow-hidden rounded-lg bg-white text-left shadow-xl transition-all dark:bg-dark-100 sm:w-full sm:max-w-sm">
<div>
<div className="z-50 inline-block overflow-hidden rounded-lg bg-white text-left align-bottom shadow-xl transition-all duration-200 dark:bg-dark-100 sm:mt-8 sm:w-full sm:max-w-sm sm:p-6 sm:align-middle">
<div>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Home/Newsletter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const Newsletter = ({ notification, locale, translations }: Props) => {
</h3>
<form className="flex flex-col md:flex-row" onSubmit={onSubmit}>
<input
className="z-50 mr-6 mt-4 w-full appearance-none rounded-md border p-3 leading-tight text-gray-700 focus:border-my-orange focus:outline-none md:mt-0 dark:bg-dark-100 dark:placeholder:text-gray-50 dark:text-white"
className="z-50 mr-6 mt-4 w-full appearance-none rounded-md border p-3 leading-tight text-gray-700 focus:border-my-orange focus:outline-none dark:bg-dark-100 dark:text-white dark:placeholder:text-gray-50 md:mt-0"
id="name"
type="text"
value={formData.name}
Expand All @@ -121,7 +121,7 @@ const Newsletter = ({ notification, locale, translations }: Props) => {
placeholder={translate("Enter Your Name")}
/>
<input
className="z-50 mr-6 mt-4 w-full appearance-none rounded-md border p-3 leading-tight text-gray-700 focus:border-my-orange focus:outline-none md:mt-0 dark:bg-dark-100 dark:placeholder:text-gray-50 dark:text-white"
className="z-50 mr-6 mt-4 w-full appearance-none rounded-md border p-3 leading-tight text-gray-700 focus:border-my-orange focus:outline-none dark:bg-dark-100 dark:text-white dark:placeholder:text-gray-50 md:mt-0"
id="email"
type="email"
placeholder={translate("Enter Your Email")}
Expand Down

0 comments on commit e40a2bf

Please sign in to comment.