rhazdon / hugo-theme-hello-friend-ng

Pretty basic theme for Hugo that covers all of the essentials. All you have to do is start typing!
https://github.com/rhazdon/hugo-theme-hello-friend-ng/
Other
1.46k stars 777 forks source link

Language menu gone #334

Closed gibranlp closed 3 years ago

gibranlp commented 3 years ago

Hi, im trying to make a multilingual site, and everything works but suddenly the menu language disappeared, and i cant seem to get it back i have my ´´´enableGlobalLanguageMenu = true´´´ is there anything i can do to get back the menu? thanks

HacDan commented 3 years ago

This works for me with a pretty basic config.

@gibranlp Could your share your config file? Here's a partial of mine with it working

[params]
  dateform        = "Jan 2, 2006"
  dateformShort   = "Jan 2"
  dateformNum     = "2006-01-02"
  dateformNumTime = "2006-01-02 15:04"

  enableGlobalLanguageMenu = true
gibranlp commented 3 years ago

Sure here it is

title   = "<gibranlp.dev/>"
languageCode = "en"
theme = "hello-friend-lp"

PygmentsCodeFences = true
PygmentsStyle = "monokai"

paginate  = 10
rssLimit  = 10  # Maximum number of items in the RSS feed.
copyright = "This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License." # RSS.

# googleAnalytics = ""

archetypeDir = "archetypes"
contentDir   = "content"
dataDir      = "data"
layoutDir    = "layouts"
publishDir   = "public"

buildDrafts  = false
buildFuture  = false
buildExpired = false
canonifyURLs = true

enableRobotsTXT = true
enableGitInfo   = false
enableEmoji     = true
disableRSS     = false
disableSitemap = false
disableHugoGeneratorInject = false

[permalinks]
  posts = "/posts/:year/:month/:title/"

[author]
  name = "gibranlp"

[blackfriday]
  hrefTargetBlank = true

[taxonomies]
  tag      = "tags"
  category = "categories"
  series   = "series"

DefaultContentLanguage = "en"

[params]
  dateform        = "Jan 2, 2006"
  dateformShort   = "Jan 2"
  dateformNum     = "2006-01-02"
  dateformNumTime = "2006-01-02 15:04"
  enableGlobalLanguageMenu = true

  description = "blog de gibranlp, linux, computación psicología y todo lo que se me ocurra"
  keywords = "linux, psicologia, ciencia, computacion"
  images = [""]

  homeSubtitle = "IT Manager | WEB Designer | Linux Enthusiast | Coffee Lover | Psychology Student."

  # gitUrl = ""

  disableReadOtherPosts = false

  enableThemeToggle = true

  enableSharingButtons = true

  defaultContentLanguageInSubdir = true

  customCSS = ["/css/styles.css"]
  customJS  = []

  justifyContent = false  # Set "text-align: justify" to .post-content.

  [params.footer]
    trademark = true
    rss = false
    copyright = true
    author = false
    topText = []
    bottomText = []

  [params.favicon.color]
    mask = "#1b1c1d"
    msapplication = "#1b1c1d"
    theme = "#1b1c1d"

  [languages.en.params.logo]
    logoMark     = "->"
    logoText     = "$home"
    logoHomeLink = "/"
    logoCursorDisabled = false
    logoCursorColor    = "#FA8E93"
    logoCursorAnimate  = "1s"

  [languages.mx.params.logo]  
    logoMark     = "->>"
    logoText     = "$home"
    logoHomeLink = "/mx/"
    logoCursorDisabled = false
    logoCursorColor    = "#36E389"
    logoCursorAnimate  = "1s"

  # Uncomment this to enable Commento.
  #
  # [params.commento]
  #   url = ""

  [params.portrait]
    path     = "/img/logo.png"
    alt      = "Portrait"
    maxWidth = "210px"

   # Social icons
  [[params.social]]
    name = "email"
    url  = "mailto:hola@gibranlp.dev"

  [[params.social]]
    name = "whatsapp"
    url  = "https://wa.me/5549019430?text=Hola%20estoy%20interesado%20en%20tus%20servicios"

  [[params.social]]
    name = "telegram"
    url  = "https://t.me/gibranlp"

  [[params.social]]
    name = "github"
    url  = "https://github.com/gibranlp"

  [[params.social]]
    name = "reddit"
    url  = "https://www.reddit.com/user/gibranlp"

[languages]
  [languages.en]
    title="<gibranlp/>"
    weight    = 1
    copyright = 'All Rights Reserved 2021'
    readOtherPosts = "Read other posts"

  [languages.mx]
    title  = "<gibranlp/>"
    weight    = 2
    copyright = 'Todos los Derechos Reservados 2021'
    readOtherPosts = "Leer otros posts"

[menu]
[[languages.mx.menus.main]]
    identifier = "posts"
    name       = "Blog"
    url        = "post/"

[[languages.mx.menus.main]]
    identifier = "cv"
    name       = "CV"
    url        = "cv/"

[[languages.mx.menus.main]]
    identifier = "resina"
    name       = "Resina Epóxica"
    url        = "resina/"

[[languages.mx.menus.main]]
    identifier = "qarslp"
    name       = "QARSlp"
    url        = "qarslp/"

[[languages.en.menus.main]]
    identifier = "cv"
    name       = "Résumé"
    url        = "cv/"
    weight     = 1

[[languages.en.menus.main]]
    identifier = "resina"
    name       = "Epoxy Resin"
    url        = "resina/"
    weight     = 3

[[languages.en.menus.main]]
    identifier = "qarslp"
    name       = "QARSlp"
    url        = "qarslp/"
    weight     = 2

[[languages.en.menus.main]]
    identifier = "posts"
    name       = "Blog"
    url        = "post/"
    weight     = 4

[markup]
    [markup.goldmark]
    [markup.goldmark.renderer]
    unsafe = true
gibranlp commented 3 years ago

I downloaded again you code and use it as theme and now is working again, so i think you can close this ticket now, thanks a lot.