HugoBlox / hugo-blox-builder

🚨 GROW YOUR AUDIENCE WITH HUGOBLOX! 🚀 HugoBlox is an easy, fast no-code website builder for researchers, entrepreneurs, data scientists, and developers. Build stunning sites in minutes. 适合研究人员、企业家、数据科学家和开发者的简单快速无代码网站构建器。用拖放功能、可定制模板和内置SEO工具快速创建精美网站!
https://hugoblox.com/templates/
MIT License
8.12k stars 2.89k forks source link

Country is not displayed #2937

Closed anirbanbasu closed 1 year ago

anirbanbasu commented 1 year ago

Preliminary Checks

Description

Even if the country is specified for the event, it is not displayed when the site is rendered.

For example, the code at https://github.com/wowchemy/starter-hugo-research-group/blob/main/content/event/example/index.md?plain=1 renders as https://research-group.netlify.app/event/example/ where the location does not show the country.

Likewise, the code at https://github.com/anirbanbasu/ifiptm.github.io/blob/main/content/event/ifiptm2023/index.md?plain=1 renders as https://ifiptm.netlify.app/event/ifiptm2023/ with no mention of the country. Furthermore, if the postcode is not specified, the address line ends with a comma, as in https://ifiptm.netlify.app/event/ifiptm2009/.

Reproduction Link

https://github.com/wowchemy/starter-hugo-research-group/blob/main/content/event/example/index.md?plain=1

Steps to Reproduce

  1. Create a new event such as content/event/example-event/ with the content of https://github.com/wowchemy/starter-hugo-research-group/blob/main/content/event/example/index.md?plain=1
  2. Play with the location, omitting various fields.
  3. Even if the country is present, it will not be displayed when Hugo renders the website.

Expected Result

A location with the specified address fields, including the country (if present).

Actual Result

  1. The address is shown until the postcode, but not the country.
  2. If the postcode is not present then the address line ends abruptly with a comma.

What Hugo Module versions does your site use?

module github.com/anirbanbasu/ifiptm.github.io

go 1.15

require (
    github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-netlify v1.0.1-0.20230420210249-859b57464242
    github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-netlify-cms v1.0.1-0.20230420210249-859b57464242
    github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-reveal v0.0.0-20230420210249-859b57464242
    github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy/v5 v5.7.1-0.20230420210249-859b57464242
)

What operating system(s) are you seeing the problem on?

macOS

What browser(s) are you seeing the problem on?

Other

Which Wowchemy template are you using?

Research Group

What version of Hugo are you using?

hugo v0.111.3+extended darwin/amd64

Agos95 commented 1 year ago

You can change the address format as described here.

In your config/_default/params.yaml there is the section:

locale:
  date_format: 'Jan 2, 2006'
  time_format: '3:04 PM'
  address_format: en-us

You can use one of the format already available in data/address_formats.toml. The default is en-us, which only displays 'street', 'city', 'region', 'postcode'.

gcushen commented 1 year ago

Closing as the question has been answered by @Agos95 above.

anirbanbasu commented 1 year ago

@Agos95 thank you. That solved the problem. I had to choose en-ca. I wonder why the en-us or en-gb address formats do not include the country. I guess I can override it locally but that is not an option I would like to go for.