Skip to content

Commit 7bc5880

Browse files
committed
fix: using nuxt.config to put head meta and link tags
1 parent b3dca63 commit 7bc5880

File tree

2 files changed

+42
-42
lines changed

2 files changed

+42
-42
lines changed

app.html

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,41 +2,6 @@
22
<html lang="en" {{ HTML_ATTRS }}>
33

44
<head {{ HEAD_ATTRS }}>
5-
<title>Diff viewer</title>
6-
<meta name="theme-color" content="#2563EB">
7-
<link rel="manifest" href="/manifest.json" />
8-
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
9-
<meta property="og:url" content="https://diffviewer.vercel.app/">
10-
<meta name="og:image" property="og:image" content="https://diffviewer.vercel.app/brand-430x495.png">
11-
<meta name="twitter:title" content="A privacy focused, secure, easy sharable and simple diff viewer">
12-
<meta name="og:title" property="og:title" content="A privacy focused, secure, easy sharable and simple diff viewer">
13-
<meta property="og:type" name="og:type" content="website">
14-
<meta name="description" content="A privacy focused, secure, easy sharable and simple diff viewer">
15-
<meta property="og:description" name="og:description"
16-
content="A privacy focused, secure, easy sharable and simple diff viewer">
17-
<meta name="twitter:description" content="A privacy focused, secure, easy sharable and simple diff viewer">
18-
<meta property="og:url" name="og:url" content="https://diffviewer.vercel.app/">
19-
<meta name="twitter:card" content="summary">
20-
<meta name="twitter:creator" content="@technikhil314">
21-
<meta property="og:image" name="og:image" content="https://diffviewer.vercel.app/128x128.png">
22-
<meta property="og:image" name="og:image" content="https://diffviewer.vercel.app/brand-192x192.png">
23-
<meta property="og:image" name="og:image" content="https://diffviewer.vercel.app/brand-200x200.png">
24-
<meta property="og:image" name="og:image" content="https://diffviewer.vercel.app/brand-512x512.png">
25-
<meta property="og:image" name="og:image" content="https://diffviewer.vercel.app/brand-800x800.png">
26-
<meta name="image" property="og:image" content="https://diffviewer.vercel.app/brand-1200x600.png">
27-
<meta name="og:image:alt" property="og:image:alt"
28-
content="A privacy focused, secure, easy sharable and simple diff viewer">
29-
<meta name="twitter:image" content="https://diffviewer.vercel.app/128x128.png">
30-
<link rel="canonical" href="https://diffviewer.vercel.app/">
31-
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
32-
<link rel="apple-touch-icon" sizes="57x57" href="/apple-touch-icon-57x57.png" />
33-
<link rel="apple-touch-icon" sizes="72x72" href="/apple-touch-icon-72x72.png" />
34-
<link rel="apple-touch-icon" sizes="76x76" href="/apple-touch-icon-76x76.png" />
35-
<link rel="apple-touch-icon" sizes="114x114" href="/apple-touch-icon-114x114.png" />
36-
<link rel="apple-touch-icon" sizes="120x120" href="/apple-touch-icon-120x120.png" />
37-
<link rel="apple-touch-icon" sizes="144x144" href="/apple-touch-icon-144x144.png" />
38-
<link rel="apple-touch-icon" sizes="152x152" href="/apple-touch-icon-152x152.png" />
39-
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon-180x180.png" />
405
<script>(function (w, d, s, l, i) {
416
w[l] = w[l] || []; w[l].push({
427
'gtm.start':

nuxt.config.js

Lines changed: 42 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,52 @@
1+
const BASE_URL = "https://diffviewer.vercel.app";
2+
const domainAliases = [
3+
"https://diffchecker.vercel.app/",
4+
"https://textdiff.vercel.app/"
5+
]
6+
const canonicalLinks = domainAliases.map(x => ({ rel: "canonical", href: x }))
7+
const DESCRIPTION = "A privacy focused, secure, easy sharable and simple diff viewer";
18
export default {
2-
// Target: https://go.nuxtjs.dev/config-target
39
target: 'static',
4-
5-
// Global page headers: https://go.nuxtjs.dev/config-head
610
head: {
7-
title: 'offline-diff-viewer',
11+
title: 'Diff viewer',
812
meta: [
913
{ charset: 'utf-8' },
1014
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
11-
{ hid: 'description', name: 'description', content: '' },
12-
{ name: 'format-detection', content: 'telephone=no' }
15+
{ name: 'format-detection', content: 'telephone=no' },
16+
{ name: "theme-color", content: "#2563EB" },
17+
{ name: "og:url", property: "og:url", content: `${BASE_URL}` },
18+
{ name: "og:image", property: "og:url", content: `${BASE_URL}/brand-430x495.png` },
19+
{ name: "twitter:title", property: "og:url", content: DESCRIPTION },
20+
{ name: "og:title", property: "og:url", content: DESCRIPTION },
21+
{ name: "og:type", property: "og:url", content: "website" },
22+
{ name: "description", property: "og:url", content: DESCRIPTION },
23+
{ name: "og:description", property: "og:url", content: DESCRIPTION },
24+
{ name: "twitter:description", property: "og:url", content: DESCRIPTION },
25+
{ name: "twitter:card", property: "og:url", content: "summary" },
26+
{ name: "twitter:creator", property: "og:url", content: "@technikhil314" },
27+
{ name: "og:image", property: "og:url", content: `${BASE_URL}/128x128.png` },
28+
{ name: "og:image", property: "og:url", content: `${BASE_URL}/brand-192x192.png` },
29+
{ name: "og:image", property: "og:url", content: `${BASE_URL}/brand-200x200.png` },
30+
{ name: "og:image", property: "og:url", content: `${BASE_URL}/brand-512x512.png` },
31+
{ name: "og:image", property: "og:url", content: `${BASE_URL}/brand-800x800.png` },
32+
{ name: "image", property: "og:url", content: `${BASE_URL}/brand-1200x600.png` },
33+
{ name: "og:image:alt", property: "og:url", content: DESCRIPTION },
34+
{ name: "twitter:image", property: "og:url", content: `${BASE_URL}/128x128.png` },
1335
],
1436
link: [
15-
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
37+
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
38+
{ rel: "manifest", href: "/manifest.json" },
39+
{ rel: "shortcut icon", href: "/favicon.ico", type: "image/x-icon" },
40+
{ rel: "apple-touch-icon", href: "/apple-touch-icon.png" },
41+
{ rel: "apple-touch-icon", sizes: "57x57", href: "/apple-touch-icon-57x57.png" },
42+
{ rel: "apple-touch-icon", sizes: "72x72", href: "/apple-touch-icon-72x72.png" },
43+
{ rel: "apple-touch-icon", sizes: "76x76", href: "/apple-touch-icon-76x76.png" },
44+
{ rel: "apple-touch-icon", sizes: "114x114", href: "/apple-touch-icon-114x114.png" },
45+
{ rel: "apple-touch-icon", sizes: "120x120", href: "/apple-touch-icon-120x120.png" },
46+
{ rel: "apple-touch-icon", sizes: "144x144", href: "/apple-touch-icon-144x144.png" },
47+
{ rel: "apple-touch-icon", sizes: "152x152", href: "/apple-touch-icon-152x152.png" },
48+
{ rel: "apple-touch-icon", sizes: "180x180", href: "/apple-touch-icon-180x180.png" },
49+
...canonicalLinks
1650
]
1751
},
1852

@@ -53,5 +87,6 @@ export default {
5387

5488
// Build Configuration: https://go.nuxtjs.dev/config-build
5589
build: {
90+
extractCSS: true
5691
}
5792
}

0 commit comments

Comments
 (0)