Problem with PaperMod theme: error conf multilingual menu and it doesn't appear my logo

Hi!
I set up the theme as described by the developer.
I have 2 issues.
The first one is about an error related to the lines commented below after running hugo server.
The second one is related to my logo.
My logo is in static/images/mylogo.jpg
I set up the multilingual menu as described on the Hugo website, and precisely:

[languages]
  [languages.en]
    contentDir = "content/english"
    title = "Notes"
    languageName = "English"
    weight = 0
    [languages.it]
    contentDir = "content/italian"
    title = "Notes"
    languageName = "Italian"
    weight = 10
  
        [[languages.en.menu.main]]
        name = "Home"
        url = "/"
        [[languages.en.menu.main]]
        name = "About me"
        url = "page/about"
        [[languages.en.menu.main]]
        name = "Blog"
        url = "myblog"
        #[[languages.en.menu.main]]
        #name = "Privacy"
        #url = "page/privacypolicy.en"
        
        [[languages.it.menu.main]]
        name = "Home"
        url = "/"
        [[languages.it.menu.main]]
        name = "Chi sono"
        url = "page/about"
        [[languages.it.menu.main]]
        name = "Blog"
        url = "myblog"
        #[[languages.it.menu.main]]
        #name = "Informativa"
        #url = "page/privacypolicy.it"
  1. If I uncomment those lines I receive an error when I run hugo server and I don’t know why.
  2. I run the deploy to my server (according to the instructions on the Hugo site - I tried and it works).
    After the deployment, my website is online but the logo doesn’t appear (I see a box such as an error).
    On my server, there is Ubuntu 20.04.3
    Is there anyone who can help me?

You are more likely to receive a prompt and accurate response if you post a link to the public repository for your project.

See https://discourse.gohugo.io/t/requesting-help/9132.

Let us see your code

Include a link to the source code repository of your project, because we really need the context of seeing your templates and partials to be able to help you. It is trivial to do a quick git clone on your repo, then run hugo server in your project, to help you out. On the other hand, recreating your code from screenshots, or sort of guessing at it, is not.

If you can’t share your repository for whatever reason, consider creating a dummy repo that you can share, which reproduces the problem you’re experiencing.

Thank you.
You can find the source here: Nextcloud
For security reasons, I will delete the file and stop sharing after you will download the file.
I look forward to receiving a reply from you.

Your site configuration file needed some love.

config.toml
baseURL = "https://myblog.it"
title = "NicFab Notes Site"
paginate = 5
theme = "PaperMod"
enableRobotsTXT = true
buildDrafts = false
buildFuture = false
buildExpired = false
copyright = '© Nicola Fabiano - All rights reserved'
defaultContentLanguage = 'en'

[languages]
  [languages.en]
    contentDir = "content/english"
    title = "NicFab Notes"
    languageName = "English"
    weight = 1
  [languages.it]
    contentDir = "content/italian"
    title = "NicFab Notes"
    languageName = "Italian"
    weight = 2


    [[languages.en.menu.main]]
    name = "Home"
    pageref = "/"
    weight = 1
    [[languages.en.menu.main]]
    name = "About me"
    pageref = "page/about"
    weight = 2
    [[languages.en.menu.main]]
    name = "Blog"
    url = "https://www.myblog.it"
    [[languages.en.menu.main]]
    name = "Legal"
    pageref = "page/privacypolicy"
    weight = 3


    [[languages.it.menu.main]]
    name = "Home"
    pageref = "/"
    weight = 1
    [[languages.it.menu.main]]
    name = "Chi sono"
    pageref = "page/about"
    weight = 2
    [[languages.it.menu.main]]
    name = "Blog"
    url = "https://www.myblog.it"
    [[languages.it.menu.main]]
    name = "Legal"
    pageref = "page/privacypolicy"
    weight = 3

[minify]
  disableXML = true
  minifyOutput = true

[params]
  env = "production"
  title = "NicFab Site"
  description = "NicFab Notes"
  keywords = [ "Blog", "Privacy", "Digitaltech" ]
  author = "NicFab"
  images = [ "static/images" ]
  DateFormat = "2 January 2006"
  defaultTheme = "auto"
  disableThemeToggle = false
  ShowReadingTime = true
  ShowShareButtons = true
  ShowPostNavLinks = true
  ShowBreadCrumbs = true
  ShowCodeCopyButtons = false
  disableSpecial1stPost = false
  disableScrollToTop = false
  comments = false
  hidemeta = false
  hideSummary = false
  showtoc = false
  tocopen = false

  [params.assets]
  favicon = "static/assets/favicon"
  favicon16x16 = "static/assets/favicon/favicon-16x16.png"
  favicon32x32 = "static/assets/favicon/favicon-32x32.png"
  apple_touch_icon = "static/assets/favicon/apple-touch-icon.png"
  safari_pinned_tab = "static/assets/favicon/safari-pinned-tab.svg"

  [params.label]
  text = "Home"
  icon = "/images/logo.jpg"
  iconHeight = 103

  #[params.profileMode]
  #enabled = true
  #title = "NicFab Site"
  #subtitle = "Here I am"
  #imageUrl = "images/logo.jpg"
  #imageTitle = "Logo"
  #imageWidth = 200
  #imageHeight = 103

    #[[params.profileMode.buttons]]
    #name = "Posts"
    #url = "posts"

    #[[params.profileMode.buttons]]
    #name = "Tags"
    #url = "tags"

  [params.homeInfoParams]
  Title = "Hi there 👋"
  Content = "Welcome to my notepad"

  [[params.socialIcons]]
  name = "twitter"
  url = "https://twitter.com/nicfab"

  [[params.socialIcons]]
  name = "LinkedIn"
  url = "https://linkedin.com/nicfab"

  [[params.socialIcons]]
  name = "Facebook"
  url = "https://facebook.com/nicfab"

  [[params.socialIcons]]
  name = "stackoverflow"
  url = "https://stackoverflow.com"

  [[params.socialIcons]]
  name = "github"
  url = "https://github.com/nicfab"

  [params.cover]
  hidden = true
  hiddenInList = true
  hiddenInSingle = true

  #[params.editPost]
  #URL = "https://github.com/<path_to_repo>/content"
  #Text = "Suggest Changes"
  #appendFilePath = true

  [params.fuseOpts]
  isCaseSensitive = false
  shouldSort = true
  location = 0
  distance = 1_000
  threshold = 0.4
  minMatchCharLength = 0
  keys = [ "title", "permalink", "summary", "content" ]

[outputs]
home = [ "HTML", "RSS", "JSON" ]

When setting contentDir in the language table, do not include the language tag in the filename.

  • Do this: content/english/page/about.md
  • Not this: content/english/page/about.en.md

Tks.
I did as you said, but I continue not to see the logo switching in Italian.
I don’t know.

It seems that there is some misconfiguration for the Italian language.

Works for me. Try it:

git clone --recurse-submodules https://github.com/jmooring/hugo-forum-topic-36023
cd hugo-forum-topic-36023
hugo server

Now it works.
What was the issue?

Compare the config.toml files, carefully.

Thank you so much!

I’m sorry again.
I did the deployment on my server, but it doesn’t work properly.
Can you verify?
Here it is https://notes.nicfab.it
If I click on It, happens something strange.
It works in local

Change baseURL in config.toml to https://notes.nicfab.it/

Thank you again.
I am sorry.
Indeed, I had to change the URL.

1 Like

I will open another topic on the cookie policy and the configuration of the cookie notice.