Skip to content

Commit d2f7d5e

Browse files
author
Teo
authored
Issue#8 update the blog link and preview to the new blog (#754)
* Issue#8: Adapt Content Security Policy to allow blogger.googleusercontent.com * Issue#8: Update the hardcoded Blog URL's * Issue#8: Add new api util to get the new blog data * Issue#8: Update and rename Post to LearnPost for learn util api util to handle the existing Post * Issue#8: Update Post to handle the new blog Post API * Issue#8: Update the hardcoded Blog URL * Issue#8: Add new API to handle the new blog data * Issue#8 Update hardcoded post URL * Issue#8 Update build env to Node 18 + PNPM 8.10.0 to match local development * Issue#8 Update build env to AWS notdejs18 and Node version 18 and PNPM 8.10.0 to match local development * Issue#8 Improve to defensive getStaticProps * Issue#8 add cross-fetch for Blogspot API compatibility * revert cross-fetch install * Issue#8 add fetch availability log in getBlogspotPosts * Debug: add Netlify debug logs and bypass fetch * Debug: disable ISR on Netlify + harden Blogspot mapper * Debug: Moved Content-Security-Policy to via netlify.toml * Debug: revert CSP to next.config * Debug: add sha256 hash to allow inline bootstrap script * Issue#8 use bracket access for media$thumbnail and de-dupe types * revert all changes * Issue#8 use static bg image * Issue#8 add static bg image
1 parent fbce4ce commit d2f7d5e

28 files changed

Lines changed: 215 additions & 86 deletions

File tree

cypress/deprecated/layout/header.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ context("<Header/> on desktop", () => {
3131
.should("have.attr", "href", "/downloads");
3232
cy.get('[data-testid="Desktop.HeaderLink.DFCBlog"]')
3333
.should("be.visible")
34-
.should("have.attr", "href", "https://blog.defichain.com/");
34+
.should("have.attr", "href", "https://defichainblog.blogspot.com/");
3535
cy.get('[data-testid="Desktop.HeaderLink.DeFiScan"]')
3636
.should("be.visible")
3737
.should("have.attr", "href", "https://defiscan.live/");
@@ -85,7 +85,7 @@ context("<Header/> on mobile", () => {
8585
.should("have.attr", "href", "/ecosystem");
8686
cy.get('[data-testid="Mobile.HeaderLink.DFCBlog"]')
8787
.should("be.visible")
88-
.should("have.attr", "href", "https://blog.defichain.com/");
88+
.should("have.attr", "href", "https://defichainblog.blogspot.com/");
8989
cy.get('[data-testid="Mobile.HeaderLink.DeFiScan"]')
9090
.should("be.visible")
9191
.should("have.attr", "href", "https://defiscan.live/");

cypress/e2e/explore/dfi.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ viewports.forEach((viewport) => {
248248
);
249249
cy.checkElementVisibilityAndHref(
250250
"explore-dmc-button-erc-20-learn-more",
251-
"https://blog.defichain.com/defichains-first-move-to-become",
251+
"https://defichainblog.blogspot.com/defichains-first-move-to-become",
252252
);
253253
cy.checkElementVisibilityAndHref(
254254
"link-button-view-contract",

cypress/e2e/homepage.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ viewports.forEach((viewport) => {
142142
cy.findByTestId("secondary-button-view-all-articles")
143143
.should("be.visible")
144144
.and("have.attr", "href")
145-
.and("include", "https://blog.defichain.com");
145+
.and("include", "https://defichainblog.blogspot.com");
146146
cy.findByTestId("secondary-button-view-all-articles")
147147
.should("have.attr", "target")
148148
.and("include", "_blank");
@@ -209,7 +209,7 @@ viewports.forEach((viewport) => {
209209
cy.findAllByTestId("blog-post-container-link")
210210
.should("be.visible")
211211
.and("have.attr", "href")
212-
.and("include", "https://blog.defichain.com/");
212+
.and("include", "https://defichainblog.blogspot.com/");
213213
});
214214

215215
// No TC

cypress/fixture/homepage.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ export const resourcesLinks = [
4141
},
4242
{
4343
footerTestid: "DeFiChain Blog",
44-
link: "https://blog.defichain.com/",
44+
link: "https://defichainblog.blogspot.com/",
4545
},
4646
];
4747

4848
export const communityLinks = [
4949
{
5050
headerId: "dfi-blog",
51-
href: "https://blog.defichain.com/",
51+
href: "https://defichainblog.blogspot.com/",
5252
},
5353
{
5454
headerId: "reddit",

netlify.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
command = "pnpm run build"
33
publish = ".next"
44

5+
[build.environment]
6+
NODE_VERSION = "18"
7+
PNPM_VERSION = "8.10.0"
8+
AWS_LAMBDA_JS_RUNTIME = "nodejs18.x"
9+
510
[[plugins]]
611
package = "@netlify/plugin-lighthouse"
712

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,4 @@
6161
"pnpm": ">=8.10.0"
6262
},
6363
"packageManager": "pnpm@8.10.0"
64-
}
64+
}

pnpm-lock.yaml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
36.9 KB
Loading

public/locales/de/layout.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"buy": "Erwerb von",
1111
"getDfi": "DFI erwerben",
1212
"dfcblog": "Blog",
13-
"bloglink": "https://blog.defichain.com/de/",
13+
"bloglink": "https://defichainblog.blogspot.com/",
1414
"explore": "Erkunden",
1515
"build": "Bauen",
1616
"community": "Community"
@@ -103,7 +103,7 @@
103103
"title": "Reddit"
104104
},
105105
{
106-
"title": "X (formerly Twitter)"
106+
"title": "X (formerly Twitter)"
107107
},
108108
{
109109
"title": "GitHub"

public/locales/de/page-index.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"desc": "Zugang zu dezentralen Vermögenswerten mit Sicherheiten in deinem Vault",
5151
"buttonText": "Mehr erfahren",
5252
"buttonType": "full",
53-
"url": "https://blog.defichain.com/what-are-decentralised-stock-tokens-and-how-do-they-work/"
53+
"url": "https://defichainblog.blogspot.com/2021/11/what-are-decentralized-assets-and-how.html/"
5454
},
5555
{
5656
"label": "AKTUELLER DOWNLOAD",
@@ -66,7 +66,7 @@
6666
"desc": "Erfahre mehr über den $DFI-Coin und erwirb ihn an verschiedenen Krypto-Börsen",
6767
"buttonText": "Mehr erfahren",
6868
"buttonType": "outline",
69-
"url": "https://blog.defichain.com/where-and-how-to-buy-dfi-defichain/"
69+
"url": "https://defichainblog.blogspot.com/2020/11/where-and-how-to-buy-dfi-defichain.html/"
7070
},
7171
{
7272
"label": "ÖKOSYSTEM",

0 commit comments

Comments
 (0)