From fc8940dd71d438a0a876f1566a841d466921cc53 Mon Sep 17 00:00:00 2001 From: b00f Date: Mon, 21 Oct 2024 14:28:58 +0800 Subject: [PATCH 1/2] update readme (#50) --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 01bdcf6..01d9bda 100644 --- a/README.md +++ b/README.md @@ -62,16 +62,16 @@ The blog post file name and the directory you create for its assets should have For optimizing images in markdown files, use the image [shortcode](https://gohugo.io/content-management/shortcodes/): ```md -[Post Image]{{}} +![Post Image]{{}} ``` You can specify the absolute image path like this: ```md -[Post Image]{{}} +![Post Image]{{}} ``` -### Other Assets +#### Other Assets Other assets, like PDF files, can be linked similarly: From 7bc6a85cfa8c09cc84cc72ae2070ebfb69b8a680 Mon Sep 17 00:00:00 2001 From: Ali Hamrani Date: Thu, 24 Oct 2024 20:16:26 +0330 Subject: [PATCH 2/2] Get release version from config (#54) * get download page release tag from config and fix md lint * change class name according to functionality --- content/download.md | 2 +- hugo.toml | 2 +- layouts/shortcodes/download_links.html | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/content/download.md b/content/download.md index c7d74fa..352307b 100644 --- a/content/download.md +++ b/content/download.md @@ -40,7 +40,7 @@ This script can download the archived file, verify it, and extract it for you. To use it, simply run the following command in your terminal:
-curl --proto '=https' --tlsv1.2 -sSL https://github.com/pactus-project/pactus/releases/download/---/pactus_downloader.sh | sh
+curl --proto '=https' --tlsv1.2 -sSL ---/pactus_downloader.sh | sh
 
--- diff --git a/hugo.toml b/hugo.toml index c648685..50a6fb3 100644 --- a/hugo.toml +++ b/hugo.toml @@ -7,7 +7,7 @@ canonifyURLs = true blog = "/:year/:month/:day/:title/" [params] - latestVersion = "1.4.0" + releaseTag = "v1.5.0" mainCSS = "css/main.css" subtitle = "Building decentralized future together!" [params.contact] diff --git a/layouts/shortcodes/download_links.html b/layouts/shortcodes/download_links.html index 96c3d7c..aa0debe 100644 --- a/layouts/shortcodes/download_links.html +++ b/layouts/shortcodes/download_links.html @@ -72,7 +72,7 @@

CLI releases

async function fetchLatestRelease() { let cachedRelease = localStorage.getItem("latestRelease"); const response = await fetch( - "https://api.github.com/repos/pactus-project/pactus/releases/latest", + "https://api.github.com/repos/pactus-project/pactus/releases/tags/{{.Site.Params.releaseTag}}", ); if (!response.ok) { return JSON.parse(cachedRelease) || {}; @@ -182,9 +182,9 @@

CLI releases

const release = await fetchLatestRelease(); const latestVersionElements = - document.getElementsByClassName("latest-version"); + document.getElementsByClassName("release-tag-link"); for (let i = 0; i < latestVersionElements.length; i++) { - latestVersionElements[i].innerHTML = release.tag_name; + latestVersionElements[i].innerHTML = `https://github.com/pactus-project/pactus/releases/download/${release.tag_name}`; } const cliTable = createTable(release.assets, "cli");