@quintype/framework 7.7.0 → 7.7.2-rss-hotfix.0
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 +2 -0
- package/package.json +1 -1
- package/server/amp/handlers/story-page.js +2 -3
- package/server/routes.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
|
+
### [7.7.1](https://github.com/quintype/quintype-node-framework/compare/v7.7.0...v7.7.1) (2022-07-06)
|
|
6
|
+
|
|
5
7
|
## [7.7.0](https://github.com/quintype/quintype-node-framework/compare/v7.4.1...v7.7.0) (2022-07-05)
|
|
6
8
|
|
|
7
9
|
|
package/package.json
CHANGED
|
@@ -34,22 +34,21 @@ async function ampStoryPageHandler(
|
|
|
34
34
|
ampLibrary = require("@quintype/amp"),
|
|
35
35
|
additionalConfig = require("../../publisher-config"),
|
|
36
36
|
InfiniteScrollAmp = require("../helpers/infinite-scroll"),
|
|
37
|
+
isVisualStory = false,
|
|
37
38
|
...rest
|
|
38
39
|
}
|
|
39
40
|
) {
|
|
40
41
|
try {
|
|
41
42
|
const opts = cloneDeep(rest);
|
|
42
|
-
|
|
43
43
|
const redirectUrls = opts && opts.redirectUrls;
|
|
44
44
|
const getEnableAmp = get(opts, ["enableAmp"], true);
|
|
45
|
-
|
|
46
45
|
const enableAmp = typeof getEnableAmp === "function" ? opts.enableAmp(config) : getEnableAmp;
|
|
47
46
|
|
|
48
47
|
if (typeof redirectUrls === "function" || (redirectUrls && Object.keys(redirectUrls).length > 0)) {
|
|
49
48
|
await getRedirectUrl(req, res, next, { redirectUrls, config });
|
|
50
49
|
}
|
|
51
50
|
|
|
52
|
-
if (!enableAmp) {
|
|
51
|
+
if (!isVisualStory && !enableAmp) {
|
|
53
52
|
return res.redirect(301, `/${req.params[0]}`);
|
|
54
53
|
}
|
|
55
54
|
|
package/server/routes.js
CHANGED
|
@@ -96,6 +96,7 @@ exports.upstreamQuintypeRoutes = function upstreamQuintypeRoutes(
|
|
|
96
96
|
"/stories.rss",
|
|
97
97
|
"/api/v1/collections/:slug.rss",
|
|
98
98
|
"/api/v1/advanced-search",
|
|
99
|
+
"/api/instant-articles.rss",
|
|
99
100
|
];
|
|
100
101
|
|
|
101
102
|
app.all("/api/*", sketchesProxy);
|
|
@@ -630,5 +631,5 @@ exports.ampRoutes = (app, opts = {}) => {
|
|
|
630
631
|
getWithConfig(app, "/amp/story/*", ampStoryPageHandler, opts);
|
|
631
632
|
getWithConfig(app, "/amp/api/v1/amp-infinite-scroll", storyPageInfiniteScrollHandler, opts);
|
|
632
633
|
getWithConfig(app, "/amp/api/v1/bookend.json", bookendHandler, opts);
|
|
633
|
-
getWithConfig(app, "/ampstories/*", ampStoryPageHandler, opts);
|
|
634
|
+
getWithConfig(app, "/ampstories/*", ampStoryPageHandler, { ...opts, isVisualStory: true });
|
|
634
635
|
};
|