Skip to content

Commit

Permalink
Update README and release images (#48)
Browse files Browse the repository at this point in the history
* update release images path

* update readme
  • Loading branch information
b00f authored Oct 21, 2024
1 parent 2296280 commit 5b6a458
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 134 deletions.
115 changes: 42 additions & 73 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ hugo server

Follow these guidelines to ensure high-quality contributions to the Pactus website project.

### Creating a new blog post
### New Blog Post

For creating new blog post run:
To create a new blog post, run:

```bash
hugo new content --kind blog blog/your-post-name.md
Expand All @@ -43,98 +43,48 @@ This command will create a new markdown file in the `content/blog` directory wit

```markdown
+++
title = ''
description = ''
author = ''
date = 2022-08-29T00:00:00+00:00
tags = ['']
image = "pic.jpg"
title = "Title goes here"
description = "Description goes here (Optional)"
author = "Your Name"
date = 2024-10-20T16:39:03+08:00
tags = [""]
image = "post-image.png"
+++
```

- **Note that description field is optional**
### Blog Assets

- **Note that for image only use the image name, the image should be in the `/assets/blog/{post-filename}/pic.jpg` directory**
All blog post assets, including images, should be kept inside the `/assets/blog/<post-filename>/` folder.
The blog post file name and the directory you create for its assets should have the same name.

### Blog assets
#### Images

create a directory in `/assets/blog/{post-filename}/` and put all the images in that directory.
For optimizing images in markdown files, use the image [shortcode](https://gohugo.io/content-management/shortcodes/):

**IMPORTANT:** Your blog post file name and the directory you create for its asssets should have the same name

### Static assets

For adding static assets, you can use the `/assets/blog/post-filename/image.png` directory.

### Image

For optimizing images in markdown files use image shortcode: \
`{{<image "image.png">}}`

Also you can specify full image url like: \
`{{<image "/images/image.png">}}`

example use:

`![link]({{<asset "asset.pdf">}})`



### asset url

`{{<asset "asset.pdf">}}`

example use:

`[link]({{<asset "asset.pdf">}})`

### Style change

For changing style in `assets/css/main.css` and running website concurrently run:

```bash
npm run start
```

### Additional commands

There are some additional commands that help you to check and improve your changes.
First you need Install [yarn](https://yarnpkg.com/).

- Check all HTML and markdown files:

```bash
yarn run prettier::setup
yarn run prettier
```md
[Post Image]{{<image "post-image.png">}}
```

- Lint markdown files:
You can specify the absolute image path like this:

```bash
yarn run lint:md:setup
yarn run lint:md
```md
[Post Image]{{<image "/images/post-image.png">}}
```

- Lint YAML files:
### Other Assets

```bash
yarn run lint:yml:setup
yarn run lint:yml
```
Other assets, like PDF files, can be linked similarly:

- Check for broken links:

```bash
yarn run htmlproofer:setup
yarn run htmlproofer
```md
[Post Doc]{{<asset "post-doc.pdf">}}
```

## Markdown

Markdown is a lightweight markup language that uses plain text formatting syntax to convert text into HTML,
making it easy to read and write for web content.

### Linting
#### Linting

Markdown linting helps ensure consistent style and formatting, detects syntax errors, improves readability,
and maintains best practices in Markdown documents.
Expand All @@ -157,6 +107,25 @@ mdl --style=.mdlrc.rb ./content

This command will check all documents in the `content` folder for any linting issues and output them in the terminal.

## Additional Commands

There are some additional commands to check and improve the changes.
Below are some useful commands:

| Command | Task |
| ---------------------------- | ---------------------------------------------------------------------------------- |
| `yarn run start` | Start the website locally and watch for css changes |
| `yarn run build` | Build the website locally |
| `yarn run prettier:setup` | Set up [Prettier](https://prettier.io/) |
| `yarn run prettier` | Check all HTML and Markdown files using Prettier |
| `yarn run lint:md:setup` | Set up Markdown linting |
| `yarn run lint:md` | Lint Markdown files |
| `yarn run lint:yml:setup` | Set up YAML linting |
| `yarn run lint:yml` | Lint YAML files |
| `yarn run htmlproofer:setup` | Set up [html-proofer](https://github.com/gjtorikian/html-proofer) for link checker |
| `yarn run htmlproofer` | Check for broken links using html-proofer |
| `yarn run exif` | Remove Meta Information from images using [ExifTool](https://exiftool.org/) |

## Deployment

Updating the main branch will automatically deploy this repository through
Expand Down
2 changes: 1 addition & 1 deletion archetypes/blog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ description = "Description goes here (Optional)"
author = "Your Name"
date = {{ .Date }}
tags = [""]
image = "post-picture.png"
image = "post-image.png"
+++
72 changes: 12 additions & 60 deletions hugo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
baseURL = 'https://pactus.org'
title = 'Pactus blockchain'
baseURL = "https://pactus.org"
title = "Pactus blockchain"
relativeURLs = true
canonifyURLs = true

Expand All @@ -9,66 +9,18 @@ canonifyURLs = true
[params]
latestVersion = "1.4.0"
mainCSS = "css/main.css"
subtitle = 'Building decentralized future together!'
subtitle = "Building decentralized future together!"
[params.contact]
email = '[email protected]'
email = "[email protected]"

[markup]
[markup.goldmark]
duplicateResourceFiles = false
[markup.goldmark.extensions]
definitionList = true
footnote = true
linkify = true
linkifyProtocol = 'https'
strikethrough = true
table = true
taskList = true
[markup.goldmark.extensions.cjk]
eastAsianLineBreaks = false
eastAsianLineBreaksStyle = 'simple'
enable = false
escapedSpace = false
[markup.goldmark.extensions.extras]
[markup.goldmark.extensions.extras.delete]
enable = false
[markup.goldmark.extensions.extras.insert]
enable = false
[markup.goldmark.extensions.extras.mark]
enable = false
[markup.goldmark.extensions.extras.subscript]
enable = false
[markup.goldmark.extensions.extras.superscript]
enable = false
[markup.goldmark.extensions.passthrough]
enable = true
[markup.goldmark.extensions.passthrough.delimiters]
block = [['\[', '\]'], ['$$', '$$']]
inline = [['\(', '\)'], ['$', '$']]
[markup.goldmark.extensions.typographer]
apostrophe = '&rsquo;'
disable = false
ellipsis = '&hellip;'
emDash = '&mdash;'
enDash = '&ndash;'
leftAngleQuote = '&laquo;'
leftDoubleQuote = '&ldquo;'
leftSingleQuote = '&lsquo;'
rightAngleQuote = '&raquo;'
rightDoubleQuote = '&rdquo;'
rightSingleQuote = '&rsquo;'
[markup.goldmark.parser]
autoHeadingID = true
autoHeadingIDType = 'github'
wrapStandAloneImageWithinParagraph = true
[markup.goldmark.parser.attribute]
block = false
title = true
[markup.goldmark.renderHooks]
[markup.goldmark.renderHooks.image]
enableDefault = false
[markup.goldmark.renderHooks.link]
enableDefault = false
block = [["[", "]"], ["$$", "$$"]]
inline = [["(", ")"], ["$", "$"]]
[markup.goldmark.renderer]
hardWraps = false
unsafe = true
Expand All @@ -77,11 +29,11 @@ canonifyURLs = true
[imaging.exif]
disableDate = false
disableLatLong = false
excludeFields = ''
includeFields = ''
excludeFields = ""
includeFields = ""

[outputs]
home = ['html', 'rss']
section = ['html', 'rss']
taxonomy = ['html']
term = ['html']
home = ["html", "rss"]
section = ["html", "rss"]
taxonomy = ["html"]
term = ["html"]

0 comments on commit 5b6a458

Please sign in to comment.