Git Product home page Git Product logo

Comments (7)

gcushen avatar gcushen commented on July 17, 2024 1

@UltraCoderRU thanks for the description of the multilingual homepage issue. The smooth scroll in this case is probably easy to fix with Javascript, but ideally we want a website with URLs like /#about for default language and /ru/#about for Russian version, for example. I'll add it to the to-do list above and try to fix it sometime.

from hugo-blox-builder.

gcushen avatar gcushen commented on July 17, 2024 1

@UltraCoderRU I just tried putting the [params] variables under [languages.X] and it works. It seems that Hugo allows you to put both the core Hugo variables like title = "My blog" and the Academic [params] variables (like name = "My name in Russian") under the [languages.X] configuration section. I think that the Hugo team could perhaps have chosen a more logical way to declare the multilingual parameters, but it works!

The following works:

[Languages.ru]
# General Hugo configuration
copyright = "My copyright in Russian"
title = "My Russian blog"

# Academic's `[params]` configuration
name = "My Russian name"
role = "Professor of Russian"
organization = "My University's name in Russian"

from hugo-blox-builder.

UltraCoderRU avatar UltraCoderRU commented on July 17, 2024

I know, there is no official multilingual support yet, but I found some issue with navigation. If I rename widget.md to widget.<lang>.md in content directory (for example. about.md to about.en.md) navigation doesn't work, because <section> id changes. If I change links in config.toml (for example, url = "#about.en", smooth scroll doesn't work. :)

from hugo-blox-builder.

gcushen avatar gcushen commented on July 17, 2024

@UltraCoderRU Multilingual support just improved a lot with update b99e5a1 😃

Multilingual support added for:

  • homepage widget system (fixes your navigation/widget problem)
  • navigation bar links (fixes your navigation/widget problem)
  • 'more posts/publications/talks' links in widgets

Please let me know your feedback when you have a chance to test it.

from hugo-blox-builder.

UltraCoderRU avatar UltraCoderRU commented on July 17, 2024

@gcushen Thanks, now navigation works correctly. But I found another issue: variables redefinition in [languages.X.params] in config.toml doesn't work.

from hugo-blox-builder.

UltraCoderRU avatar UltraCoderRU commented on July 17, 2024

@gcushen Yes, it works that way. Seems like Hugo team created a possibility of name collisions. :)

from hugo-blox-builder.

gcushen avatar gcushen commented on July 17, 2024

@UltraCoderRU Yes, I assume it's a bug in Hugo, but I haven't searched their Github issues for it. I hope you don't find any name collisions 😆

from hugo-blox-builder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.