Skip to content

Commit 4e2acf6

Browse files
committed
setup wrapped-ether page in new repo structure
1 parent f965106 commit 4e2acf6

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

public/content/wrapped-ether.md renamed to public/content/wrapped-ether/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
---
22
title: Wrapped Ether (WETH)
33
description: An introduction to Wrapped Ether (WETH)—an ERC20-compatible version of Ether (ETH).
4+
lang: en
45
---
5-
---
6+
67
# What Is Wrapped Ether (WETH)? {#what-is-wrapped-ether-weth}
78
Wrapped Ether (WETH) is an ERC-20 token representing Ethereum’s native Ether (ETH) coin. As a native cryptocurrency, the use of ETH is limited to transferring value and paying for computation on the Ethereum network. Using ETH in dapps is technically difficult because of its limitations.
89

src/lib/utils/gh.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,16 @@ const getGitLogFromPath = (path: string): string => {
1313

1414
const extractDateFromGitLogInfo = (logInfo: string): string => {
1515
// Filter commit date in log and return date using ISOString format (same that GH API uses)
16-
const lastCommitDate = logInfo
16+
try {
17+
const lastCommitDate = logInfo
1718
.split("\n")
1819
.filter((x) => x.startsWith("Date: "))[0]
1920
.slice("Date:".length)
2021
.trim()
2122
return new Date(lastCommitDate).toISOString()
23+
} catch {
24+
return new Date().toISOString()
25+
}
2226
}
2327

2428
// This util filters the git log to get the file last commit info, and then the commit date (last update)

src/lib/utils/md.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ const getPostSlugs = (dir: string, files: string[] = []) => {
264264
"/terms-of-use",
265265
"/web3",
266266
"/whitepaper",
267+
"/wrapped-ether",
267268
"/zero-knowledge-proofs",
268269
]
269270

0 commit comments

Comments
 (0)