@quintype/seo 1.44.0 → 1.44.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/index.cjs.js +2 -1
- package/package.json +1 -1
- package/src/amp-tags.js +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.44.1](https://github.com/quintype/quintype-node-seo/compare/v1.44.0...v1.44.1) (2024-01-04)
|
|
6
|
+
|
|
5
7
|
## [1.44.0](https://github.com/quintype/quintype-node-seo/compare/v1.43.0...v1.44.0) (2024-01-04)
|
|
6
8
|
|
|
7
9
|
## [1.43.0-disable-amp-story.1](https://github.com/quintype/quintype-node-seo/compare/v1.43.0-disable-amp-story.0...v1.43.0-disable-amp-story.1) (2023-11-22)
|
|
@@ -13,6 +15,8 @@ All notable changes to this project will be documented in this file. See [standa
|
|
|
13
15
|
|
|
14
16
|
* disable amp for a particular story ([6b5a76d](https://github.com/quintype/quintype-node-seo/commit/6b5a76da754bf2cbabd9a8d0787095366bf18609))
|
|
15
17
|
|
|
18
|
+
## [1.43.0](https://github.com/quintype/quintype-node-seo/compare/v1.43.0-config-amp-story-path.1...v1.43.0) (2023-12-01)
|
|
19
|
+
|
|
16
20
|
### [1.42.2](https://github.com/quintype/quintype-node-seo/compare/v1.42.1...v1.42.2) (2023-07-06)
|
|
17
21
|
|
|
18
22
|
|
package/dist/index.cjs.js
CHANGED
|
@@ -105,7 +105,8 @@ function StoryAmpTags(seoConfig, config, pageType, data = {}, opts) {
|
|
|
105
105
|
// TODO: Remove this condition and always make absolute URL if that's better for AMP discoverability.
|
|
106
106
|
const ampUrlAppend = seoConfig.appendHostToAmpUrl ? getDomain(currentHostUrl, domainSlug) || config["sketches-host"] : "";
|
|
107
107
|
const storySlug = seoConfig.decodeAmpUrl ? decodeURIComponent(story.slug) : encodeURIComponent(story.slug);
|
|
108
|
-
const
|
|
108
|
+
const { ampPageBasePath = "/amp/story" } = seoConfig;
|
|
109
|
+
const ampUrl = story["story-template"] === "visual-story" ? `${ampUrlAppend}/${storySlug}` : `${ampUrlAppend}${ampPageBasePath}/${storySlug}`;
|
|
109
110
|
const ignoreStoryTemplate = templatesToIgnore.includes(story["story-template"]);
|
|
110
111
|
if (showAmpTag(seoConfig, pageType, story) && !ignoreStoryTemplate) {
|
|
111
112
|
return [{
|
package/package.json
CHANGED
package/src/amp-tags.js
CHANGED
|
@@ -51,10 +51,11 @@ export function StoryAmpTags(seoConfig, config, pageType, data = {}, opts) {
|
|
|
51
51
|
? getDomain(currentHostUrl, domainSlug) || config["sketches-host"]
|
|
52
52
|
: "";
|
|
53
53
|
const storySlug = seoConfig.decodeAmpUrl ? decodeURIComponent(story.slug) : encodeURIComponent(story.slug);
|
|
54
|
+
const { ampPageBasePath = "/amp/story" } = seoConfig;
|
|
54
55
|
const ampUrl =
|
|
55
56
|
story["story-template"] === "visual-story"
|
|
56
57
|
? `${ampUrlAppend}/${storySlug}`
|
|
57
|
-
: `${ampUrlAppend}
|
|
58
|
+
: `${ampUrlAppend}${ampPageBasePath}/${storySlug}`;
|
|
58
59
|
const ignoreStoryTemplate = templatesToIgnore.includes(story["story-template"]);
|
|
59
60
|
if (showAmpTag(seoConfig, pageType, story) && !ignoreStoryTemplate) {
|
|
60
61
|
return [
|