@mjhls/mjh-framework 1.0.1028 → 1.0.1029-nofollow-test-v2
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/dist/cjs/View.js +21 -1
- package/dist/esm/View.js +21 -1
- package/package.json +1 -1
package/dist/cjs/View.js
CHANGED
|
@@ -2491,6 +2491,10 @@ var View = function View(props) {
|
|
|
2491
2491
|
metaDescriptionSanity ? React__default["default"].createElement('meta', { name: 'description', key: 'description', content: metaDescriptionSanity }) : meta_description && React__default["default"].createElement('meta', { name: 'description', key: 'description', content: meta_description }),
|
|
2492
2492
|
React__default["default"].createElement('meta', { name: 'keywords', content: getKeywords(article).join(','), key: 'keywords' }),
|
|
2493
2493
|
passwordLock && React__default["default"].createElement('meta', { name: 'robots', content: 'noindex, nofollow' }),
|
|
2494
|
+
!passwordLock && (article.applyNoIndexTag || article.applyNoFollowTag) && React__default["default"].createElement('meta', {
|
|
2495
|
+
name: 'robots',
|
|
2496
|
+
content: article.applyNoIndexTag && article.applyNoFollowTag ? 'noindex, nofollow' : article.applyNoIndexTag && !article.applyNoFollowTag ? 'noindex' : 'nofollow'
|
|
2497
|
+
}),
|
|
2494
2498
|
React__default["default"].createElement('meta', {
|
|
2495
2499
|
property: 'og:url',
|
|
2496
2500
|
content: seriesShareOptions && seriesShareOptions.seriesUrl ? shareOptions.shareUrl + seriesShareOptions.seriesUrl : shareOptions.shareUrl,
|
|
@@ -2533,7 +2537,16 @@ var View = function View(props) {
|
|
|
2533
2537
|
props.article.seriesDetail && props.article.seriesDetail.nextUrl && React__default["default"].createElement('link', { rel: 'next', href: props.article.seriesDetail.nextUrl })
|
|
2534
2538
|
)
|
|
2535
2539
|
),
|
|
2536
|
-
!needInfiniteScroll ? React__default["default"].createElement(Article, _extends._extends({
|
|
2540
|
+
!needInfiniteScroll ? React__default["default"].createElement(Article, _extends._extends({
|
|
2541
|
+
infiniteScroll: false,
|
|
2542
|
+
showRelatedArticles: showRelatedArticles,
|
|
2543
|
+
showDisqus: showDisqus,
|
|
2544
|
+
emailList: emailList,
|
|
2545
|
+
articleRecs: articleRecs
|
|
2546
|
+
}, props, {
|
|
2547
|
+
showIssueNameOnly: article.issueGroup && article.issueGroup.parent ? article.issueGroup.parent.showIssueNameOnly : null,
|
|
2548
|
+
showPageNumber: article.issueGroup && article.issueGroup.parent ? article.issueGroup.parent.showPageNumber : null
|
|
2549
|
+
})) : React__default["default"].createElement(ArticleQueue, _extends._extends({
|
|
2537
2550
|
infiniteScroll: true,
|
|
2538
2551
|
showRelatedArticles: showRelatedArticles,
|
|
2539
2552
|
canonicalTag: canonicalTag,
|
|
@@ -2636,6 +2649,7 @@ View.returnGetInitialProps = function () {
|
|
|
2636
2649
|
});
|
|
2637
2650
|
}
|
|
2638
2651
|
sponsoredFlag = false;
|
|
2652
|
+
|
|
2639
2653
|
// check for disableAds flag on each taxonomoy
|
|
2640
2654
|
|
|
2641
2655
|
if (article && article.content_placement) {
|
|
@@ -2643,6 +2657,12 @@ View.returnGetInitialProps = function () {
|
|
|
2643
2657
|
if (x.disableAds) {
|
|
2644
2658
|
sponsoredFlag = true;
|
|
2645
2659
|
}
|
|
2660
|
+
if (x.applyNoIndexTag) {
|
|
2661
|
+
article.applyNoIndexTag = true;
|
|
2662
|
+
}
|
|
2663
|
+
if (x.applyNoFollowTag) {
|
|
2664
|
+
article.applyNoFollowTag = true;
|
|
2665
|
+
}
|
|
2646
2666
|
});
|
|
2647
2667
|
}
|
|
2648
2668
|
// check for disableAds flag on content category
|
package/dist/esm/View.js
CHANGED
|
@@ -2481,6 +2481,10 @@ var View = function View(props) {
|
|
|
2481
2481
|
metaDescriptionSanity ? React__default.createElement('meta', { name: 'description', key: 'description', content: metaDescriptionSanity }) : meta_description && React__default.createElement('meta', { name: 'description', key: 'description', content: meta_description }),
|
|
2482
2482
|
React__default.createElement('meta', { name: 'keywords', content: getKeywords(article).join(','), key: 'keywords' }),
|
|
2483
2483
|
passwordLock && React__default.createElement('meta', { name: 'robots', content: 'noindex, nofollow' }),
|
|
2484
|
+
!passwordLock && (article.applyNoIndexTag || article.applyNoFollowTag) && React__default.createElement('meta', {
|
|
2485
|
+
name: 'robots',
|
|
2486
|
+
content: article.applyNoIndexTag && article.applyNoFollowTag ? 'noindex, nofollow' : article.applyNoIndexTag && !article.applyNoFollowTag ? 'noindex' : 'nofollow'
|
|
2487
|
+
}),
|
|
2484
2488
|
React__default.createElement('meta', {
|
|
2485
2489
|
property: 'og:url',
|
|
2486
2490
|
content: seriesShareOptions && seriesShareOptions.seriesUrl ? shareOptions.shareUrl + seriesShareOptions.seriesUrl : shareOptions.shareUrl,
|
|
@@ -2523,7 +2527,16 @@ var View = function View(props) {
|
|
|
2523
2527
|
props.article.seriesDetail && props.article.seriesDetail.nextUrl && React__default.createElement('link', { rel: 'next', href: props.article.seriesDetail.nextUrl })
|
|
2524
2528
|
)
|
|
2525
2529
|
),
|
|
2526
|
-
!needInfiniteScroll ? React__default.createElement(Article, _extends({
|
|
2530
|
+
!needInfiniteScroll ? React__default.createElement(Article, _extends({
|
|
2531
|
+
infiniteScroll: false,
|
|
2532
|
+
showRelatedArticles: showRelatedArticles,
|
|
2533
|
+
showDisqus: showDisqus,
|
|
2534
|
+
emailList: emailList,
|
|
2535
|
+
articleRecs: articleRecs
|
|
2536
|
+
}, props, {
|
|
2537
|
+
showIssueNameOnly: article.issueGroup && article.issueGroup.parent ? article.issueGroup.parent.showIssueNameOnly : null,
|
|
2538
|
+
showPageNumber: article.issueGroup && article.issueGroup.parent ? article.issueGroup.parent.showPageNumber : null
|
|
2539
|
+
})) : React__default.createElement(ArticleQueue, _extends({
|
|
2527
2540
|
infiniteScroll: true,
|
|
2528
2541
|
showRelatedArticles: showRelatedArticles,
|
|
2529
2542
|
canonicalTag: canonicalTag,
|
|
@@ -2626,6 +2639,7 @@ View.returnGetInitialProps = function () {
|
|
|
2626
2639
|
});
|
|
2627
2640
|
}
|
|
2628
2641
|
sponsoredFlag = false;
|
|
2642
|
+
|
|
2629
2643
|
// check for disableAds flag on each taxonomoy
|
|
2630
2644
|
|
|
2631
2645
|
if (article && article.content_placement) {
|
|
@@ -2633,6 +2647,12 @@ View.returnGetInitialProps = function () {
|
|
|
2633
2647
|
if (x.disableAds) {
|
|
2634
2648
|
sponsoredFlag = true;
|
|
2635
2649
|
}
|
|
2650
|
+
if (x.applyNoIndexTag) {
|
|
2651
|
+
article.applyNoIndexTag = true;
|
|
2652
|
+
}
|
|
2653
|
+
if (x.applyNoFollowTag) {
|
|
2654
|
+
article.applyNoFollowTag = true;
|
|
2655
|
+
}
|
|
2636
2656
|
});
|
|
2637
2657
|
}
|
|
2638
2658
|
// check for disableAds flag on content category
|