mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-15 06:35:20 -07:00
Move nuxtHead into config and rename config-node
This commit is contained in:
parent
3c776d7d81
commit
8ca200a548
6 changed files with 113 additions and 108 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
import { getNetlifyRedirect } from '~/helpers/config.js'
|
import { getNetlifyRedirect } from '~/helpers/config-node.js'
|
||||||
|
|
||||||
export async function catchRedirectResponse ( Astro ) {
|
export async function catchRedirectResponse ( Astro ) {
|
||||||
const requestUrl = new URL( Astro.request.url )
|
const requestUrl = new URL( Astro.request.url )
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,115 @@
|
||||||
import TOML from '@iarna/toml'
|
import TOML from '@iarna/toml'
|
||||||
import fs from 'fs-extra'
|
import fs from 'fs-extra'
|
||||||
|
|
||||||
import nuxtConfig from '~/nuxt.config.js'
|
import pkg from '~/package.json'
|
||||||
|
|
||||||
import { getSiteUrl } from '~/helpers/url.js'
|
import { getSiteUrl } from '~/helpers/url.js'
|
||||||
|
|
||||||
export const nuxtHead = nuxtConfig.head
|
|
||||||
|
export const siteUrl = getSiteUrl()
|
||||||
|
|
||||||
|
export const nuxtHead = {
|
||||||
|
// this htmlAttrs you need
|
||||||
|
htmlAttrs: {
|
||||||
|
lang: 'en',
|
||||||
|
},
|
||||||
|
title: 'Does It ARM',
|
||||||
|
description: pkg.description,
|
||||||
|
|
||||||
|
meta: [
|
||||||
|
{ charset: 'utf-8' },
|
||||||
|
{
|
||||||
|
name: 'viewport',
|
||||||
|
content: 'width=device-width, initial-scale=1'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
hid: 'description',
|
||||||
|
name: 'description',
|
||||||
|
content: pkg.description
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'property': 'og:image',
|
||||||
|
'content': `${ siteUrl }/images/og-image.png`
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'property': 'og:image:width',
|
||||||
|
'content': '1200'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'property': 'og:image:height',
|
||||||
|
'content': '627'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'property': 'og:image:alt',
|
||||||
|
'content': 'Does It ARM Logo'
|
||||||
|
},
|
||||||
|
|
||||||
|
// Twitter Card
|
||||||
|
{
|
||||||
|
'property': 'twitter:card',
|
||||||
|
'content': 'summary'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'property': 'twitter:title',
|
||||||
|
'content': 'Does It ARM'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'property': 'twitter:description',
|
||||||
|
'content': pkg.description
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'property': 'twitter:url',
|
||||||
|
'content': `${ siteUrl }`
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'property': 'twitter:image',
|
||||||
|
'content': `${ siteUrl }/images/mark.png`
|
||||||
|
}
|
||||||
|
],
|
||||||
|
link: [
|
||||||
|
// Favicon
|
||||||
|
{
|
||||||
|
rel: 'icon',
|
||||||
|
type: 'image/x-icon',
|
||||||
|
href: '/favicon.ico'
|
||||||
|
},
|
||||||
|
|
||||||
|
// Gtag Preconnect
|
||||||
|
{
|
||||||
|
rel: 'preconnect',
|
||||||
|
href: 'https://www.googletagmanager.com'
|
||||||
|
},
|
||||||
|
|
||||||
|
// Carbon Preconnects
|
||||||
|
{
|
||||||
|
rel: 'preconnect',
|
||||||
|
href: 'https://cdn.carbonads.com'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
rel: 'preconnect',
|
||||||
|
href: 'https://srv.carbonads.net'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
rel: 'preconnect',
|
||||||
|
href: 'https://cdn4.buysellads.net'
|
||||||
|
},
|
||||||
|
],
|
||||||
|
|
||||||
|
script: [
|
||||||
|
// // Carbon Ads
|
||||||
|
// // https://sell.buysellads.com/zones/1294/ad-tags#z=js
|
||||||
|
// {
|
||||||
|
// // <script async type="text/javascript" src="//cdn.carbonads.com/carbon.js?serve=CK7DVK3M&placement=doesitarmcom" id="_carbonads_js"></script>
|
||||||
|
// src: 'https://cdn.carbonads.com/carbon.js?serve=CK7DVK3M&placement=doesitarmcom',
|
||||||
|
// async: true,
|
||||||
|
// type: 'text/javascript',
|
||||||
|
// id: '_carbonads_js',
|
||||||
|
// class: 'include-on-static carbon-inline-wide',
|
||||||
|
// body: true
|
||||||
|
// }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export async function getNetlifyConfig () {
|
export async function getNetlifyConfig () {
|
||||||
const configPath = './netlify.toml'
|
const configPath = './netlify.toml'
|
||||||
|
|
@ -7,7 +7,7 @@ import {
|
||||||
getAppType
|
getAppType
|
||||||
} from './app-derived.js'
|
} from './app-derived.js'
|
||||||
import { buildVideoStructuredData } from './structured-data.js'
|
import { buildVideoStructuredData } from './structured-data.js'
|
||||||
import { nuxtHead } from './config.js'
|
import { nuxtHead } from '~/helpers/config-node.js'
|
||||||
import {
|
import {
|
||||||
getPartPartsFromUrl
|
getPartPartsFromUrl
|
||||||
} from './url.js'
|
} from './url.js'
|
||||||
|
|
|
||||||
103
nuxt.config.js
103
nuxt.config.js
|
|
@ -5,6 +5,7 @@ import { getSiteUrl } from '~/helpers/url.js'
|
||||||
import { publicRuntimeConfig } from '~/helpers/public-runtime-config.mjs'
|
import { publicRuntimeConfig } from '~/helpers/public-runtime-config.mjs'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const siteUrl = getSiteUrl()
|
const siteUrl = getSiteUrl()
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -42,107 +43,7 @@ export default {
|
||||||
/*
|
/*
|
||||||
** Headers of the page
|
** Headers of the page
|
||||||
*/
|
*/
|
||||||
head: {
|
head: ,
|
||||||
// this htmlAttrs you need
|
|
||||||
htmlAttrs: {
|
|
||||||
lang: 'en',
|
|
||||||
},
|
|
||||||
title: 'Does It ARM',
|
|
||||||
description: pkg.description,
|
|
||||||
|
|
||||||
meta: [
|
|
||||||
{ charset: 'utf-8' },
|
|
||||||
{
|
|
||||||
name: 'viewport',
|
|
||||||
content: 'width=device-width, initial-scale=1'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
hid: 'description',
|
|
||||||
name: 'description',
|
|
||||||
content: pkg.description
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'property': 'og:image',
|
|
||||||
'content': `${ siteUrl }/images/og-image.png`
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'property': 'og:image:width',
|
|
||||||
'content': '1200'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'property': 'og:image:height',
|
|
||||||
'content': '627'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'property': 'og:image:alt',
|
|
||||||
'content': 'Does It ARM Logo'
|
|
||||||
},
|
|
||||||
|
|
||||||
// Twitter Card
|
|
||||||
{
|
|
||||||
'property': 'twitter:card',
|
|
||||||
'content': 'summary'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'property': 'twitter:title',
|
|
||||||
'content': 'Does It ARM'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'property': 'twitter:description',
|
|
||||||
'content': pkg.description
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'property': 'twitter:url',
|
|
||||||
'content': `${ siteUrl }`
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'property': 'twitter:image',
|
|
||||||
'content': `${ siteUrl }/images/mark.png`
|
|
||||||
}
|
|
||||||
],
|
|
||||||
link: [
|
|
||||||
// Favicon
|
|
||||||
{
|
|
||||||
rel: 'icon',
|
|
||||||
type: 'image/x-icon',
|
|
||||||
href: '/favicon.ico'
|
|
||||||
},
|
|
||||||
|
|
||||||
// Gtag Preconnect
|
|
||||||
{
|
|
||||||
rel: 'preconnect',
|
|
||||||
href: 'https://www.googletagmanager.com'
|
|
||||||
},
|
|
||||||
|
|
||||||
// Carbon Preconnects
|
|
||||||
{
|
|
||||||
rel: 'preconnect',
|
|
||||||
href: 'https://cdn.carbonads.com'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
rel: 'preconnect',
|
|
||||||
href: 'https://srv.carbonads.net'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
rel: 'preconnect',
|
|
||||||
href: 'https://cdn4.buysellads.net'
|
|
||||||
},
|
|
||||||
],
|
|
||||||
|
|
||||||
script: [
|
|
||||||
// // Carbon Ads
|
|
||||||
// // https://sell.buysellads.com/zones/1294/ad-tags#z=js
|
|
||||||
// {
|
|
||||||
// // <script async type="text/javascript" src="//cdn.carbonads.com/carbon.js?serve=CK7DVK3M&placement=doesitarmcom" id="_carbonads_js"></script>
|
|
||||||
// src: 'https://cdn.carbonads.com/carbon.js?serve=CK7DVK3M&placement=doesitarmcom',
|
|
||||||
// async: true,
|
|
||||||
// type: 'text/javascript',
|
|
||||||
// id: '_carbonads_js',
|
|
||||||
// class: 'include-on-static carbon-inline-wide',
|
|
||||||
// body: true
|
|
||||||
// }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Customize the progress-bar color
|
** Customize the progress-bar color
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
---
|
---
|
||||||
import '~/assets/css/tailwind.css'
|
import '~/assets/css/tailwind.css'
|
||||||
|
|
||||||
import { PageHead } from '~/helpers/config.js'
|
import { PageHead } from '~/helpers/config-node.js'
|
||||||
|
|
||||||
import VueBaseLayout from '../../layouts/base.vue'
|
import VueBaseLayout from '../../layouts/base.vue'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import {
|
||||||
ListingDetails
|
ListingDetails
|
||||||
} from '~/helpers/listing-page.js'
|
} from '~/helpers/listing-page.js'
|
||||||
import { headPropertyTypes } from '~/test/helpers/head.js'
|
import { headPropertyTypes } from '~/test/helpers/head.js'
|
||||||
import { PageHead } from '~/helpers/config.js'
|
import { PageHead } from '~/helpers/config-node.js'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue