Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into fix-html5
Browse files Browse the repository at this point in the history
  • Loading branch information
alidevjimmy committed Oct 24, 2024
2 parents bddf1a7 + 7bc6a85 commit 4c40da3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]{{<image "post-image.png">}}
![Post Image]{{<image "post-image.png">}}
```

You can specify the absolute image path like this:

```md
[Post Image]{{<image "/images/post-image.png">}}
![Post Image]{{<image "/images/post-image.png">}}
```

### Other Assets
#### Other Assets

Other assets, like PDF files, can be linked similarly:

Expand Down
3 changes: 1 addition & 2 deletions content/download.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +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:

<pre>
curl --proto '=https' --tlsv1.2 -sSL https://github.com/pactus-project/pactus/releases/download/
<span class="latest-version">---</span>/pactus_downloader.sh | sh
curl --proto '=https' --tlsv1.2 -sSL <span class="release-tag-link">---</span>/pactus_downloader.sh | sh
</pre>

---
Expand Down
2 changes: 1 addition & 1 deletion hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
6 changes: 3 additions & 3 deletions layouts/shortcodes/download_links.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ <h3>CLI releases</h3>
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) || {};
Expand Down Expand Up @@ -182,9 +182,9 @@ <h3>CLI releases</h3>
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");
Expand Down

0 comments on commit 4c40da3

Please sign in to comment.