Skip to content

Commit

Permalink
fix minor seo issues #41
Browse files Browse the repository at this point in the history
  • Loading branch information
ukorvl committed Jan 20, 2024
1 parent d08e446 commit eb82152
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ NEXT_PUBLIC_CONTACT_PHONE="+374 431 085 88"

NEXT_PUBLIC_LOCATION_GOOGLE_MAPS_LINK="https://shorturl.at/gsuK5"
NEXT_PUBLIC_LOCATION_ADDRESS_TEXT=" 41, 4 Abovyan St, Yerevan 0009"

PUBLIC
8 changes: 8 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ on:
description: 'Branch to build'
required: true
default: 'master'
workflow_call:
inputs:
public_path:
type: string
description: 'Inject public path'
required: false
default: ''

jobs:
build:
Expand All @@ -34,6 +41,7 @@ jobs:
envkey_NEXT_PUBLIC_FORMSPREE_ID: "${{ secrets.NEXT_PUBLIC_FORMSPREE_ID }}"
envkey_NEXT_PUBLIC_HOTJAR_ID: ${{ secrets.NEXT_PUBLIC_HOTJAR_ID }}
envkey_NEXT_PUBLIC_HOTJAR_SNIPPET_VERSION: ${{ secrets.NEXT_PUBLIC_HOTJAR_SNIPPET_VERSION }}
envkey_PUBLIC_PATH: ${{ github.event.inputs.public_path }}
directory: '.'
file_name: .env.local
fail_on_empty: false
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,21 @@ on:
branches:
- master

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
uses: ./build.yml
with:
branch: ${{ github.event.head_commit.message }}
inject_public_path: https://${{ github.repository_owner }}.github.io/${{ github.repository_name }}

deploy:
name: Deploy
Expand Down
2 changes: 2 additions & 0 deletions app/about/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ import Philosophy from '@/components/pages/About/Philosophy';
import CATLink from '@/components/shared/CATLink/CATLink';
import BlockWithImage from '@/components/pages/About/BlockWithImage';
import WhyJoinBlock from '@/components/pages/About/WhyJoinBlock/WhyJoinBlock';
import metadataBase from '../metadata';

export const metadata: Metadata = {
title: 'About',
openGraph: {
title: 'Salsaviva - About',
description: `Get ready to discover the Magic at Salsaviva. Read about our
welcoming and inspiring community of dancers`,
...metadataBase.openGraph,
},
};

Expand Down
2 changes: 2 additions & 0 deletions app/contact/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ import AppearInViewport from '@/components/shared/AppearInViewport/AppearInViewp
import TransitionDuration from '@/lib/framerMotion/TransitionDuration';
import getTextSlideIntoViewVarinats from '@/lib/framerMotion/variants/getTextSlideIntoViewVarinats';
import FormWrapper from '@/components/pages/Contact/FormWrapper/FormWrapper';
import metadataBase from '../metadata';

export const metadata: Metadata = {
title: 'Contact',
openGraph: {
title: 'Salsaviva - Contact',
description: 'Connect and dance: Contacts for Your next breathtaking dancing adventure',
...metadataBase.openGraph,
},
};

Expand Down
2 changes: 2 additions & 0 deletions app/gallery/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ import Gallery from '@/components/pages/Gallery/Gallery';
import AppearInViewport from '@/components/shared/AppearInViewport/AppearInViewport';
import SocialIcons from '@/components/shared/SocialIcons/SocialIcons';
import TransitionDuration from '@/lib/framerMotion/TransitionDuration';
import metadataBase from '../metadata';
import './styles.css';

export const metadata: Metadata = {
title: 'Gallery',
openGraph: {
title: 'Salsaviva - Gallery',
description: 'Explore the vibrant world of social dance',
...metadataBase.openGraph,
},
};

Expand Down
3 changes: 3 additions & 0 deletions app/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,15 @@ const metadata: Metadata = {
],
locale: 'en_US',
type: 'website',
siteName: 'Salsaviva',
url: origin,
},
twitter: {
card: 'summary_large_image',
title: 'Salsaviva',
description: 'Salsa, Bachata and Kizomba in Yerevan',
images: ['/og.jpg'],
site: '@salsaviva',
},
icons: [
{
Expand Down
2 changes: 2 additions & 0 deletions app/teachers/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import CATLink from '@/components/shared/CATLink/CATLink';
import AppearInViewport from '@/components/shared/AppearInViewport/AppearInViewport';
import TransitionDuration from '@/lib/framerMotion/TransitionDuration';
import getTextSlideIntoViewVarinats from '@/lib/framerMotion/variants/getTextSlideIntoViewVarinats';
import metadataBase from '../metadata';

const pageDescription = 'Meet your inspirational guides in the world of social dance';

Expand All @@ -13,6 +14,7 @@ export const metadata: Metadata = {
openGraph: {
title: 'Salsaviva - Teachers',
description: pageDescription,
...metadataBase.openGraph,
},
};

Expand Down
3 changes: 3 additions & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import './app/env.mjs';
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'export',
images: {
unoptimized: true,
},
};

const withAnalyzer = withBundleAnalyzer({
Expand Down
12 changes: 6 additions & 6 deletions scripts/checkSeo.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ new SeoAnalyzer()
.inputFolders([process.cwd() + '/out'])
// Rules
.addRule('titleLengthRule', {min: 10, max: 50})
.addRule('canonicalLinkRule')
.addRule('metaBaseRule', {names: ['description', 'viewport']})
.addRule('metaSocialRule', {
properties: [
Expand All @@ -18,17 +17,18 @@ new SeoAnalyzer()
'og:image',
'og:image:width',
'og:image:height',
],
names: [
'twitter:card',
'twitter:text:title',
'twitter:title',
'twitter:description',
'twitter:image:src',
'twitter:url',
'twitter:image',
'twitter:site',
],
})
.addRule(h1TagRule)
//.addRule(h1TagRule)
.addRule('imgTagWithAltAttributeRule')
.addRule('aTagWithRelAttributeRule')
.addRule('canonicalLinkRule')
// Output
.outputConsole();

Expand Down

0 comments on commit eb82152

Please sign in to comment.