How to add normal link (url) to menu

Hi Frontity team,

I would like to add normal link to menu called Portfolio. I have portfolio folder in the root of my WordPress installation and I can access to it with url

frontity.settings.js file has the menu defined, but I cannot add there the normal link, because it won’t work. The API source will be added in front of the url. Is there a way to do what I want?

Thanks in advanced! :blush:

You could improve the Nav component to support external links using some logic like this:

const Nav = ({ state }) => (
    {[name, link]) => (
      <Item key={name} isSelected={ === link}>
        {link.startsWith("http") ? (
          <a href={link}>{name}</a>
        ) : (
          <Link link={link}>{name}</Link>

I think it’s better to modify the Link component and this way you will keep classes, styles, etc.

const onClick = event => {
  // Do nothing if it's an external link
  if (link.startsWith("http")) return;

  // Set the router to the new url.
  window.scrollTo(0, 0);

Oh, yes, that’s better :smile:

We could add it to mars-theme by the way.

@david just added it here: :grin:

Thanks @luisherranz & @David ! :slight_smile: