Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Incorrect handling of external URLs in the navigation menue #480

@ibe-314

Description

@ibe-314

System information

Zola version: 0.19.2
tabi commit: 8fafc0f

Expected behaviour

When an external url is set in the menu in the configuration file, the generated URL in the footer should correctly point to the external URL. It should not be treated as a relative URL.

Actual behaviour

All urls given in menu are treated as relative urls, thus if absolute urls are given in the configuration file, a wrong hyperlink is generated in the navbar for this element. This is the same bug as in the footer #212, which was already fixed some time ago.

Steps to reproduce

  1. Edit config.toml and add an external URL in the menu section. For example:
menu = [
    { name = "blog", url = "blog", trailing_slash = true },
    { name = "archive", url = "archive", trailing_slash = true },
    { name = "tags", url = "tags", trailing_slash = true },
    { name = "projects", url = "projects", trailing_slash = true },
    { name = "example", url = "https://example.com" },
]
  1. zola serve
  2. The link at the navbar for example is http://127.0.0.1:1111/https://example.com/

Additional context

Same bug as in #212.

Final checklist

  • I've checked that the issue isn't already reported.
  • I've tested with the latest version of tabi to check if the issue has already been fixed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions