From 40ed081c0825ada34f539078a9cee4213185693a Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 4 Nov 2021 12:53:15 +0200 Subject: [PATCH 01/16] change amp on m in amp route --- lib/module.js | 10 +++++----- lib/runtime/plugin.js | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/module.js b/lib/module.js index 690e8155..94ff9c5b 100644 --- a/lib/module.js +++ b/lib/module.js @@ -57,10 +57,10 @@ module.exports = function (moduleOptions) { function processRoutes (options) { this.nuxt.hook('generate:extendRoutes', (routes) => { for (const route of routes) { - if (route.route && route.route !== '/amp' && route.route.indexOf('/amp/') !== 0) { + if (route.route && route.route !== '/m' && route.route.indexOf('/m/') !== 0) { routes.push({ ...route, - route: '/amp' + route.route + route: '/m' + route.route }) } } @@ -71,7 +71,7 @@ function processRoutes (options) { */ this.nuxt.hook('generate:page', ({ page, errors }) => { if (errors.length) { - const error = errors.find(error => error.route.includes('/amp')) + const error = errors.find(error => error.route.includes('/m')) if (error && error.error.statusCode === 404) { page.exclude = true } @@ -86,12 +86,12 @@ function processRoutes (options) { route.alias = [route.alias] } - if (route.path === '/amp' || route.path.indexOf('/amp/') === 0) { + if (route.path === '/m' || route.path.indexOf('/m/') === 0) { routes.splice(head, 0, routes.splice(index, 1)[0]) head += 1 route.meta.amp = true } else if (!Array.isArray(options.routeAliases) || options.routeAliases.includes(route.path)) { - route.alias.push('/amp' + route.path) + route.alias.push('/m' + route.path) } } }) diff --git a/lib/runtime/plugin.js b/lib/runtime/plugin.js index cf816096..fe5bc806 100644 --- a/lib/runtime/plugin.js +++ b/lib/runtime/plugin.js @@ -21,7 +21,7 @@ export default function (ctx, { origin, mode }) { if (!route.matched[0]) { return } - const hasAMPPrefix = route.path === '/amp' || route.path.indexOf('/amp/') === 0 + const hasAMPPrefix = route.path === '/m' || route.path.indexOf('/m/') === 0 const { options } = route.matched[0].components.default const metaAMP = Array.isArray(route.meta) ? route.meta[0].amp : route.meta.amp From 4ba3aa21471540eeee301af0940e19bd3043511b Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 4 Nov 2021 17:27:56 +0200 Subject: [PATCH 02/16] change route m --- lib/module.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/module.js b/lib/module.js index 94ff9c5b..d261ad79 100644 --- a/lib/module.js +++ b/lib/module.js @@ -60,7 +60,7 @@ function processRoutes (options) { if (route.route && route.route !== '/m' && route.route.indexOf('/m/') !== 0) { routes.push({ ...route, - route: '/m' + route.route + route: route.route + 'm/' }) } } From 622c7ee8f83e495a8a7a671ca2c3abdd97cc8f98 Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 4 Nov 2021 17:32:30 +0200 Subject: [PATCH 03/16] change route m --- lib/module.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/module.js b/lib/module.js index d261ad79..aefce645 100644 --- a/lib/module.js +++ b/lib/module.js @@ -91,7 +91,7 @@ function processRoutes (options) { head += 1 route.meta.amp = true } else if (!Array.isArray(options.routeAliases) || options.routeAliases.includes(route.path)) { - route.alias.push('/m' + route.path) + route.alias.push(route.path + 'm/') } } }) From ada81c5cad5c9f1c3d744d6d61d45f1aabe68e0c Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 4 Nov 2021 17:40:21 +0200 Subject: [PATCH 04/16] change route m --- lib/module.js | 6 +++--- lib/runtime/plugin.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/module.js b/lib/module.js index aefce645..6fe2460a 100644 --- a/lib/module.js +++ b/lib/module.js @@ -57,7 +57,7 @@ module.exports = function (moduleOptions) { function processRoutes (options) { this.nuxt.hook('generate:extendRoutes', (routes) => { for (const route of routes) { - if (route.route && route.route !== '/m' && route.route.indexOf('/m/') !== 0) { + if (route.route && route.route !== 'm/' && route.route.indexOf('/m/') !== 0) { routes.push({ ...route, route: route.route + 'm/' @@ -71,7 +71,7 @@ function processRoutes (options) { */ this.nuxt.hook('generate:page', ({ page, errors }) => { if (errors.length) { - const error = errors.find(error => error.route.includes('/m')) + const error = errors.find(error => error.route.includes('m/')) if (error && error.error.statusCode === 404) { page.exclude = true } @@ -86,7 +86,7 @@ function processRoutes (options) { route.alias = [route.alias] } - if (route.path === '/m' || route.path.indexOf('/m/') === 0) { + if (route.path === 'm/' || route.path.indexOf('/m/') === 0) { routes.splice(head, 0, routes.splice(index, 1)[0]) head += 1 route.meta.amp = true diff --git a/lib/runtime/plugin.js b/lib/runtime/plugin.js index fe5bc806..0e66118e 100644 --- a/lib/runtime/plugin.js +++ b/lib/runtime/plugin.js @@ -123,7 +123,7 @@ const createCustomHead = (originalHead, origin) => function customHead () { // Add amphtml meta only if page has amp counterpart if (this.$ampMode !== false && this.$isAMP === false) { if (!head.link.find(l => l.rel === 'amphtml' || l.hid === 'amphtml')) { - const ampPrefix = this.$ampMode === 'only' ? '' : '/amp' + const ampPrefix = this.$ampMode === 'only' ? '' : 'm/' head.link.push({ rel: 'amphtml', hid: 'amphtml', From a39979897e8fe05d58894565998ede15441847f2 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 8 Nov 2021 18:54:37 +0200 Subject: [PATCH 05/16] add /m/ --- lib/runtime/plugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/runtime/plugin.js b/lib/runtime/plugin.js index 0e66118e..5800e6fa 100644 --- a/lib/runtime/plugin.js +++ b/lib/runtime/plugin.js @@ -21,7 +21,7 @@ export default function (ctx, { origin, mode }) { if (!route.matched[0]) { return } - const hasAMPPrefix = route.path === '/m' || route.path.indexOf('/m/') === 0 + const hasAMPPrefix = route.path === '/m' || route.path.includes('/m/') const { options } = route.matched[0].components.default const metaAMP = Array.isArray(route.meta) ? route.meta[0].amp : route.meta.amp From c44a2dd9595878f363025f9c06740a0356220569 Mon Sep 17 00:00:00 2001 From: Kostia Miliev Date: Thu, 11 Nov 2021 00:44:37 +0800 Subject: [PATCH 06/16] fixes for canonical url, and amphtml meta --- lib/runtime/plugin.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/runtime/plugin.js b/lib/runtime/plugin.js index 5800e6fa..48453286 100644 --- a/lib/runtime/plugin.js +++ b/lib/runtime/plugin.js @@ -101,7 +101,7 @@ const createCustomHead = (originalHead, origin) => function customHead () { if (this.$isAMP) { if (!head.link.find(l => l.rel === 'canonical' || l.hid === 'canonical')) { const path = this.$isAMP && this.$ampMode !== 'only' - ? this.$route.fullPath.replace(/^\/amp(\/.*)?/, '$1') + ? this.$route.fullPath.replace(/^\/amp(\/.*)?/, '$1').replace('/m/','/') : this.$route.fullPath head.link.push({ @@ -124,10 +124,14 @@ const createCustomHead = (originalHead, origin) => function customHead () { if (this.$ampMode !== false && this.$isAMP === false) { if (!head.link.find(l => l.rel === 'amphtml' || l.hid === 'amphtml')) { const ampPrefix = this.$ampMode === 'only' ? '' : 'm/' + let ampUrl = origin + ampPrefix + this.$route.fullPath; + if (this.$route.meta.ampUrl) { + ampUrl = this.$route.fullPath.replace(this.$route.meta.ampUrl.originalPrefix, this.$route.meta.ampUrl.ampPrefix) + } head.link.push({ rel: 'amphtml', hid: 'amphtml', - href: origin + ampPrefix + this.$route.fullPath + href: ampUrl }) } } From 86c705674ef0df8a1e9f56f7553983e3f821b151 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 12 Nov 2021 16:55:53 +0200 Subject: [PATCH 07/16] delete charset --- lib/module.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/module.js b/lib/module.js index 6fe2460a..4c14f950 100644 --- a/lib/module.js +++ b/lib/module.js @@ -223,12 +223,12 @@ function ensureMeta () { } // Charset - if (!find(this.options.head.meta, 'charset')) { - this.options.head.meta.push({ - hid: 'charset', - charset: 'utf-8' - }) - } + // if (!find(this.options.head.meta, 'charset')) { + // this.options.head.meta.push({ + // hid: 'charset', + // charset: 'utf-8' + // }) + // } // Viewport if (!find(this.options.head.meta, 'name', 'viewport')) { From f8a902715efea315ab25ee90b11674e3856016c6 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 7 Dec 2021 16:52:35 +0200 Subject: [PATCH 08/16] add article-alias route --- lib/runtime/plugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/runtime/plugin.js b/lib/runtime/plugin.js index 48453286..9b755a41 100644 --- a/lib/runtime/plugin.js +++ b/lib/runtime/plugin.js @@ -125,7 +125,7 @@ const createCustomHead = (originalHead, origin) => function customHead () { if (!head.link.find(l => l.rel === 'amphtml' || l.hid === 'amphtml')) { const ampPrefix = this.$ampMode === 'only' ? '' : 'm/' let ampUrl = origin + ampPrefix + this.$route.fullPath; - if (this.$route.meta.ampUrl) { + if (this.$route.meta.ampUrl && this.route.name === 'article-alias') { ampUrl = this.$route.fullPath.replace(this.$route.meta.ampUrl.originalPrefix, this.$route.meta.ampUrl.ampPrefix) } head.link.push({ From f964752081863dbcef1967d5119ccc2d749090e9 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 7 Dec 2021 17:49:45 +0200 Subject: [PATCH 09/16] add article-alias route --- lib/runtime/plugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/runtime/plugin.js b/lib/runtime/plugin.js index 9b755a41..268dac61 100644 --- a/lib/runtime/plugin.js +++ b/lib/runtime/plugin.js @@ -125,7 +125,7 @@ const createCustomHead = (originalHead, origin) => function customHead () { if (!head.link.find(l => l.rel === 'amphtml' || l.hid === 'amphtml')) { const ampPrefix = this.$ampMode === 'only' ? '' : 'm/' let ampUrl = origin + ampPrefix + this.$route.fullPath; - if (this.$route.meta.ampUrl && this.route.name === 'article-alias') { + if (this.$route.meta.ampUrl && this.$route.name === 'article-alias') { ampUrl = this.$route.fullPath.replace(this.$route.meta.ampUrl.originalPrefix, this.$route.meta.ampUrl.ampPrefix) } head.link.push({ From 4e947de51575a3a32f8501508e603f477fc86ba1 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 7 Dec 2021 17:55:32 +0200 Subject: [PATCH 10/16] add article-alias route --- lib/runtime/plugin.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/runtime/plugin.js b/lib/runtime/plugin.js index 268dac61..f9a9193d 100644 --- a/lib/runtime/plugin.js +++ b/lib/runtime/plugin.js @@ -121,11 +121,11 @@ const createCustomHead = (originalHead, origin) => function customHead () { } // Add amphtml meta only if page has amp counterpart - if (this.$ampMode !== false && this.$isAMP === false) { + if (this.$ampMode !== false && this.$isAMP === false && this.$route.name === 'article-alias') { if (!head.link.find(l => l.rel === 'amphtml' || l.hid === 'amphtml')) { const ampPrefix = this.$ampMode === 'only' ? '' : 'm/' let ampUrl = origin + ampPrefix + this.$route.fullPath; - if (this.$route.meta.ampUrl && this.$route.name === 'article-alias') { + if (this.$route.meta.ampUrl) { ampUrl = this.$route.fullPath.replace(this.$route.meta.ampUrl.originalPrefix, this.$route.meta.ampUrl.ampPrefix) } head.link.push({ From 3a3c4a79c7b46497e8769474ff90635886b42902 Mon Sep 17 00:00:00 2001 From: fromkoss Date: Tue, 10 May 2022 15:03:34 +0200 Subject: [PATCH 11/16] added route based styles config --- templates/plugin.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/templates/plugin.js b/templates/plugin.js index 07c78ba4..3231b920 100644 --- a/templates/plugin.js +++ b/templates/plugin.js @@ -20,5 +20,13 @@ export default async function (ctx, inject) { const cssText = await import('!!raw-loader<%= options.cssLoader %>!<%= options.css %>').then(m => m.default || m) head.style.push({ cssText, type: 'text/css', hid: 'amp-custom' }) + <% if (options.routesCss) { %> + <% for (route in options.routesCss) { %> + if (ctx.route.name == '<%= route %>') { + const cssText = await import('!!raw-loader<%= options.cssLoader %>!<%= options.routesCss[route] %>').then(m => m.default || m) + head.style.push({ cssText, type: 'text/css', hid: 'amp-custom-<%= route %>' }) + } + <% } %> + <% } %> }<% } %> } From 40ef25d743fdab2dcf47c38a5a128a890718cb1c Mon Sep 17 00:00:00 2001 From: Alex Voloshenko Date: Wed, 8 Feb 2023 17:35:39 +0200 Subject: [PATCH 12/16] add text --- docs/api/amp-elements.md | 5 +++-- lib/tags.js | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/api/amp-elements.md b/docs/api/amp-elements.md index f3429992..3ed3548b 100644 --- a/docs/api/amp-elements.md +++ b/docs/api/amp-elements.md @@ -1,5 +1,5 @@ # AMP elements -`amp-module` automatically detect AMP elements inside page and inject required scripts. +`amp-module` automatically detect AMP elements inside page and inject required scripts. List of auto detected AMP elements: - [amp-3d-gltf](https://amp.dev/documentation/components/amp-3d-gltf) - [amp-3q-player](https://amp.dev/documentation/components/amp-3q-player) @@ -116,4 +116,5 @@ List of auto detected AMP elements: - [amp-web-push](https://amp.dev/documentation/components/amp-web-push) - [amp-wistia-player](https://amp.dev/documentation/components/amp-wistia-player) - [amp-yotpo](https://amp.dev/documentation/components/amp-yotpo) -- [amp-youtube](https://amp.dev/documentation/components/amp-youtube) \ No newline at end of file +- [amp-youtube](https://amp.dev/documentation/components/amp-youtube) +- [amp-truncate-text](https://amp.dev/documentation/components/amp-truncate-text) \ No newline at end of file diff --git a/lib/tags.js b/lib/tags.js index d752c760..58a9d979 100644 --- a/lib/tags.js +++ b/lib/tags.js @@ -121,7 +121,8 @@ function getTags (modifiers = {}) { 'amp-web-push': { version: '0.1' }, 'amp-wistia-player': { version: '0.1' }, 'amp-yotpo': { version: '0.1' }, - 'amp-youtube': { version: '0.1' } + 'amp-youtube': { version: '0.1' }, + 'amp-truncate-text': { version: '0.1' } } Object.keys(modifiers).forEach((tag) => { if (typeof tags[tag] === 'object') { From 36c6c3a62222dc056ee6a91155f53ec386154fa7 Mon Sep 17 00:00:00 2001 From: Alex Voloshenko Date: Wed, 28 Feb 2024 01:56:04 +0200 Subject: [PATCH 13/16] delete canonical --- lib/runtime/plugin.js | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/lib/runtime/plugin.js b/lib/runtime/plugin.js index f9a9193d..6771ae76 100644 --- a/lib/runtime/plugin.js +++ b/lib/runtime/plugin.js @@ -99,18 +99,6 @@ const createCustomHead = (originalHead, origin) => function customHead () { * Add canonical meta and AMP requirement if page is served as AMP */ if (this.$isAMP) { - if (!head.link.find(l => l.rel === 'canonical' || l.hid === 'canonical')) { - const path = this.$isAMP && this.$ampMode !== 'only' - ? this.$route.fullPath.replace(/^\/amp(\/.*)?/, '$1').replace('/m/','/') - : this.$route.fullPath - - head.link.push({ - rel: 'canonical', - hid: 'canonical', - href: origin + path - }) - } - ensureKey(head, 'htmlAttrs', {}) head.htmlAttrs.amp = vueMetaMajor >= 2 ? true : undefined From 27ffa64898904ca7f21482a80651f8817a61377f Mon Sep 17 00:00:00 2001 From: Alex Voloshenko Date: Wed, 28 Feb 2024 10:19:52 +0200 Subject: [PATCH 14/16] add --- testgithub | 27 +++++++++++++++++++++++++++ testgithub.pub | 1 + 2 files changed, 28 insertions(+) create mode 100644 testgithub create mode 100644 testgithub.pub diff --git a/testgithub b/testgithub new file mode 100644 index 00000000..cef2d3af --- /dev/null +++ b/testgithub @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEogIBAAKCAQEA8cHdyhhi/vktRVJfVQeCDAqN4iOPVc4yAa+6MkOqi0jihmMv +UjFx8KuaVJD9O5RCWC0Bo0EcCsepgIwSXvE5NJZ7YFmqxdURbu3WMKfy5ZOUj2Of +7guQ9rGH60vti5/N6Fp7VA2GRtjIBGJ9FvYWzWFaDax4cSbWE4I+Jgfaqs6vC+q8 +kf7oDACmJ3O1Osw45JSXSx2/M6KzcOhRdJdBcIS+mpKc21m/Rpsn8UOFd7XhGlNv +mn/Fnt3de5GxQNwkb/2E2uvONvLuMSuNB4FaSObAXivpz3X3JHz1KMahYtmBiPrP +rR+N5F3wJmK3dznXmnvlDnU2F1hZGjlPHfF0IwIDAQABAoH/A8cDsCSxZ0p9apfe +5XU4kveXP/FOTAjsvxn/zsk/4O1CnNbv5ljfbuM/hhK94jBu2PHbFLHvvjtgaqHF +p7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Ld2rJSo3zGm1w8JOhR8Qq+sSdL1Vc4wWCPDf +6S4Dx/T4fxJFWK99LeesC5gGKGKsgsTOKZWUOLp02rrlnP9o24Q= +-----END RSA PRIVATE KEY----- diff --git a/testgithub.pub b/testgithub.pub new file mode 100644 index 00000000..0ee90ab0 --- /dev/null +++ b/testgithub.pub @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDxwd3KGGL++S1FUl9VB4IMCo3iI49VzjIBr7oyQ6qLSOKGYy9SMXHwq5pUkP07lEJYLQGjQRwKx6mAjBJe8Tk0lntgWarF1RFu7dYwp/Llk5SPY5/uC5D2sYfrS+2Ln83oWntUDYZG2MgEYn0W9hbNYVoNrHhxJtYTgj4mB9qqzq8L6ryR/ugMAKYnc7U6zDjklJdLHb8zorNw6FF0l0FwhL6akpzbWb9GmyfxQ4V3teEaU2+af8We3d17kbFA3CRv/YTa68428u4xK40HgVpI5sBeK+nPdfckfPUoxqFi2YGI+s+tH43kXfAmYrd3Odeae+UOdTYXWFkaOU8d8XQj root@DESKTOP-EAC0QTI From e2c0de84c96e31645133d73c9a98c592ce85d5b9 Mon Sep 17 00:00:00 2001 From: Alex Voloshenko Date: Wed, 28 Feb 2024 10:20:34 +0200 Subject: [PATCH 15/16] add --- testgithub | 27 --------------------------- testgithub.pub | 1 - 2 files changed, 28 deletions(-) delete mode 100644 testgithub delete mode 100644 testgithub.pub diff --git a/testgithub b/testgithub deleted file mode 100644 index cef2d3af..00000000 --- a/testgithub +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEogIBAAKCAQEA8cHdyhhi/vktRVJfVQeCDAqN4iOPVc4yAa+6MkOqi0jihmMv -UjFx8KuaVJD9O5RCWC0Bo0EcCsepgIwSXvE5NJZ7YFmqxdURbu3WMKfy5ZOUj2Of -7guQ9rGH60vti5/N6Fp7VA2GRtjIBGJ9FvYWzWFaDax4cSbWE4I+Jgfaqs6vC+q8 -kf7oDACm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70e1ZuspaR+W9/ijnijwqIvkzhu0ReH -xrcF53J6bHULuUe2JWozzbRvA8IfJQwotoOYyCjyjC2hp5r271pTTAEhmJdRlEWn -zrcGK8ZRxe0cg4J0xYC8WFYmpTk3/z40dsxhlfm+5vYxIDjX2MktQwRgdduA++cJ -uLaNAoGASU2fJCQ0NrRg4EQQVMLWcrf4S+eYf8dnQ2LmhNKIr4DDYMtbdBHJXgK3 -R9FnONBzKsVdW5Otaqc+LO4MiRhOLd2rJSo3zGm1w8JOhR8Qq+sSdL1Vc4wWCPDf -6S4Dx/T4fxJFWK99LeesC5gGKGKsgsTOKZWUOLp02rrlnP9o24Q= ------END RSA PRIVATE KEY----- diff --git a/testgithub.pub b/testgithub.pub deleted file mode 100644 index 0ee90ab0..00000000 --- a/testgithub.pub +++ /dev/null @@ -1 +0,0 @@ -ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDxwd3KGGL++S1FUl9VB4IMCo3iI49VzjIBr7oyQ6qLSOKGYy9SMXHwq5pUkP07lEJYLQGjQRwKx6mAjBJe8Tk0lntgWarF1RFu7dYwp/Llk5SPY5/uC5D2sYfrS+2Ln83oWntUDYZG2MgEYn0W9hbNYVoNrHhxJtYTgj4mB9qqzq8L6ryR/ugMAKYnc7U6zDjklJdLHb8zorNw6FF0l0FwhL6akpzbWb9GmyfxQ4V3teEaU2+af8We3d17kbFA3CRv/YTa68428u4xK40HgVpI5sBeK+nPdfckfPUoxqFi2YGI+s+tH43kXfAmYrd3Odeae+UOdTYXWFkaOU8d8XQj root@DESKTOP-EAC0QTI From 21ef39142207279f184fe6bc3a542ead8b50897a Mon Sep 17 00:00:00 2001 From: Alex Voloshenko Date: Wed, 28 Feb 2024 11:02:42 +0200 Subject: [PATCH 16/16] canonical --- lib/runtime/plugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/runtime/plugin.js b/lib/runtime/plugin.js index 6771ae76..bedb4290 100644 --- a/lib/runtime/plugin.js +++ b/lib/runtime/plugin.js @@ -112,7 +112,7 @@ const createCustomHead = (originalHead, origin) => function customHead () { if (this.$ampMode !== false && this.$isAMP === false && this.$route.name === 'article-alias') { if (!head.link.find(l => l.rel === 'amphtml' || l.hid === 'amphtml')) { const ampPrefix = this.$ampMode === 'only' ? '' : 'm/' - let ampUrl = origin + ampPrefix + this.$route.fullPath; + let ampUrl = origin + ampPrefix + this.$route.fullPath if (this.$route.meta.ampUrl) { ampUrl = this.$route.fullPath.replace(this.$route.meta.ampUrl.originalPrefix, this.$route.meta.ampUrl.ampPrefix) }