Skip to content
This repository was archived by the owner on May 29, 2023. It is now read-only.

Commit e07060b

Browse files
author
ugistelmokaitis
committed
Add[pwa & meta]: add to the meta info to the head & SocialProfileJsonLd
1 parent c23585b commit e07060b

14 files changed

+103
-60
lines changed

components/layout.tsx

+7-19
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const Layout: FC<LayoutProps> = ({
3131
{
3232
url: `${process.env.NEXT_PUBLIC_SITE_URL ?? ''}/cover.png`,
3333
width: 1200,
34-
height: 670,
34+
height: 630,
3535
alt: name,
3636
},
3737
];
@@ -48,7 +48,7 @@ const Layout: FC<LayoutProps> = ({
4848
return (
4949
<>
5050
<NextSeo
51-
titleTemplate={`%s - ${name} - Software Developer`}
51+
titleTemplate={`%s | ${name} | Software Developer`}
5252
title={title ?? ''}
5353
description={description ?? ''}
5454
canonical={url}
@@ -58,7 +58,7 @@ const Layout: FC<LayoutProps> = ({
5858
description: description ?? '',
5959
images,
6060
site_name: name,
61-
type: '- Software Developer',
61+
type: '| Software Developer',
6262
profile: {
6363
username,
6464
},
@@ -69,28 +69,16 @@ const Layout: FC<LayoutProps> = ({
6969
cardType: 'summary_large_image',
7070
}}
7171
/>
72-
{/* <SocialProfileJsonLd
72+
<SocialProfileJsonLd
7373
name={name}
7474
type="Organization"
7575
url={process.env.NEXT_PUBLIC_SITE_URL ?? ''}
76-
77-
sameAs={settings.social_header.map((social) =>
78-
docResolver(social.social_media_link)
76+
sameAs={settings.data.footerSocialMedia.map(({ socialMediaLink }) =>
77+
docResolver(socialMediaLink)
7978
)}
80-
/> */}
79+
/>
8180

8281
<Header settings={settings} />
83-
<div>
84-
{/* <AnimatedCursor
85-
innerSize={8}
86-
outerSize={9}
87-
color="21, 91, 226"
88-
outerAlpha={0.2}
89-
innerScale={0.7}
90-
outerScale={9}
91-
trailingSpeed={8}
92-
/> */}
93-
</div>
9482
{children}
9583
<Footer settings={settings} />
9684
</>

next-sitemap.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/** @type {import('next-sitemap').IConfig} */
2+
3+
module.exports = {
4+
siteUrl: process.env.NEXT_PUBLIC_SITE_URL,
5+
generateRobotsTxt: true,
6+
};

next.config.js

+42-40
Original file line numberDiff line numberDiff line change
@@ -6,47 +6,49 @@ const withBundleAnalyzer = require('@next/bundle-analyzer')({
66
enabled: process.env.ANALYZE === 'true',
77
});
88

9-
10-
module.exports = withPlugins(
9+
/**
10+
* @type {import('next').NextConfig}
11+
*/
12+
const options = {
13+
async headers() {
14+
return [{source: "/(.*)", headers: createSecureHeaders()}];
15+
},
16+
17+
18+
images: {
19+
domains: ['images.prismic.io', 'charm.cdn.prismic.io'],
20+
disableStaticImages: true,
21+
},
22+
23+
webpack(config) {
24+
config.module.rules.push({
25+
test: /\.svg$/,
26+
use: ["@svgr/webpack"]
27+
});
28+
return config;
29+
30+
}
31+
};
32+
33+
const plugins = [
1134
[
12-
[
13-
withPWA,
14-
{
15-
pwa: {
16-
disable: process.env.NODE_ENV === "development",
17-
dest: 'public',
18-
dynamicStartUrl: false,
19-
mode: process.env.NODE_ENV,
20-
},
35+
withPWA,
36+
{
37+
pwa: {
38+
disable: process.env.NODE_ENV === "development",
39+
dest: 'public',
40+
dynamicStartUrl: false,
41+
mode: process.env.NODE_ENV,
2142
},
22-
[
23-
withSentryConfig,
24-
{
25-
silent: true,
26-
},
27-
],
28-
[withBundleAnalyzer],
29-
]
30-
],
31-
{
32-
33-
34-
async headers() {
35-
return [{source: "/(.*)", headers: createSecureHeaders()}];
36-
},
37-
38-
39-
images: {
40-
domains: ['images.prismic.io', 'charm.cdn.prismic.io'],
41-
disableStaticImages: true,
4243
},
44+
],
45+
/* [
46+
withSentryConfig,
47+
{
48+
silent: true,
49+
},
50+
], */
51+
withBundleAnalyzer,
52+
];
4353

44-
webpack(config) {
45-
config.module.rules.push({
46-
test: /\.svg$/,
47-
use: ["@svgr/webpack"]
48-
});
49-
return config;
50-
51-
}
52-
});
54+
module.exports = withPlugins(plugins, options);

pages/_app.tsx

+24-1
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,37 @@ import { PrismicProvider } from '@prismicio/react';
44
import type { FC } from 'react';
55
import { Toaster } from 'react-hot-toast';
66
import '../styles/tippy.css';
7-
7+
import Head from 'next/head';
88
import { client, linkResolver } from '../utils/prismic';
99
import ExternalLinkComponent from '../components/externalLink';
1010
import InternalLinkComponent from '../components/internalLink';
1111
import richTextComponents from '../components/richTextComponents';
1212

1313
const MyApp: FC<AppProps> = ({ Component, pageProps }) => (
1414
<>
15+
<Head>
16+
<meta charSet="utf-8" />
17+
<meta
18+
name="viewport"
19+
content="minimum-scale=1, initial-scale=1, width=device-width, shrink-to-fit=no, viewport-fit=cover"
20+
/>
21+
22+
<meta name="application-name" content="Ugi Stelmokaitis" />
23+
<meta name="apple-mobile-web-app-capable" content="yes" />
24+
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
25+
<meta name="apple-mobile-web-app-title" content="Ugi Stelmokaitis" />
26+
27+
<meta name="format-detection" content="telephone=no" />
28+
<meta name="mobile-web-app-capable" content="yes" />
29+
<meta name="msapplication-TileColor" content="#111827" />
30+
<meta name="msapplication-tap-highlight" content="no" />
31+
<meta name="theme-color" content="#111827" />
32+
<link rel="manifest" href="/manifest.json" />
33+
34+
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
35+
<link rel="icon" type="image/png" href="/favicon.png" />
36+
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#111827" />
37+
</Head>
1538
<PrismicProvider
1639
linkResolver={linkResolver}
1740
internalLinkComponent={InternalLinkComponent}

public/android-chrome-192x192.png

1.14 KB
Loading

public/android-chrome-512x512.png

5.85 KB
Loading

public/apple-touch-icon.png

1.04 KB
Loading

public/cover.png

160 KB
Loading

public/favicon.ico

-10.3 KB
Binary file not shown.

public/favicon.png

301 Bytes
Loading

public/icons/socialLinkIcon.svg

+1
Loading

public/manifest.json

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"name": "Ugi Stelmokaitis",
3+
"short_name": "Ugi Stelmokaitis",
4+
"icons": [
5+
{
6+
"src": "/android-chrome-192x192.png",
7+
"sizes": "192x192",
8+
"type": "image/png"
9+
},
10+
{
11+
"src": "/android-chrome-512x512.png",
12+
"sizes": "512x512",
13+
"type": "image/png",
14+
"purpose": "maskable"
15+
}
16+
],
17+
"theme_color": "#111827",
18+
"background_color": "#111827",
19+
"start_url": "/",
20+
"display": "standalone",
21+
"orientation": "portrait"
22+
}

public/safaru-pinned-tab.png

300 Bytes
Loading

tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"compilerOptions": {
3+
"typeRoots": ["node_modules/@types"],
34
"target": "es5",
45
"lib": ["dom", "dom.iterable", "esnext"],
56
"allowJs": true,

0 commit comments

Comments
 (0)