Im hoping there is something I can do, but I have a plan if not…
Problem: I have multiple sites that are all rendered under a single domain using Azure Front Door… and I want to share the header and footer menu data between the sites so that they “look” like they are a single unified story. Right now, the header and footer on the sub-sites are hard coded and need to be manually updated.
They are both separate Azure Static sites that come from different repos.
Ask: Id like to have some way to at least share the menu data!
Backup Solution: I publish my menu data as https://nkdagility.com/navigation.json and write a header and footer that read it and render the same on every site.
OK, so the content exists on Site A, and you want the footer menus of both Site A and Site B to point to the content on Site A.
Try this:
git clone --single-branch -b hugo-forum-topic-52483 https://github.com/jmooring/hugo-testing hugo-forum-topic-52483
cd hugo-forum-topic-52483
hugo server
Note that the rendered menu entries use relative URLs to point to local content.
Now stop the server and do this:
mv content/capabilities content/xx
hugo server
Note that the rendered menu entries now use absolute URLs pointing to content on the site specified by parentSiteBaseURL in the module’s params configuration file.
Using the pageRef menu property in the menu configuration enables the .HasMenuCurrent and .IsMenuCurrent methods to work as intended, which is good for both usability and accessibility.