[SOLVED] A javascript container not showing as a partial, but does work as a page

Have a look at http://stevenputtemans.github.io/travel/, where I added a travel map of countries visited.

To create this I"

  • made a travels.md under content, which is empty and has a "type=travels" set
  • made a layouts/travels/single.html containing the javascript generated page
  • added all necessary parts in the static folder

What I do not like yet is that I do not have my navigation bad anymore, thus what I then tried was

  • make a layouts/partials/worldmap.html containing the actual javascript generated map
  • edited the layouts/travels/single.html towards the following content
{{ partial "header.html" . }}
{{ partial "navbar.html" . }}

{{ partial "worldmap.html" . }}

{{ partial "footer_container.html" . }}
{{ partial "footer.html" . }}

But then the map is not loaded anymore.

Anyone has a clue?

The world map on http://stevenputtemans.github.io/travels/ (different URL than the one in your post -> /travels/ instead of /travel/) works for me at this time.

At least, I see a world map where nearly all countries are light blue and some others are dark blue. That would probably be your visited and non-visited countries. But I don’t see a header or footer, should I see those?

(It helps if you can share a link to your repositories, that way we can quickly check your settings and/or replicate the website.)

Hi @Jura, thanks for the reply. Sorry for the faulty link. The version online is with the map as a single.html layout, without partials, and thus working.

With the partials approach i would love to be able to readd the navigation bar, this header and footer.

I got the code at my work machine, will upload both Hugo and final repo on Monday

@jura as promised an overview of the code

Here are the following repositories

As you can see, I added both options

  • The option Travel directs you to the world map, which is in the condition I want it for now
  • The option T2 directs you to the world map created with partials, on which I would love the standard header and footer, and thus a menu option as desired.

Do you know why the second option T2 is not doing exactly the same?

Solved it by generating the map first in a seperate html file, then define an iframe inside a partial, that loads the map page, and work further on that.